Better Stack API

Manage every Better Stack product with one API. Incidents, Telemetry, Errors and AI SRE take the same global API token, and share one request format and one way to page through lists.

Every API in Better Stack

What do you want to manage via API:

  • Incidents API: Monitors, heartbeats, incidents, on-call schedules, escalation policies, severities, status pages, the catalog, metadata, maintenance windows and integrations.
  • Telemetry API: Sources, collectors, dashboards, explorations, alerts, extracted metrics, ClickHouse connections, services, traces and SQL queries.
  • Errors API: Error tracking applications, application groups, errors, error comments and issues, ignored errors, releases, integrations, and the users, sessions and groups real user monitoring sees.
  • AI SRE API: Chats with AI SRE.
  • Teams and account API: Teams, team members, roles, usage and pricing.

Get an API token

Send a token in the Authorization: Bearer $TOKEN header of every request.

  • Global API token: valid across all your teams and every product. Copy an existing one or create a new one in Better Stack β†’ API tokens β†’ Global tokens. When it can reach more than one team, pick the team with the team_id query parameter, like t123.
  • Team-based token: scoped to one team and one application.

Teams, usage and pricing need a global API token.

Requests and responses

Responses follow the JSON:API specification: each record sits under data, with its id as a string and its fields under attributes. To create or update a record, send its attributes at the top level of a JSON request body.

Example cURL to create a monitor
curl --request POST \
  --url "https://incidents.betterstack.com/api/v3/monitors" \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"monitor_type": "status", "url": "https://example.com"}'


Pagination

Lists come in pages of 50 records unless the endpoint says otherwise. Pass per_page for up to 250, and page for a specific page, starting with 1. The response's pagination object holds the URLs of the first, last, prev and next pages, and total_count, the total number of results across all pages. To go through every page, request the URL in pagination.next until it's null.

Example cURL to list the second page of monitors
curl --request GET \
  --url "https://incidents.betterstack.com/api/v3/monitors?page=2&per_page=100" \
  --header "Authorization: Bearer $TOKEN"


OpenAPI

Each API comes with an OpenAPI 3.1 document, to generate a client or to import into tools such as Postman:

Manage Better Stack as code, from terminal, or via an agent

Define your resources in code with Terraform or Pulumi, run commands from your terminal with the CLI, or let your AI assistant work through the MCP server.