Spectate API

Spectate API

Manage your Spectate team from code: monitors, hosts, domains, projects, alerting, on-call, incidents and status pages. This API backs the official SDKs and the Terraform provider; everything they do, you can do with plain HTTP.

Authentication

Every request sends a team API token as a bearer token:

Code
GET /v1/token HTTP/1.1 Host: api.spectate.net Authorization: Bearer spct_…

Owners and managers create tokens in the dashboard under Team → API tokens. A token:

  • belongs to the team, not to the member who created it, and keeps working when that member leaves;
  • can only do what its abilities allow, for example monitors:read or incidents:write. Each endpoint lists the ability it requires. There is no wildcard: a token never gains an ability it wasn't created with;
  • is shown once. Spectate stores only a hash of it; lost tokens can't be recovered, only regenerated or revoked;
  • may expire. Revoked and expired tokens stop working immediately.

Tokens look like spct_ followed by 46 letters and digits, the last 6 of which are a checksum, so secret scanners can recognise them. Call GET /v1/token to check a token and see its abilities.

Requests and responses

  • Send and expect JSON. Request bodies are application/json; responses are always JSON, also for errors.
  • IDs are UUIDs. Timestamps are ISO 8601 in UTC, for example 2026-10-25T14:03:00+00:00.
  • PATCH changes only the fields you send. Fields you leave out keep their value; send null to clear a nullable field.
  • Secrets you send (passwords, webhook secrets) are never returned.

Pagination

List endpoints are paginated with page (from 1) and per_page (1–100, default 25). The response has the items in data, plus current_page, last_page, per_page, total, from, to and the URLs of the neighbouring pages. Filters use filter[name]=value; sorting uses sort=field (ascending) or sort=-field (descending).

Errors

Every error has the same shape:

JSONCode
{ "error": { "code": "RESOURCE_NOT_FOUND", "message": "Monitor not found." } }

Branch on error.code, which is stable; error.message is for people and may change. Some codes add error.details. Validation errors (422, VALIDATION_FAILED) list the invalid fields in error.details.errors.

StatusMeaning
400The query is malformed (INVALID_QUERY), for example an unknown filter or sort.
401No token, or the token is invalid, revoked or expired.
403The token lacks an ability (FORBIDDEN), the plan doesn't allow it (PLAN_LIMIT_REACHED, PLAN_FEATURE_UNAVAILABLE), or the team is being deleted or suspended.
404No such resource in this team (RESOURCE_NOT_FOUND) or no such endpoint (NOT_FOUND).
409The request conflicts with the current state, for example enabling monitoring on a paused team.
422The request body is invalid (VALIDATION_FAILED).
429Rate limited (RATE_LIMITED); see below.
5xxSomething went wrong on our side (INTERNAL_ERROR). Retry with backoff.

Rate limits

Each token may make 300 requests a minute, of which 60 may change something (POST, PUT, PATCH, DELETE). Responses carry X-RateLimit-Limit and X-RateLimit-Remaining; when you're over, the API answers 429 with a Retry-After header in seconds.

Versioning

This is version 1, under /v1. Within it, changes are additive only: new endpoints, new optional request fields, new response fields and new enum values. Treat unknown fields and enum values as possible. Anything that would break a client gets a new version, announced well before the old one is retired.

Tags
API tokens
Check the token you authenticate with. Tokens themselves are created, regenerated and revoked in the dashboard (Team → API tokens) by owners and managers, never through the API.
Monitors
Uptime monitors check a URL, host, port or DNS name from Spectate's regions every interval, and raise alerts when it goes down, gets slow or its certificate is about to expire. Monitors and hosts together count against the plan's resource limit.
Hosts
Servers with the Spectate agent, which reports CPU, memory, disk and network metrics every minute. Hosts register themselves when the agent is installed with an install token; the API reads, renames, assigns and deletes them. Hosts and monitors together count against the plan's resource limit.
Host install tokens
Tokens the agent's installer uses to register servers as hosts of the team. One token can register a whole fleet until it expires after 7 days or is revoked; hosts that registered keep reporting either way.
Metric conditions
Alert rules for host metrics, such as "disk usage above 90% for 10 minutes". A condition applies to the hosts it names and to every host of the projects it names; when it holds for its duration, it raises an alert with its severity on the host.
Domains
Domain registrations Spectate watches at their registry (RDAP or WHOIS): it alerts before a domain expires and, optionally, when its registrar, nameservers or DNSSEC keys change. The plan limits the number of domains.
Projects
Projects group monitors and hosts, for example per product or environment, and give them shared escalation paths. Every team has a default project that new monitors and hosts join when no project is given.
Channels
Where alerts are delivered: email, Slack, Discord, Microsoft Teams, Telegram, webhooks, Pushover, SMS and voice calls. Escalation paths send to channels. A channel that keeps failing is turned off automatically; a successful test turns it back on.
Escalation paths
What happens when an alert fires: notify channels, page whoever is on call, declare an incident, wait, or branch on severity, source, labels or working hours, step by step until someone acknowledges the alert. Paths are trees: a branch step ends its list of steps and continues in its then and else steps. The dashboard shows the same paths in its flow editor.
Alert sources
External tools that fire and resolve alerts in Spectate: Prometheus Alertmanager, Grafana, Sentry, email, or your own scripts through a webhook. Each source has its own secret URL (and email address); its alerts follow its escalation paths.
Alerts
Problems Spectate or an alert source detected. An alert escalates along its escalation path until someone acknowledges it, and resolves on its own when the problem is over, or when someone resolves it by hand. Resolved alerts can be deleted. Alerts can lead to incidents.
On-call
Who gets paged when an escalation path's notify_on_call step runs. A schedule has rotation layers, where members take turns, and overrides, where someone covers for a while. Overrides win over every layer; where layers overlap, the top one wins. On-call is part of the Team plan and up.
Incidents
Problems that affect customers, worked on by the team: declare one, post updates as you learn more, assign a commander and a communications lead, resolve it and write the postmortem. Changes show in the incident's Slack channel and timeline, named after the API token that made them. Publish to status pages with publishIncidentStatusPageUpdate.
Status pages
Public pages that show the status of your components, your incidents and scheduled maintenance, on <slug>.spectate.page or your own domain. Visitors can subscribe to updates by email and report problems. The plan limits the number of pages; private pages, password protection and custom domains depend on the plan too. Logos and the favicon are uploaded in the dashboard.
Status page components
The parts of your service a status page shows, such as "API" or "Dashboard", optionally in groups. A component's status is derived: the worst ongoing impact of an unresolved incident, then maintenance, else operational. A component can follow a monitor for its uptime history, and with monitor automation the monitor's downtime opens an incident on the page.
Scheduled maintenance
Planned maintenance announced on a status page. While it is in progress, its components show as under maintenance. An automatic maintenance starts and completes on schedule by itself; a manual one changes when you set its status. Subscribers are emailed when it is scheduled, starts and completes.
Status page incidents
Incidents as visitors of a status page read them, with their updates. How an incident affects components is a timeline of impact periods, which drives each component's status and uptime history. Publishing an update sets the impacts as of then; you can also edit the periods directly. Monitor automation opens and resolves incidents for components that follow a monitor, until someone takes over by posting an update. The team's own incidents publish here with publishIncidentStatusPageUpdate.
Status page subscribers
People who subscribed to a status page's updates by email, from the page itself. A subscription is confirmed by double opt-in; only confirmed subscribers are emailed. Subscribers can't be added through the API.
Status page issue reports
Problems visitors reported from a status page, when the page has issue reports on. Reports above the page's threshold can show a notice on the page and fire an alert.
Team
The team the API token belongs to: its name, time zone, plan and whether monitoring runs. Deleting the team and changing billing happen in the dashboard.
Members
The people in the team and their roles. Members join by accepting an invite. Use member IDs in on-call rotations and incident roles.
Invites
Invites to join the team, sent by email. The invitee accepts in the dashboard, signed in with that address, and gets the invite's role. Invites expire after 7 days. Pending invites count towards the plan's member limit.
Billing
The team's plan, subscription, notification credits and how much of the plan's limits it uses. Read only: subscriptions and credit packs are bought and changed in the dashboard. Needs billing:read, which only owners and billing members can grant.