UptimeTea

API Documentation

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

Login

Login with email and password to receive an authentication token.

POST https://api.uptimetea.com/auth/login

Headers

  • Content-TypeREQUIREDSTRING
    application/json

Body parameters

  • emailREQUIREDSTRING

    Account email.

  • passwordREQUIREDSTRING

    Account password.

Response body

{
  "id": "uuid",
  "first_name": "John",
  "last_name": "Doe",
  "email": "user@example.com",
  "avatar_url": null,
  "locale": "en",
  "timezone": "UTC",
  "theme": "light",
  "team_id": "uuid",
  "team_name": "Acme",
  "team_role": "owner",
  "suspended": false,
  "billing_plan": "free",
  "email_verified": true,
  "token": "your-api-token"
}

Code examples

curl -X POST "https://api.uptimetea.com/auth/login" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "securepassword"
  }'
// Login
const response = await fetch('https://api.uptimetea.com/auth/login', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "email": "user@example.com",
    "password": "securepassword"
  })
});

const data = await response.json();
console.log(data);
# Login
import requests

response = requests.post(
    'https://api.uptimetea.com/auth/login',
    json={
        'email': 'user@example.com',
        'password': 'securepassword'
    }
)

print(response.json())
// Login
package main

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

func main() {
    body := strings.NewReader(`{
      "email": "user@example.com",
      "password": "securepassword"
    }`)
    req, _ := http.NewRequest("POST", "https://api.uptimetea.com/auth/login", body)
    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))
}
# Login
require 'net/http'
require 'uri'

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

request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = <<~JSON
  {
    "email": "user@example.com",
    "password": "securepassword"
  }
JSON

response = http.request(request)
puts response.code, response.body
<?php
// Login
$ch = curl_init('https://api.uptimetea.com/auth/login');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, <<<'JSON'
{
  "email": "user@example.com",
  "password": "securepassword"
}
JSON);

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