Browse the API reference

Reference

Errors

Errors always return JSON with a stable machine-readable code and the request id, which is also echoed in the X-Request-Id response header.

Always log the request id

Every response carries X-Request-Id. Keep it with your logs — it is the fastest way to trace a failed call.
400invalid_body

A POST body was missing or was not valid JSON.

Send Content-Type: application/json with a body such as { "domain": "example.com" }.

400invalid_domain

The supplied domain is not a valid root domain.

Use the bare root domain, lowercase, with no scheme or path.

400invalid_query

A required query parameter was missing or too short.

Check the parameter table for the endpoint — search needs at least 2 characters.

400invalid_id

A path id was not a UUID.

Pass the id exactly as returned by the list endpoint.

401missing_token

No Authorization or X-API-Key header was sent.

Add Authorization: Bearer chs_live_… to the request.

401invalid_token

The token is malformed or unknown.

Create a fresh token on the account page; tokens are shown once at creation.

401revoked_token

The token was revoked by its owner.

Create a new token and update your integration.

403insufficient_scope

A write endpoint was called with a read-only key.

Create a key with the write scope for queueing scans.

404not_found

The domain, platform, scan or endpoint does not exist.

Check the path; list endpoints show every valid value.

404unknown_platform

The platform slug is not one of the tracked programs.

Call GET /platforms for the current slugs.

405method_not_allowed

The HTTP verb is not supported on that path.

Use the verb shown on the endpoint page.

500query_failed

A database query failed while serving the request.

Retry once; if it persists, include the X-Request-Id when reporting it.

500server_error

An unexpected error occurred.

Retry with exponential back-off and report the X-Request-Id.

Error shape
{
  "error": {
    "code": "invalid_token",
    "message": "Unknown API token."
  },
  "request_id": "b2f0c8d1-1f6e-4d0b-9d55-2a9c3b1f77aa"
}