Errors

The error envelope and every stable error code.

All errors use one envelope with a stable machine-readable code:

{
  "error": {
    "code": "validation_error",
    "message": "term: String must contain at least 2 character(s)"
  }
}

Codes

CodeStatusWhen
unauthorized401Missing or invalid API key
validation_error400Request body or query failed schema validation
invalid_cursor400Pagination cursor is malformed or expired
not_found404Resource does not exist or belongs to another org
duplicate_keyword409A keyword with the same normalized term already exists
keyword_limit_reached402Creating or unmuting the keyword would exceed your plan's limit
invalid_signature401Webhook signature verification failed (Polar webhook endpoint only)
billing_not_configured503Billing endpoints called on a deployment without billing credentials
slack_not_configured503Slack endpoints called on a deployment without Slack app credentials
slack_not_connected404Slack action attempted before connecting a workspace (or after the token was revoked)
internal_error500Unexpected server error

Handle errors by branching on error.code, not on the message; messages can change, codes will not.

On this page