API Documentation

Auth API

POST /auth/login

Get profile information and authorization token.

curl --request POST \
     --url 'https://api.uptimetea.com/auth/login' \
     --header 'Content-Type: application/json' \
     --data '{"email": "username@example.org", "password": "secret123"}'

Params you can send:

Parameters Description
email [required] E-mail
password [required] Password

Response body you will receive as JSON:

Body Description
id Unique user identifier
first_name First name of the user
last_name Last name of the user
email E-mail of the user
time_zone User time zone (like “Europe/Vilnius”)
avatar_url Gravatar URL
api_token API token you can use for other requests

In all other endpoint examples, this field api_token will represent value you would use for YOUR_API_TOKEN.

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid

GET /auth/login

curl --request GET \
     --url 'https://api.uptimetea.com/auth/login' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN'

This endpoint does not require any parameters.

Response body you will receive as JSON:

Body Description
id Unique user identifier
first_name First name of the user
last_name Last name of the user
email E-mail of the user
time_zone User time zone (like “Europe/Vilnius”)
avatar_url Gravatar URL
api_token API token you can use for other requests

In all other endpoint examples, this field api_token will represent value you would use for YOUR_API_TOKEN.

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid

GET /auth/logout

Logout user by invalidating API token.

curl --request GET \
     --url 'https://api.uptimetea.com/auth/logout' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN'

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid

Teams API

GET /teams

Get all teams user has access to.

curl --request GET \
     --url 'https://api.uptimetea.com/teams' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN'

Params you can send:

Parameters Description
q [optional] Search by title

Response body you will receive as JSON:

Body Description
id Unique team identifier
title Team title
description Team description
role User role in the team
avatar Team avatar (can be empty)
avatar.filename Filename of the avatar uploaded image
avatar.url Full team avatar URL
members Array of member names

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid

GET /teams/:id

Get team details.

curl --request GET \
     --url 'https://api.uptimetea.com/teams/:id' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN'

This endpoint does not require any parameters to send.

Response body you will receive as JSON:

Body Description
id Unique team identifier
title Team title
description Team description
role User role in the team
avatar Team avatar (can be empty)
avatar.filename Filename of the avatar uploaded image
avatar.url Full team avatar URL
members Array of member names

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
404 If team not found

POST /teams

Create new team and become admin member of it.

curl --request POST \
     --url 'https://api.uptimetea.com/teams' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN' \
     --data '{"title": "New Team"}'

Params you can send:

Parameters Description
title [required] Title
short_description [optional] Description
avatar [optional] Avatar file

Response body you will receive as JSON:

Body Description
id Unique team identifier
title Team title
description Team description
role User role in the team
avatar Team avatar (can be empty)
avatar.filename Filename of the avatar uploaded image
avatar.url Full team avatar URL
members Array of member names

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
422 If data validation fails

POST /teams/:id

Update user team.

curl --request POST \
     --url 'https://api.uptimetea.com/teams/:id' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN' \
     --data '{"title": "Updated Team"}'

Params you can send:

Parameters Description
title [required] Title
short_description [optional] Description
avatar [optional] Avatar file

Response body you will receive as JSON:

Body Description
id Unique team identifier
title Team title
description Team description
role User role in the team
avatar Team avatar (can be empty)
avatar.filename Filename of the avatar uploaded image
avatar.url Full team avatar URL
members Array of member names

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
404 If team not found
422 If data validation fails

DELETE /teams/:id

Delete user team (if user is admin member of it).

curl --request DELETE \
  --url 'https://api.uptimetea.com/teams/:id' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_TOKEN'

This endpoint does not require any parameters to send.

This endpoint does not return any response body.

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
404 If team not found

Members API

GET /team/:team_id/members

Get all team members.

curl --request GET \
     --url 'https://api.uptimetea.com/teams/:team_id/members' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN'

This endpoint does not require any parameters to send.

Response body you will receive as JSON:

Body Description
id Unique member identifier
email Member e-mail
first_name First name
last_name Last name
role Role in a team
status Can be invited or joined

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
404 If team is not found

POST /teams/:team_id/members

Add or invite new team member.

curl --request POST \
     --url 'https://api.uptimetea.com/teams/:team_id/members' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN' \
     --data '{"email": "New Team", "role": "viewer"}'

Note, that only users with admin role can add new members.

Params you can send:

Parameters Description
user_id [optional] User ID to add
email [optional] E-mail to invite
role [required] Role admin, manager or viewer

One of the fields user_id or email must be present.

Response body you will receive as JSON:

Body Description
id Unique member identifier
email Member e-mail
first_name First name
last_name Last name
role Role in a team
status Can be invited or joined

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
404 If team is not found
422 If data validation fails

POST /teams/:team_id/members/:id

Update existing team member.

curl --request POST \
     --url 'https://api.uptimetea.com/teams/:team_id/members/:id' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN' \
     --data '{"role": "manager"}'

Note, that user requesting member update must have admin role.

Params you can send:

Parameters Description
role [required] Role admin, manager or viewer

Response body you will receive as JSON:

Body Description
id Unique member identifier
email Member e-mail
role Member role
status Can be invited or joined

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
404 If team is not found
422 If data validation fails

DELETE /teams/:team_id/members/:id

Delete team member.

curl --request DELETE \
  --url 'https://api.uptimetea.com/teams/:team_id/members/:id' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_TOKEN'

Note, that user requesting member removal must have admin role.

This endpoint does not require any parameters to send.

This endpoint does not return any response body.

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
404 If team or member not found

Projects API

GET /teams/:team_id/projects

Get all team projects.

curl --request GET \
     --url 'https://api.uptimetea.com/teams/:team_id/projects' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN'

Params you can send:

Parameters Description
q [optional] Search by title

Response body you will receive as JSON:

Body Description
id Unique project identifier
title Project title
stats Project statistic
stats.watchers_total Total watchers count
stats.watchers_down Down watchers count
stats.watchers_up Up watchers count

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
404 If team is not found

GET /teams/:team_id/projects/:id

Get project details.

curl --request GET \
     --url 'https://api.uptimetea.com/teams/:team_id/projects/:id' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN'

This endpoint does not require any parameters to send.

Response body you will receive as JSON:

Body Description
id Unique project identifier
title Project title
stats Project statistic
stats.watchers_total Total watchers count
stats.watchers_down Down watchers count
stats.watchers_up Up watchers count

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
404 If team or project is not found

POST /teams/:team_id/projects

Create new project.

curl --request POST \
     --url 'https://api.uptimetea.com/teams/:team_id/projects' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN' \
     --data '{"title": "New Project"}'

Params you can send:

Parameters Description
title [required] Title

Response body you will receive as JSON:

Body Description
id Unique team identifier
title Team title
description Team description
role User role in the team
avatar Team avatar (can be empty)
avatar.filename Filename of the avatar uploaded image
avatar.url Full team avatar URL

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
404 If team is not found
422 If data validation fails

POST /teams/:team_id/projects/:id

Update project.

curl --request POST \
     --url 'https://api.uptimetea.com/teams/:team_id/projects/:id' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN' \
     --data '{"title": "Updated Project"}'

Params you can send:

Parameters Description
title [required] Title

Response body you will receive as JSON:

Body Description
id Unique project identifier
title Project title
stats Project statistic
stats.watchers_total Total watchers count
stats.watchers_down Down watchers count
stats.watchers_up Up watchers count

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
404 If team not found
422 If data validation fails

DELETE /teams/:team_id/projects/:id

Delete project.

curl --request DELETE \
  --url 'https://api.uptimetea.com/teams/:team_id/projects/:id' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_TOKEN'

This endpoint does not require any parameters to send.

This endpoint does not return any response body.

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
404 If team or project not found

Watchers API

GET /teams/:team_id/watchers

Get team or project watchers.

curl --request GET \
     --url 'https://api.uptimetea.com/teams/:team_id/watchers' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN'

Params you can send:

Parameters Description
q [optional] Search by title or URL
project_id [optional] Filter by project

Response body you will receive as JSON:

Body Description
id Unique watcher identifier
title Watcher title
engine Check type
status Uptime status: up, down or unknown
status_time Current status time in seconds
team_id Unique team identifier
project_id Unique project identifier

Response HTTP status code you will receive:

HTTP Code Description
200 On success
401 If token is invalid
404 If team is not found

GET /teams/:team_id/watchers/:id

Get watcher details.

curl --request GET \
     --url 'https://api.uptimetea.com/teams/:team_id/watchers/:id' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN'

This endpoint does not require any parameters to send.

Response body you will receive as JSON:

Body Description
id Unique watcher identifier
title Watcher title
engine Check type
status Uptime status: up, down or unknown
status_time Current status time in seconds
team_id Unique team identifier
project_id Unique project identifier

Response HTTP status code you will receive:

HTTP Code Description
200 On success
401 If token is invalid
404 If team is not found

POST /teams/:team_id/watchers

Create new watcher.

curl --request POST \
     --url 'https://api.uptimetea.com/teams/:team_id/watchers' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN' \
     --data '{"project_id": "123", "title": "My watcher", "engine": "http"}'

Params you can send:

Parameters Description
project_id [required] Title
title [required] Title
engine [required] Check engine
settings [required] Engine additional settings

Response body you will receive as JSON:

Body Description
id Unique watcher identifier
title Watcher title
engine Check type
status Uptime status: up, down or unknown
status_time Current status time in seconds
team_id Unique team identifier
project_id Unique project identifier

Response HTTP status code you will receive:

HTTP Code Description
200 On success
401 If token is invalid
404 If team is not found
422 If data validation fails

POST /teams/:team_id/watchers/:id

Update existing watcher.

curl --request POST \
     --url 'https://api.uptimetea.com/teams/:team_id/watchers/:id' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN' \
     --data '{"project_id": "123", "title": "My watcher", "engine": "http"}'

Params you can send:

Parameters Description
project_id [required] Title
title [required] Title
engine [required] Check engine
settings [required] Engine additional settings

Response body you will receive as JSON:

Body Description
id Unique watcher identifier
title Watcher title
engine Check type
status Uptime status: up, down or unknown
status_time Current status time in seconds
team_id Unique team identifier
project_id Unique project identifier

Response HTTP status code you will receive:

HTTP Code Description
200 On success
401 If token is invalid
404 If team is not found
422 If data validation fails

DELETE /teams/:team_id/projects/:id

Delete watcher.

curl --request DELETE \
  --url 'https://api.uptimetea.com/teams/:team_id/watchers/:id' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_TOKEN'

This endpoint does not require any parameters to send.

This endpoint does not return any response body.

Response HTTP status code you will receive:

HTTP Code Description
200 On success
401 If token is invalid
404 If team or project not found

Logs API

GET /teams/:team_id/logs

Get team, project or watchers logs.

curl --request GET \
     --url 'https://api.uptimetea.com/teams/:team_id/logs' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN'

Params you can send:

Parameters Description
incident_id [optional] Search by incident
project_id [optional] Filter by project
watcher_id [optional] Filter by watcher

Response body you will receive as JSON:

Body Description
id Unique log identifier
status Log success status: up or down
explanation Human readable log explanation
details Technical log information
date Log entry creation date
time Log entry creation time
team_id Team identifier
project_id Project identifier

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
404 If team, project or watcher not found

Incidents API

GET /teams/:team_id/incidents

Get incidents list.

curl --request GET \
     --url 'https://api.uptimetea.com/teams/:team_id/incidents' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN'

Params you can send:

Parameters Description
project_id [optional] Filter by project
watcher_id [optional] Filter by watcher

Response body you will receive as JSON:

Body Description
id Unique log identifier
explanation Human readable log explanation
date_down Time incident was registered
date_up Time when incident was resolved
downtime Downtime in seconds

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
404 If team is not found

Notifications API

GET /teams/:team_id/notifications

Get all notifications for a team.

curl --request GET \
     --url 'https://api.uptimetea.com/teams/:team_id/notifications' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN'

Params you can send:

Parameters Description
q [optional] Search by title

Response body you will receive as JSON:

Body Description
id Unique notification identifier
title Notification title
channel Notification channel: api, email
when_notify When to raise notification
settings Additional notification channel settings

Response HTTP status code you will receive:

HTTP Code Description
200 On Success
401 If token is invalid
404 If team is not found

GET /teams/:team_id/notifications/:id

Get notification details.

curl --request GET \
     --url 'https://api.uptimetea.com/teams/:team_id/notifications/:id' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN'

This endpoint does not require any parameters to send.

Response body you will receive as JSON:

Body Description
id Unique notification identifier
title Notification title
channel Notification channel: api, email
when_notify When to raise notification
settings Additional notification channel settings

Response HTTP status code you will receive:

HTTP Code Description
200 On success
401 If token is invalid
404 If team not found

POST /teams/:team_id/notifications

Create new notification.

curl --request POST \
     --url 'https://api.uptimetea.com/teams/:team_id/notifications' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN' \
     --data '{"title": "Notify by E-mail", "channel": "email", "when_notify": "on-failure"}'

Params you can send:

Parameters Description
title [required] Title
channel [required] Notification channel to use
when_notify [required] When to notify
settings [optional] Additional settings

Response body you will receive as JSON:

Body Description
id Unique notification identifier
title Notification title
channel Notification channel: api, email
when_notify When to raise notification
settings Additional notification channel settings

Response HTTP status code you will receive:

HTTP Code Description
200 On success
401 If token is invalid
404 If team is not found
422 If data validation fails

POST /teams/:team_id/notifications/:id

Update existing notification.

curl --request POST \
     --url 'https://api.uptimetea.com/teams/:team_id/notifications/:id' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer YOUR_API_TOKEN' \
     --data '{"title": "Update Notification", "channel": "email", "when_notify": "on-failure"}'

Params you can send:

Parameters Description
title [required] Title
channel [required] Notification channel to use
when_notify [required] When to notify
settings [optional] Additional settings

Response body you will receive as JSON:

Body Description
id Unique notification identifier
title Notification title
channel Notification channel: api, email
when_notify When to raise notification
settings Additional notification channel settings

Response HTTP status code you will receive:

HTTP Code Description
200 On success
401 If token is invalid
404 If team is not found
422 If data validation fails

DELETE /teams/:team_id/notifications/:id

Delete notification.

curl --request DELETE \
  --url 'https://api.uptimetea.com/teams/:team_id/projects/:id' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_TOKEN'

This endpoint does not require any parameters to send.

This endpoint does not return any response body.

Response HTTP status code you will receive:

HTTP Code Description
200 On success
401 If token is invalid
404 If team or notification not found
 
UptimeTea Logo White
Tool to monitor your websites, SAAS, APIs, and other services. With ability inform your team members or managers about the status of your services.
2022 © UptimeTea. All rights reserved.