API Documentation
The UptimeTea API is easy to use and free for all plans.
Rename team
Renames your team. Requires the owner or manager role.
PATCH
https://api.uptimetea.com/team
Headers
-
AuthorizationREQUIREDSTRINGBearer $TOKEN -
Content-TypeREQUIREDSTRINGapplication/json
Body parameters
-
team.nameREQUIREDSTRINGTeam name.
Response body
{
"id": "uuid",
"name": "Acme Ops",
"owner_id": "uuid",
"created_at": "2024-01-01T00:00:00Z",
"members": [
{
"id": "uuid",
"email": "user@example.com",
"first_name": "John",
"last_name": "Doe",
"role": "owner",
"joined_at": "2024-01-01T00:00:00Z"
}
]
}
Code examples
curl -X PATCH "https://api.uptimetea.com/team" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"team": {
"name": "Acme Ops"
}
}'
// Rename team
const response = await fetch('https://api.uptimetea.com/team', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer ' + yourToken,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"team": {
"name": "Acme Ops"
}
})
});
const data = await response.json();
console.log(data);
# Rename team
import requests
headers = {'Authorization': f'Bearer {your_token}'}
response = requests.patch(
'https://api.uptimetea.com/team',
headers=headers,
json={
'team': {
'name': 'Acme Ops'
}
}
)
print(response.json())
// Rename team
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"team": {
"name": "Acme Ops"
}
}`)
req, _ := http.NewRequest("PATCH", "https://api.uptimetea.com/team", 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))
}
# Rename team
require 'net/http'
require 'uri'
uri = URI('https://api.uptimetea.com/team')
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
{
"team": {
"name": "Acme Ops"
}
}
JSON
response = http.request(request)
puts response.code, response.body
<?php
// Rename team
$ch = curl_init('https://api.uptimetea.com/team');
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'
{
"team": {
"name": "Acme Ops"
}
}
JSON);
$response = curl_exec($ch);
print_r(json_decode($response, true));
curl_close($ch);