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 eventserrors: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_fedcba9876543210env(string) - Environment key or name (also accepted asenvironment). When set, the list includes only groups seen in that environment.status,first_seen,last_seen,event_count,sparkline, andhandledare for that environment,orderBy/start/enduse that environment'slast_seen/first_seen/event_count, a top-levelstatusfield is included, andenvironmentslists only that environment. Omit to keep the previous all-environment view.status(string) - Filter by status:open,resolved, orignored. Withenv, this is that environment's status.level(string) - Filter by level:fatal,error,warning,info, ordebug. Comma-separate to match several, e.g.error,fatalstart,end(string) - Filter groups last seen within an ISO-8601 or unix timestamp range. Withenv, this uses that environment'slast_seen.q(string) - Search title, culprit, type, or keyorderBy(string) - Sort order:-last_seen(default),last_seen,-first_seen,first_seen,-event_count,event_countpage(integer) - Page number (default1)pageSize(integer) - Results per page (default50, max200)
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 asenvironment). When set,status,first_seen,last_seen,event_count, the 24-hour hourlysparkline,handled, andlatest_eventare for that environment, andenvironmentslists only that environment. A group with no state in that environment returns404. 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, orignoredenv(string, optional) - Environment key or name (also accepted asenvironment). When set, only that environment's status is updated and the response is scoped to it (top-levelstatus, counts, and a single-itemenvironmentslist). 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 nameapp(string) - Filter by Error App key (app_<16 hex>)cursor(string) - Compound pagination cursor (<stamp>:<event_id>) fromnext_cursorlimit(integer) - Maximum events to return (default50, max200)
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:
| Tool | Scope | Purpose |
|---|---|---|
list_errors | errors:read | List and filter error groups |
get_error | errors:read | Inspect group details, 24h sparkline, and trimmed latest event |
list_error_events | errors:read | Paginate events in a group with compound cursors |
get_error_event | errors:read | Inspect a single event with trimmed stacktraces and breadcrumbs |
list_error_apps | errors:read | List Error Apps and their ingest keys (masked without errors:write) |
update_error | errors:write | Resolve, ignore, or reopen a group |
create_error_app | errors:write | Create a new Error App and return its ingest key |
rotate_error_app_key | errors:write | Rotate an Error App's ingest key and return the updated app |
delete_error_app | errors:write | Delete 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.