Basker Docs

Errors

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

This reference documents all error responses returned by the Partners API, including HTTP status codes, response shapes, and the conditions that trigger each error.

Error response format

All errors follow a consistent JSON structure:

{
  "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)

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 (PATCH/PUT/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

500 Internal Server Error

An unexpected error occurred on the server.

ErrorMessageCause
Server ErrorAn unexpected error occurredAn unhandled exception in the API layer
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