Public API
Use the Spectate public API to manage your team from scripts, CI pipelines and other tools. It covers monitors, hosts, domains, projects, alerting, on-call, incidents, status pages, members and billing information. Every endpoint, with its parameters and responses, is in the API reference.
Code
Make your first request
- Create a team API token with the
monitors:readability. - Send it as a bearer token:
Code
The response lists the monitors of the team that owns the token. To check a token and see its abilities, call GET /v1/token.
Requests and responses
- Send JSON request bodies with
Content-Type: application/json. Every response is JSON, errors too. - IDs are UUIDs. Times are ISO 8601 in UTC, for example
2026-10-25T14:03:00+00:00. PATCHchanges only the fields that you send. To clear a field that can be empty, sendnull.- The API never returns secrets that you send, such as passwords and webhook secrets.
Pagination, filters and sorting
List endpoints return pages of results. Use page (from 1) and per_page (1 to 100, default 25).
| Response field | Meaning |
|---|---|
data | The items on this page. |
current_page, last_page | The page number and the number of the last page. |
per_page, total | Items per page and the total number of items. |
from, to | The positions of the first and the last item on this page. |
Filter with filter[name]=value. Sort with sort=field, or sort=-field for descending order. Each list endpoint in the reference shows its filters and sort fields.
Code
Errors
Every error has the same shape:
Code
Use error.code in your code. It does not change. error.message is for people and can change. Some errors add error.details. For example, a 422 lists the invalid fields in error.details.errors.
| Status | Codes | Meaning |
|---|---|---|
400 | INVALID_QUERY | The query is not correct, for example an unknown filter or sort field. |
401 | UNAUTHENTICATED, INVALID_TOKEN, TOKEN_EXPIRED | No token, or the token is not valid, revoked or expired. |
403 | FORBIDDEN, PLAN_LIMIT_REACHED, PLAN_FEATURE_UNAVAILABLE, TEAM_PENDING_DELETION, TEAM_SUSPENDED | The token does not have the ability, the plan does not allow it, or the team is being deleted or is suspended. |
404 | RESOURCE_NOT_FOUND, NOT_FOUND | The resource is not in this team, or the endpoint does not exist. |
409 | CONFLICT | The request conflicts with the current state. |
422 | VALIDATION_FAILED | The request body is not valid. |
429 | RATE_LIMITED | Too many requests. See the next section. |
5xx | INTERNAL_ERROR | A problem on our side. Try again later, with a longer wait each time. |
Rate limits
Each token can send 300 requests a minute. Of these, 60 can change something (POST, PUT, PATCH and DELETE). Each response has the headers X-RateLimit-Limit and X-RateLimit-Remaining. When a token is over the limit, the API returns 429 with a Retry-After header in seconds.
Versioning
This is version 1 of the API, under /v1. In version 1, changes only add things: new endpoints, new optional request fields, new response fields and new enum values. Your code must accept fields and enum values that it does not know. A change that can break a client comes in a new version. We announce a new version before we remove the old one.
OpenAPI document
The API reference comes from an OpenAPI 3.1 document. Use it to generate a client or to import the API into a tool:
- Download the OpenAPI document
- The API reference as one Markdown file, for AI assistants and offline reading
Related
Create tokens with only the abilities that a script needs.
Every endpoint, with examples in cURL, JavaScript, Python, PHP and Go.