Login

Errors

Every error returned by the /v1 API uses a consistent JSON envelope containing a machine-readable code, human-readable message, optional details, and a request_id (also returned in the X-Request-Id response header).

Status codes

  • Name
    2xx
    Description

    Success (200 OK, 201 Created, 202 Accepted for async jobs).

  • Name
    400 / 422
    Description

    BAD_REQUEST or VALIDATION_ERROR — check the details array for field-level issues.

  • Name
    401
    Description

    UNAUTHORIZED or TOKEN_EXPIRED — missing, revoked, or expired Bearer API key.

  • Name
    402
    Description

    POST_LIMIT_REACHED / SUBSCRIBER_LIMIT_REACHED — plan quota exceeded.

  • Name
    403
    Description

    INSUFFICIENT_SCOPE, TENANT_MISMATCH, FORBIDDEN_ROLE, or PLAN_UPGRADE_REQUIRED.

  • Name
    404
    Description

    NOT_FOUND — resource does not exist or belongs to another publication.

  • Name
    409
    Description

    REVISION_CONFLICT, IDEMPOTENCY_CONFLICT, or SLUG_EXISTS.

  • Name
    429
    Description

    RATE_LIMIT_EXCEEDED — back off using the Retry-After header.

  • Name
    5xx
    Description

    INTERNAL_ERROR — unexpected server error; include request_id when contacting support.


Error response format

Never rely on internal stack traces. All /v1 failures share the exact structure shown on the right.

  • Name
    error.code
    Type
    string
    Description

    Stable machine-readable identifier (e.g., INSUFFICIENT_SCOPE, TENANT_MISMATCH).

  • Name
    error.message
    Type
    string
    Description

    Clear explanation of what went wrong and how to fix it.

  • Name
    error.details
    Type
    object | array
    Description

    Optional structured context, such as validation errors or required vs. granted scopes.

  • Name
    error.request_id
    Type
    string
    Description

    Unique correlation ID for debugging and support.

{
  "error": {
    "code": "INSUFFICIENT_SCOPE",
    "message": "Missing required scope(s): posts:write",
    "details": {
      "required": ["posts:write"],
      "granted": ["posts:read", "analytics:read"]
    },
    "request_id": "req_9f4e2a8c7b120d31e5a12345"
  }
}