Cronitor API

Errors API

The Errors API manages Error Apps and lets you list, inspect, and triage error groups and individual error events.

Authentication

The Errors API requires API key authentication with error scopes:

  • errors:read - List and retrieve error apps, error groups, and error events
  • errors:write - Create, rename, delete, and rotate keys on error apps, and update error group status

SDK Integration keys include both errors:read and errors:write. Custom API keys must explicitly grant these scopes. For more information, see the API documentation.


Error Apps

Each Error App has an opaque key (app_<16 hex>), a unique name within the organization, an ingest_key, and an ingest_url (the ingest host, e.g. https://cronitor.link). Configure a Cronitor SDK with ingest_key; ingest_url is optional and defaults to https://cronitor.link. SDKs post envelopes to /e on that host.

List and get responses include last_event_at, the time of the app's most recent event in any environment (null if it has none). Callers without the errors:write scope receive a masked ingest_key (first and last 4 characters); create, update, and rotate-key responses, which require errors:write, return the full key.

List Error Apps

GET https://cronitor.io/api/error-apps

Query parameters: page (default 1), pageSize (default 50, max 200).

Create an Error App

POST https://cronitor.io/api/error-apps
curl --user API_KEY: \
    --header "Content-Type: application/json" \
    --request POST \
    --data '{"name": "Billing API"}' \
    https://cronitor.io/api/error-apps

Response (201 Created):

{
  "key": "app_0123456789abcdef",
  "name": "Billing API",
  "ingest_key": "0123456789abcdef0123456789abcdef",
  "ingest_url": "https://cronitor.link",
  "created": "2026-11-26T18:00:00Z",
  "updated": "2026-11-26T18:00:00Z",
  "last_event_at": null
}

Get, Update, or Delete an Error App

GET https://cronitor.io/api/error-apps/:key
PUT https://cronitor.io/api/error-apps/:key
PATCH https://cronitor.io/api/error-apps/:key
DELETE https://cronitor.io/api/error-apps/:key

PUT and PATCH accept {"name": "New Name"}. DELETE returns 204 No Content and also deletes the app's error groups and events. It requires errors:write (an API key with that scope, or a signed-in team member who can write). Readonly users are refused.

Rotate an Error App Ingest Key

POST https://cronitor.io/api/error-apps/:key/rotate-key

Generates a new ingest key and returns the updated Error App with its new ingest_key. The previous key stops accepting events immediately.


Error Groups

Error groups aggregate matching exceptions and capture_message events by fingerprint and have opaque keys (err_<16 hex>). Status (open, resolved, ignored) is tracked per environment.

List Error Groups

GET https://cronitor.io/api/errors

Query parameters:

  • app (string) - Filter by Error App key (app_<16 hex>). Comma-separate to match several, e.g. app_0123456789abcdef,app_fedcba9876543210
  • env (string) - Environment key or name (also accepted as environment). When set, the list includes only groups seen in that environment. status, first_seen, last_seen, event_count, sparkline, and handled are for that environment, orderBy / start / end use that environment's last_seen / first_seen / event_count, a top-level status field is included, and environments lists only that environment. Omit to keep the previous all-environment view.
  • status (string) - Filter by status: open, resolved, or ignored. With env, this is that environment's status.
  • level (string) - Filter by level: fatal, error, warning, info, or debug. Comma-separate to match several, e.g. error,fatal
  • start, end (string) - Filter groups last seen within an ISO-8601 or unix timestamp range. With env, this uses that environment's last_seen.
  • q (string) - Search title, culprit, type, or key
  • orderBy (string) - Sort order: -last_seen (default), last_seen, -first_seen, first_seen, -event_count, event_count
  • page (integer) - Page number (default 1)
  • pageSize (integer) - Results per page (default 50, max 200)

Each group includes handled (the latest event's handled flag, or null if unknown) and a sparkline of 24 equal-width {timestamp, count} buckets spanning start to end. Without start, the window is the 24 hours before end; without end, it ends now.

Get an Error Group

GET https://cronitor.io/api/errors/:key

Query parameters:

  • env (string) - Environment key or name (also accepted as environment). When set, status, first_seen, last_seen, event_count, the 24-hour hourly sparkline, handled, and latest_event are for that environment, and environments lists only that environment. A group with no state in that environment returns 404. Omit to keep the previous all-environment view.

Without env, returns group metadata, per-environment statuses (environments), event_count, a 24-hour hourly sparkline (including zero-count hours), the latest event's handled flag, and latest_event with its scrubbed payload.

For capture_message events (where no exception was thrown), exception is null while message, level, extra, and fingerprint_parts are returned directly.

Update Error Group Status

PATCH https://cronitor.io/api/errors/:key

Request body:

  • status (string, required) - open, resolved, or ignored
  • env (string, optional) - Environment key or name (also accepted as environment). When set, only that environment's status is updated and the response is scoped to it (top-level status, counts, and a single-item environments list). Omit to update all environments for the group and return the all-environment view.
curl --user API_KEY: \
    --header "Content-Type: application/json" \
    --request PATCH \
    --data '{"status": "resolved", "env": "production"}' \
    https://cronitor.io/api/errors/:key

Error Events

List Events for an Error Group

GET https://cronitor.io/api/errors/:key/events

Query parameters:

  • env (string) - Filter by environment key or name
  • app (string) - Filter by Error App key (app_<16 hex>)
  • cursor (string) - Compound pagination cursor (<stamp>:<event_id>) from next_cursor
  • limit (integer) - Maximum events to return (default 50, max 200)

Returns {data, next_cursor, has_more}.

Get a Single Error Event

GET https://cronitor.io/api/errors/:key/events/:event_id

Returns the full event metadata and scrubbed payload for a 32-hex event_id.


MCP Tools

The Cronitor MCP server exposes nine error-tracking tools:

ToolScopePurpose
list_errorserrors:readList and filter error groups
get_errorerrors:readInspect group details, 24h sparkline, and trimmed latest event
list_error_eventserrors:readPaginate events in a group with compound cursors
get_error_eventerrors:readInspect a single event with trimmed stacktraces and breadcrumbs
list_error_appserrors:readList Error Apps and their ingest keys (masked without errors:write)
update_errorerrors:writeResolve, ignore, or reopen a group
create_error_apperrors:writeCreate a new Error App and return its ingest key
rotate_error_app_keyerrors:writeRotate an Error App's ingest key and return the updated app
delete_error_apperrors:writeDelete an Error App, its groups, and its events

MCP event responses strip sensitive request headers, cookies, and request bodies, cap stack frames and breadcrumbs, and bound the JSON response to 32 KB.

Previous
Sites (RUM)