UptimeTea

API Documentation

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

Get status widget

A small payload for embedding a status badge on any site: the overall status (the worst of operational, unknown, degraded, down) and each watcher's status. No authentication required; cached for a short time.

GET https://api.uptimetea.com/status/:slug/widget

Response body

{
  "name": "Service Status",
  "url": "https://status.uptimetea.com/my-service",
  "brand_color": "#3b82f6",
  "show_branding": true,
  "status": "operational",
  "watchers": [
    {
      "title": "Website",
      "status": "operational"
    }
  ]
}

Code examples

curl -X GET "https://api.uptimetea.com/status/$STATUS_PAGE_SLUG/widget"
// Get status widget
const response = await fetch('https://api.uptimetea.com/status/STATUS_PAGE_SLUG/widget');

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

response = requests.get(
    'https://api.uptimetea.com/status/STATUS_PAGE_SLUG/widget'
)

print(response.json())
// Get status widget
package main

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

func main() {
    req, _ := http.NewRequest("GET", "https://api.uptimetea.com/status/STATUS_PAGE_SLUG/widget", nil)

    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))
}
# Get status widget
require 'net/http'
require 'uri'

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

request = Net::HTTP::Get.new(uri)

response = http.request(request)
puts response.code, response.body
<?php
// Get status widget
$ch = curl_init('https://api.uptimetea.com/status/STATUS_PAGE_SLUG/widget');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

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