UptimeTea

API Documentation

The UptimeTea API is easy to use and free for all plans.

Create status page

Creates a new public status page for your watchers. name is required; the slug defaults to one built from it.

POST https://api.uptimetea.com/status_pages

Headers

  • AuthorizationREQUIREDSTRING
    Bearer $TOKEN
  • Content-TypeREQUIREDSTRING
    application/json

Body parameters

  • status_page.nameSTRING

    Page name.

  • status_page.slugSTRING

    Lowercase letters, numbers and hyphens; the page lives at status.uptimetea.com/<slug>.

  • status_page.custom_domainSTRING

    Your own hostname, such as status.example.com. Setup instructions are emailed when it changes.

  • status_page.logo_urlSTRING

    Logo shown in the page header.

  • status_page.brand_colorSTRING

    Accent colour as a hex code.

  • status_page.page_titleSTRING

    Browser title; defaults to the name.

  • status_page.hide_brandingBOOLEAN

    Hides the UptimeTea footer link. Paid plans only.

  • status_page.watcher_idsARRAY

    Watchers shown on the page.

Response body

{
  "id": "uuid",
  "name": "My Service Status",
  "slug": "my-service",
  "custom_domain": null,
  "logo_url": null,
  "brand_color": "#3b82f6",
  "page_title": "Service Status",
  "hide_branding": false,
  "created_at": "2024-01-15T10:00:00Z",
  "watchers": [
    {
      "id": "uuid",
      "title": "My Website",
      "url": "https://example.com",
      "status": "success"
    }
  ]
}

Code examples

curl -X POST "https://api.uptimetea.com/status_pages" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status_page": {
      "name": "My Service Status",
      "slug": "my-service",
      "page_title": "Service Status",
      "brand_color": "#3b82f6",
      "watcher_ids": ["uuid"]
    }
  }'
// Create status page
const response = await fetch('https://api.uptimetea.com/status_pages', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + yourToken,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "status_page": {
      "name": "My Service Status",
      "slug": "my-service",
      "page_title": "Service Status",
      "brand_color": "#3b82f6",
      "watcher_ids": ["uuid"]
    }
  })
});

const data = await response.json();
console.log(data);
# Create status page
import requests

headers = {'Authorization': f'Bearer {your_token}'}

response = requests.post(
    'https://api.uptimetea.com/status_pages',
    headers=headers,
    json={
        'status_page': {
            'name': 'My Service Status',
            'slug': 'my-service',
            'page_title': 'Service Status',
            'brand_color': '#3b82f6',
            'watcher_ids': ['uuid']
        }
    }
)

print(response.json())
// Create status page
package main

import (
    "fmt"
    "io"
    "net/http"
    "strings"
)

func main() {
    body := strings.NewReader(`{
      "status_page": {
        "name": "My Service Status",
        "slug": "my-service",
        "page_title": "Service Status",
        "brand_color": "#3b82f6",
        "watcher_ids": ["uuid"]
      }
    }`)
    req, _ := http.NewRequest("POST", "https://api.uptimetea.com/status_pages", body)
    req.Header.Set("Authorization", "Bearer "+yourToken)
    req.Header.Set("Content-Type", "application/json")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    data, _ := io.ReadAll(resp.Body)
    fmt.Println(resp.Status, string(data))
}
# Create status page
require 'net/http'
require 'uri'

uri = URI('https://api.uptimetea.com/status_pages')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri)
request['Authorization'] = "Bearer #{your_token}"
request['Content-Type'] = 'application/json'
request.body = <<~JSON
  {
    "status_page": {
      "name": "My Service Status",
      "slug": "my-service",
      "page_title": "Service Status",
      "brand_color": "#3b82f6",
      "watcher_ids": ["uuid"]
    }
  }
JSON

response = http.request(request)
puts response.code, response.body
<?php
// Create status page
$ch = curl_init('https://api.uptimetea.com/status_pages');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $yourToken,
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, <<<'JSON'
{
  "status_page": {
    "name": "My Service Status",
    "slug": "my-service",
    "page_title": "Service Status",
    "brand_color": "#3b82f6",
    "watcher_ids": ["uuid"]
  }
}
JSON);

$response = curl_exec($ch);
print_r(json_decode($response, true));
curl_close($ch);