API Documentation
The UptimeTea API is easy to use and free for all plans.
Update status page
Changes a status page. name, slug and hide_branding keep their value when omitted. custom_domain, logo_url, brand_color, page_title and watcher_ids are cleared when omitted, so send every one you want to keep.
PATCH
https://api.uptimetea.com/status_pages/:id
Headers
-
AuthorizationREQUIREDSTRINGBearer $TOKEN -
Content-TypeREQUIREDSTRINGapplication/json
Body parameters
-
status_page.nameSTRINGPage name.
-
status_page.slugSTRINGLowercase letters, numbers and hyphens; the page lives at status.uptimetea.com/<slug>.
-
status_page.custom_domainSTRINGYour own hostname, such as status.example.com. Setup instructions are emailed when it changes.
-
status_page.logo_urlSTRINGLogo shown in the page header.
-
status_page.brand_colorSTRINGAccent colour as a hex code.
-
status_page.page_titleSTRINGBrowser title; defaults to the name.
-
status_page.hide_brandingBOOLEANHides the UptimeTea footer link. Paid plans only.
-
status_page.watcher_idsARRAYWatchers shown on the page.
Response body
{
"id": "uuid",
"name": "My Service Status",
"slug": "my-service",
"custom_domain": "status.example.com",
"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 PATCH "https://api.uptimetea.com/status_pages/$STATUS_PAGE_ID" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status_page": {
"name": "My Service Status",
"custom_domain": "status.example.com",
"brand_color": "#3b82f6",
"watcher_ids": ["uuid"]
}
}'
// Update status page
const response = await fetch('https://api.uptimetea.com/status_pages/STATUS_PAGE_ID', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer ' + yourToken,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"status_page": {
"name": "My Service Status",
"custom_domain": "status.example.com",
"brand_color": "#3b82f6",
"watcher_ids": ["uuid"]
}
})
});
const data = await response.json();
console.log(data);
# Update status page
import requests
headers = {'Authorization': f'Bearer {your_token}'}
response = requests.patch(
'https://api.uptimetea.com/status_pages/STATUS_PAGE_ID',
headers=headers,
json={
'status_page': {
'name': 'My Service Status',
'custom_domain': 'status.example.com',
'brand_color': '#3b82f6',
'watcher_ids': ['uuid']
}
}
)
print(response.json())
// Update status page
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"status_page": {
"name": "My Service Status",
"custom_domain": "status.example.com",
"brand_color": "#3b82f6",
"watcher_ids": ["uuid"]
}
}`)
req, _ := http.NewRequest("PATCH", "https://api.uptimetea.com/status_pages/STATUS_PAGE_ID", 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))
}
# Update status page
require 'net/http'
require 'uri'
uri = URI('https://api.uptimetea.com/status_pages/STATUS_PAGE_ID')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request['Authorization'] = "Bearer #{your_token}"
request['Content-Type'] = 'application/json'
request.body = <<~JSON
{
"status_page": {
"name": "My Service Status",
"custom_domain": "status.example.com",
"brand_color": "#3b82f6",
"watcher_ids": ["uuid"]
}
}
JSON
response = http.request(request)
puts response.code, response.body
<?php
// Update status page
$ch = curl_init('https://api.uptimetea.com/status_pages/STATUS_PAGE_ID');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $yourToken,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, <<<'JSON'
{
"status_page": {
"name": "My Service Status",
"custom_domain": "status.example.com",
"brand_color": "#3b82f6",
"watcher_ids": ["uuid"]
}
}
JSON);
$response = curl_exec($ch);
print_r(json_decode($response, true));
curl_close($ch);