SalesOS

Errors

One error shape, stable codes, and what to retry.

Every error has the same body:

{
  "statusCode": 403,
  "code": "API_KEY_SCOPE_INSUFFICIENT",
  "message": "This key lacks WRITE_LEADS",
  "timestamp": "2026-10-01T09:30:00.000Z",
  "path": "/v1/leads",
  "requestId": "6f1c..."
}

Branch on code, not on message. Messages are written for people and can change. message is an array when a request fails several validations at once. Quote the requestId when you contact support.

Status codes

StatusMeaningRetry?
400Malformed or invalid request (VALIDATION_RULE_FAILED, STAGE_REQUIREMENTS_NOT_MET, IDEMPOTENCY_KEY_INVALID, …)No. Fix the request
401Missing, invalid, expired or revoked credentialsNo. Fix the credential
403Authenticated but not allowed: scope, plan, Profile, IP allow-list, field-level securityNo
404Not found, or not visible to you. The two are indistinguishable on purposeNo
409Idempotency conflict, or a state conflictSee idempotency
413Payload too large for the endpointNo. Send less
423The record is locked while an approval is pending (RECORD_LOCKED)After the approval completes
429Rate limitedYes, after Retry-After seconds
500Unexpected errorSafe reads: yes, with backoff. Writes: only with an Idempotency-Key
503Temporarily unavailable; carries Retry-After unless the code says otherwise (for example AI_UNAVAILABLE when no AI provider is configured)Yes, after Retry-After

Common codes

CodeStatusMeaning
API_KEY_INVALID401No such key
API_KEY_EXPIRED401Past its expiry, or past a rotation's overlap
API_KEY_REVOKED401Revoked
API_KEY_OWNER_INACTIVE401The key's owner is deactivated
API_KEY_OWNER_NOT_IN_ORG401The owner left the key's organization
ORGANIZATION_SUSPENDED401The key's organization is suspended
API_KEY_IP_NOT_ALLOWED403Request came from outside the key's IP allow-list
API_KEY_SCOPE_INSUFFICIENT403Key lacks the scope this route needs
API_KEY_SCOPE_BLOCKED403Route is never available to keys (/auth, /api-keys, /admin, … — see authentication)
SESSION_REQUIRED403Route needs a signed-in person, not a key or token
API_KEY_RATE_LIMITED429The key's own rate limit is spent
API_KEY_AUTH_THROTTLED429Too many failed key attempts from this IP
FEATURE_ACCESS_DENIED403Your plan doesn't include this feature
FIELD_NOT_EDITABLE403Your Profile can't edit a field you sent
VALIDATION_RULE_FAILED400An org validation rule rejected the save
STAGE_REQUIREMENTS_NOT_MET400Required fields for the target stage are missing (missingFields lists them)
IDEMPOTENCY_KEY_REUSED409Same Idempotency-Key, different request
IDEMPOTENCY_REQUEST_IN_PROGRESS409The original request is still running
RECORD_LOCKED423A pending approval locks the record
BEFORE_SAVE_HOOK_REJECTED400A before-save hook refused the save; message is the hook's
BEFORE_SAVE_HOOK_UNAVAILABLE503A fail-closed hook couldn't be reached
COMPONENT_MANAGED_BY_APP409An installed app manages this component

OAuth token errors use their own codes; see OAuth 2.0.

On this page