Basker Docs

Errors

Error envelope, common error codes, and how to debug failed requests

Partners API errors contain an error category and a human-readable message. Validation and concurrency failures add fields relevant to the failed operation.

Error response format

A typical route-level error looks like:

{
  "error": "Unauthorized",
  "message": "Valid API key required",
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
FieldTypeAlways presentDescription
errorstringYesShort error category
messagestringYesHuman-readable explanation
requestIdstringMost responsesUnique request identifier (useful for support)
errorsarrayValidation responsesField or operation issues, often with a path and message

HTTP status codes

200 OK

Successful read (GET), update (PATCH, PUT), or delete (DELETE) operation.

201 Created

Successful document creation (POST).

400 Bad Request

The request is malformed or missing required information.

ErrorMessageCause
Missing tenantTenant slug or identifier must be providedNo tenant header (x-basker-tenant-id or x-basker-tenant-slug) and no tenant path segment
Unsupported API versionVersion {version} is not supported. Supported versions: 2025-07, 2026-02The version segment in the URL is not a supported version
Missing resourceProvide a collection path after the tenant segmentThe URL path after the tenant segment is empty
Missing identifierProvide a document id after the collectionA PATCH, PUT, or DELETE request was made without an ID in the path
Invalid JSON bodyRequest body must be valid JSONThe request body for a POST, PUT, or PATCH request is not valid JSON

401 Unauthorized

Authentication failed.

ErrorMessageCause
UnauthorizedValid API key requiredThe Authorization header is missing, does not follow the users API-Key format, or the key does not match any user

403 Forbidden

The request is authenticated but not permitted on this endpoint.

ErrorMessageCause
ForbiddenAPI keys must use the Partners API at /partners/:version/:tenant/*An API key was sent to the native Basker CMS API (/api/) instead of the Partners API (/partners/)

404 Not Found

The requested resource does not exist.

ErrorMessageCause
Tenant not foundUnable to resolve tenant from provided headers or pathThe tenant ID or slug does not match any tenant in the system
Not FoundDocument not found for tenantThe document ID does not exist, does not belong to the resolved tenant, or (on a write using PATCH, PUT, or DELETE) is owned by another member of your tenant group. Shared records are readable across the group but writable only by their owning tenant.
Not FoundRoute not foundThe URL path does not match any registered route

409 Conflict

Block and theme-setting mutations return 409 when the record changed after the ifUpdatedAt value supplied by the client. Refetch the draft and reconcile it before retrying.

422 Unprocessable Entity

Dedicated mutation routes return 422 for unknown block types, fields, settings, guarded fields, or invalid configured values. Use the matching …/schema endpoint to rebuild the request.

429 Too Many Requests

The API key exceeded its current read or write limit. Wait for the number of seconds in Retry-After; see Rate limits.

500 Internal Server Error

An unexpected error occurred on the server.

ErrorMessageCause
Server ErrorUnexpected error while processing the requestAn error during query execution or document processing
Tenant context missingUnable to resolve tenant for this requestInternal error -- tenant context was expected but not available

Errors by scenario

ScenarioStatusErrorMessage
No Authorization header401UnauthorizedValid API key required
Invalid API key401UnauthorizedValid API key required
API key sent to /api/ instead of /partners/403ForbiddenAPI keys must use the Partners API at /partners/:version/:tenant/*
No tenant header or path segment400Missing tenantTenant slug or identifier must be provided
Tenant slug does not exist404Tenant not foundUnable to resolve tenant from provided headers or path
Unsupported API version in URL400Unsupported API versionVersion {version} is not supported...
Document ID not found in tenant404Not FoundDocument not found for tenant
Write against another tenant-group member's record404Not FoundDocument not found for tenant
Invalid URL path404Not FoundRoute not found
Malformed JSON request body400Invalid JSON bodyRequest body must be valid JSON
Server-side exception500Server ErrorAn unexpected error occurred

See also

On this page