◉
24observe
DOCUMENTATION • ERROR CODES • REFERENCE

Stable error codes. A fix for each one.

The API names its failures with stable codes, so your integration, or your agent, can decide what to do next without parsing a sentence.

Open the interactive reference → Endpoint index

TL;DR

A failed request returns a JSON body with a human-readable error and, in most cases, a stable code. Branch on the code when it is there and on the HTTP status when it is not. The message is written for people and may be reworded; a code is a contract and will not be. This page lists the 113 codes of the public API.

The shape

One envelope for failures.

A failure answers with a JSON body: a message, and a code that names the cause.

HTTP/1.1 409 Conflict
Content-Type: application/json

{
  "error": "A project with this slug already exists",
  "code": "PROJECT_SLUG_DUPLICATE"
}

A few responses carry the message alone, with no code: a request refused because of the caller's role, and some lookups for a resource that does not exist. The HTTP status is the signal there. Sensor host routes name the text message instead of error.

When a request fails validation, the body also carries fields: one entry per problem, each naming the path that was wrong. The same list is repeated under issues for older clients.

HTTP/1.1 400 Bad Request
Content-Type: application/json

{
  "error": "Validation failed",
  "code": "VALIDATION_FAILED",
  "fields": [
    { "path": "name", "code": "required", "message": "must have required property 'name'" }
  ]
}
4xx
The request needs to change. Do not retry it as it is. The exceptions are 429, where you wait and retry, and 409 IDEMPOTENCY_IN_PROGRESS, where the first copy of the request is still running.
429
A rate limit or a plan allowance. Rate limits clear on their own: honor Retry-After when the response carries it. A usage allowance resets at the start of the next calendar month (UTC) or with an upgrade, so retrying sooner will not help.
5xx
The failure is on our side or in a service the request depends on. Retry with backoff. Send an Idempotency-Key on writes so a retry cannot apply twice.
const res = await fetch(url, { method: 'POST', headers, body });
if (!res.ok) {
  const { code, error, fields } = await res.json();
  switch (code) {
    case 'VALIDATION_FAILED':
      // Fix the request. fields[] names each bad path.
      throw new Error(fields.map((f) => f.path + ': ' + f.message).join('; '));
    case 'RATE_LIMITED':
    case 'PLAN_RATE_LIMIT_EXCEEDED':
      // Wait, then try again.
      await sleep(Number(res.headers.get('Retry-After') ?? 1) * 1000);
      return retry();
    case 'PAT_SCOPE_INSUFFICIENT':
      // Retrying will not help. The token needs another scope.
      throw new Error('Token is missing a scope: ' + error);
    default:
      // Some responses carry no code. Fall back to the HTTP status.
      throw new Error((code ?? res.status) + ': ' + error);
  }
}

Authentication and tokens

CodeStatusWhat it means and what to do
EXPIRY_IN_PAST 400 expiresAt must be in the future.
EXPIRY_TOO_FAR 400 expiresAt cannot be more than 365 days away.
SCOPES_REQUIRED 400 A new token must name its scopes. Choose the least-privilege set, or pass ["*"] deliberately for full access.
UNAUTHORIZED 401 No credential, an invalid or revoked one, or the holder is no longer a member of the organization. Send a valid bearer token.
FORBIDDEN 403 A 403 that no more specific code covers. A request refused because of the caller’s role may carry only the error message and no code, so treat any 403 as a permission problem.
INTERACTIVE_SESSION_REQUIRED 403 Linking a login identity and changing multi-factor settings need a signed-in session. API tokens cannot do either.
PAT_PRIVILEGED_ROLE 403 A scoped token can only lower a member or viewer role. Granting privilege, or changing an admin or owner, needs a full-access token or an interactive session.
PAT_SCOPE_ESCALATION 403 A scoped token tried to mint a token with scopes it does not hold itself. Request a subset of its own scopes.
PAT_SCOPE_INSUFFICIENT 403 The token lacks the scope this route needs, or the route needs a full-access token. Do not retry; mint a token with the right scope.
AUTH_FAILURE_RATE_LIMIT 429 Too many failed authentication attempts from this address. Fix the credential, then retry shortly.

Plans, quotas and rate limits

CodeStatusWhat it means and what to do
PLAN_INTERVAL_TOO_LOW 400 The check interval is below the plan minimum.
ENDPOINT_LIMIT_REACHED 402 The plan limit on connected hosts, agents and sources is reached. Remove one or upgrade.
SEAT_LIMIT_REACHED 403 No free seat of that role on the current plan. Free a seat, choose another role, or upgrade.
CH_QUOTA_EXCEEDED 429 A search exceeded the plan per-query memory or time cap. Narrow the time range, add a filter, or upgrade.
PAT_DAILY_LIMIT_EXCEEDED 429 This token reached its own daily mutation or log-volume cap. It resets at midnight UTC.
PLAN_LIMIT_LOGS_VOLUME 429 Log ingest for this calendar month (UTC) reached the plan’s hard limit: the included volume on Free, or three times the included volume on a paid plan, where usage above the included volume is billed as overage. Upgrade, or resume on the first of the month.
PLAN_LIMIT_METRICS_VOLUME 429 The monthly ingest allowance, shared by logs, metrics and traces, is used up.
PLAN_LIMIT_MONITORS 429 Creating these monitors would exceed the plan allowance.
PLAN_RATE_LIMIT_EXCEEDED 429 The plan-level API rate limit (requests per minute) is reached. Slow down or upgrade.
RATE_LIMITED 429 A request-rate window is exhausted. Wait for Retry-After when the response carries it, otherwise back off and retry.

Request shape

CodeStatusWhat it means and what to do
BAD_COMPRESSED_BODY 400 The body declared a Content-Encoding but the compressed payload was corrupt or truncated. Re-encode and retry.
BAD_JSON 400 The body is not valid JSON.
BAD_REQUEST 400 The request is malformed in a way no more specific code covers. Read the error message.
BAD_TIME_RANGE 400 The time range is invalid, for example a start after the end.
IDS_INVALID 400 The ids query parameter holds no valid ids.
IDS_REQUIRED 400 The ids query parameter is missing.
IDS_TOO_MANY 400 More than 100 ids in one call. Split the request.
INVALID_TIME_WINDOW 400 fromMs must be earlier than toMs.
VALIDATION_FAILED 400 The body or query failed validation. The fields[] array names each offending path.
WINDOW_TOO_LARGE 400 The analytics window is longer than 31 days. Query a shorter span.
NOT_FOUND 404 No such route, including a known path called with the wrong method. Some resource lookups return it too; others answer 404 with the error message alone.
CONFLICT 409 The change collides with existing state, such as a name or address already in use.
PAYLOAD_TOO_LARGE 413 The body is over the size limit for this route. Send smaller batches.
UNSUPPORTED_MEDIA_TYPE 415 The Content-Type is not one this route accepts.

Idempotency

CodeStatusWhat it means and what to do
IDEMPOTENCY_KEY_TOO_LONG 400 The key is longer than 255 characters.
IDEMPOTENCY_IN_PROGRESS 409 A request with this Idempotency-Key is still running. Back off and retry in a few seconds.
IDEMPOTENCY_KEY_REPLAY_CONFLICT 409 This key was already used with a different body. Use a new key for a new request.

Projects

CodeStatusWhat it means and what to do
PROJECT_FILTER_INVALID 400 The project filter must be a project id or the word none. Incidents, tokens, logs and metrics report the same mistake as VALIDATION_FAILED.
PROJECT_LIMIT_REACHED 400 The organization already has 50 projects.
PROJECT_NOT_FOUND 400 / 404 With 400: a projectId, project filter, or reassignTo value names a project that is not in your organization. With 404: the project id in the path of a /projects route does not exist.
PROJECT_REASSIGN_SELF 400 reassignTo cannot be the project being deleted.
PROJECT_NOT_EMPTY 409 The project still owns resources. Pass reassignTo with another project id, or null to leave them unassigned.
PROJECT_SLUG_DUPLICATE 409 A project with this slug already exists.

Team and account

CodeStatusWhat it means and what to do
GENAI_PRICING_INVALID 400 One or more AI model pricing overrides failed validation.
ORG_DELETE_CONFIRM_MISMATCH 400 The confirmation text does not match the organization slug.
PASSWORD_REQUIRED 400 Accepting this invite creates a new account, so a password is required.
REDACTION_RULES_INVALID 400 One or more log-redaction rules failed validation.
SSO_SECRET_REQUIRED 400 A new single sign-on connection needs its client secret.
NO_ORGANIZATION 403 The account is not part of any organization. Ask an admin for a new invite.
OWNER_ONLY 403 Only an owner can grant the owner role, change an owner, or remove one.
ALREADY_IN_ANOTHER_ORG 409 The invited email already belongs to another organization. They need to leave it before joining yours.
NO_OTHER_AUTH 409 Disconnecting this sign-in provider would lock the account out. Set a password or link another provider first.
NO_PASSWORD_SET 409 The account has no password yet. Set one through the password-reset flow first.

Sign-in and multi-factor

CodeStatusWhat it means and what to do
MFA_CODE_INVALID 400 The authentication code is wrong or expired.
MFA_NOT_ENABLED 400 Multi-factor authentication is not on for this account.
MFA_NOT_PENDING 400 There is no enrollment in progress to confirm. Start enrollment first.
MFA_INVALID 401 The multi-factor code at sign-in is wrong or expired.
MFA_REPROOF_FAILED 401 The password or code given to confirm a multi-factor change is wrong.
MFA_REQUIRED 401 The account uses multi-factor authentication. Send the code with the sign-in request.
EMAIL_NOT_VERIFIED 403 Verify the email address before signing in.
MFA_ALREADY_ENABLED 409 Multi-factor authentication is already on for this account.
REGISTRATION_BLOCKED 409 The account could not be created. If the email is yours, sign in or reset the password.
REGISTRATION_CONFLICT 409 The account could not be created this time. Try again.
OAUTH_NOT_CONFIGURED 503 This sign-in provider is not enabled on this deployment.

Monitors and on-call

CodeStatusWhat it means and what to do
BAD_RANGE 400 An on-call rotation must start before it ends.
BULK_EMPTY_PATCH 400 The bulk update names no field to change.
BULK_VALIDATION_FAILED 400 One or more monitors in the batch failed validation. Nothing was written.
ESCALATION_POLICY_FORBIDDEN 400 escalationPolicyId is not a policy in your organization.
MONITOR_TARGET_UNSAFE 400 The monitor target resolves to a private, loopback, or metadata address, or does not resolve at all.
NOT_HEARTBEAT 400 This action only applies to heartbeat monitors.
SENSOR_HOST_FORBIDDEN 400 sensorHostId is not a host in your organization.
STEP_TARGET_FORBIDDEN 400 An escalation step targets a schedule or user outside your organization.
USER_NOT_IN_ORG 400 The user named in the on-call rotation is not a member of your organization.
MONITOR_NAME_DUPLICATE 409 A monitor with this exact name already exists. Pick a distinct name.

Detections and cases

CodeStatusWhat it means and what to do
ASSIGNEE_NOT_IN_ORG 400 The assignee is not a member of your organization.
CORRELATION_PREDICATE_ERROR 400 A correlation rule predicate is invalid.
INCIDENT_NOT_FOUND 400 An incident named in the request does not exist in your organization.
LOG_ALERT_KIND_MISMATCH 400 The rule mixes threshold fields with anomaly fields. Send only the fields for its kind.
LOG_ALERT_KQL_PARSE_ERROR 400 The rule query could not be parsed.
LOG_ALERT_NO_PREDICATE 400 A threshold rule needs at least one of query, kql, service, or level.
UNKNOWN_DETECTION_PACK 400 No detection pack has that name. The message lists the available packs.
CASE_CLOSED 409 The case is closed. Reopen it before attaching incidents.
CASE_KEY_CONFLICT 409 Another open case already covers this group of incidents. Work in that case, or close it first.

Ingest sources and sensors

CodeStatusWhat it means and what to do
BAD_BODY 400 The body could not be parsed in the format the source declares.
NO_SAMPLE 400 Mapping needs a sample event, and none was sent or stored.
UNKNOWN_PRESET 400 No ingest preset has that name.
SOURCE_EXISTS 409 An ingest source with this key already exists.
BAD_MAPPING 502 AI-assisted mapping returned a malformed result. Retry, or supply the mapping yourself.
LLM_ERROR 502 AI-assisted mapping failed this time. Retry, or supply the mapping yourself.
NO_MAPPING 502 AI-assisted mapping returned nothing usable. Retry, or supply the mapping yourself.
LLM_UNAVAILABLE 503 AI-assisted mapping is not enabled on this deployment. Supply the mapping yourself.

Alert channels and webhooks

CodeStatusWhat it means and what to do
ALERT_URL_BLOCKED 400 An alert URL resolves to a private, loopback, or metadata address, or does not resolve at all.
ALERT_URL_INVALID 400 An alert URL is malformed or not http(s).
WEBHOOK_URL_UNRESOLVABLE 400 The webhook hostname does not resolve. Check the name; it may also be a temporary DNS failure.
WEBHOOK_URL_UNSAFE 400 The webhook URL resolves to a private, loopback, link-local, or metadata address.

Status pages

CodeStatusWhat it means and what to do
DOMAIN_RESERVED 400 That custom domain is reserved and cannot be used.
INVALID_IP_ALLOWLIST 400 One or more allowlist entries are not valid IP addresses or CIDR ranges.
SLUG_TAKEN 409 A new status page asked for a slug another page already uses. A custom domain already in use returns CONFLICT.

Context graph

CodeStatusWhat it means and what to do
GRAPH_ERROR 502 The graph query failed. Retry shortly.
GRAPH_UNREACHABLE 502 The context graph did not answer. Retry shortly.
GRAPH_UNAVAILABLE 503 The context graph is not enabled on this deployment.

Billing

CodeStatusWhat it means and what to do
BILLING_UNKNOWN_PLAN 400 No plan has that name.
BILLING_NO_CUSTOMER 404 There is no billing account yet. Subscribe to a paid plan first.
BILLING_CHECKOUT_FAILED 502 The checkout session could not be created. Retry shortly.
BILLING_PORTAL_FAILED 502 The billing portal could not be opened. Retry shortly.
BILLING_DISABLED 503 Billing is not enabled on this deployment.

Server

CodeStatusWhat it means and what to do
INTERNAL_ERROR 500 Something failed on our side. Retry with backoff.
SERVICE_UNAVAILABLE 503 The service is briefly unable to authenticate requests. Retry with backoff.

Per-event results

Log ingest accepts a batch and answers 202 even when it sets individual events aside. Those events come back in the response's rejected list as { index, reason }. The reason is text for people; in the two cases below it starts with the code. The rest of the batch was stored.

CodeStatusWhat it means and what to do
LOG_ENTROPY_REJECTED 202 The event looked like base64, encrypted, or packed binary data. Send structured text or JSON; keep binary payloads in object storage.
DUPLICATE 202 The same event_id arrived twice within 60 seconds. The first copy was kept, so this is safe to ignore. The Logs-Deduped response header counts them.
Good practice

Error handling that holds up.

Branch on the code
Match the code, never the message text. Messages are for people and can be reworded.
Expect new codes
New features add codes. Give your handler a default branch that falls back to the HTTP status.
Retry the right things
Retry rate-limit 429s and 5xx with backoff. A plan-allowance 429 clears with time or an upgrade, not a retry. Fix and resend everything else.
Make writes repeatable
Send an Idempotency-Key on every write, so a retry after a timeout cannot create a duplicate.
Show the message
Log the code and surface the error text to your user or agent. It says what to change.

Ready to build with 24Observe?

Explore live telemetry, zero-friction integration, and automated SOC investigation.

+ Get Free Trial / Demo