Skip to content

Errors & status codes ​

The Diggama API uses standard HTTP status codes and returns JSON error responses.

Success codes ​

StatusDescriptionUsed by
200 OKRequest succeededGET, PUT, PATCH, bulk update/delete/publish/unpublish
201 CreatedResource createdPOST, bulk create when every item succeeds
204 No ContentResource deletedDELETE
207 Multi-StatusSome items failedBulk create only

Error response format ​

Every V2 error returns an error object:

json
{
  "error": {
    "code": "RESOURCE_NOT_FOUND",
    "message": "The requested resource was not found.",
    "details": [],
    "timestamp": "2026-02-07T12:00:00+00:00",
    "request_id": "9b2f4c1e-6a7d-4f3b-8e21-0c5d9a7b1f42"
  }
}
KeyDescription
codeStable, machine-readable error code (see below)
messageHuman-readable explanation
detailsExtra data: field errors for VALIDATION_ERROR, retry_after for RATE_LIMIT_EXCEEDED; an empty array otherwise
timestampWhen the error occurred (ISO 8601)
request_idThe value of your X-Request-ID request header, or a generated UUID if you didn't send one. Quote it when contacting support

TIP

Send your own X-Request-ID header to correlate API errors with your logs.

Validation errors (422) ​

Validation errors use the code VALIDATION_ERROR, with messages keyed by field under error.details. Keys are prefixed with attributes. when you send the nested format:

json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The given data was invalid.",
    "details": {
      "attributes.email": ["The attributes.email field must be a valid email address."],
      "attributes.title": ["The attributes.title field is required."]
    },
    "timestamp": "2026-02-07T12:00:00+00:00",
    "request_id": "9b2f4c1e-6a7d-4f3b-8e21-0c5d9a7b1f42"
  }
}

Error codes ​

StatusCodeCommon cause
400BULK_LIMIT_EXCEEDEDMore than 100 IDs sent to bulk delete, publish or unpublish
401UNAUTHENTICATEDNo Authorization header, or an invalid, expired or revoked token
403FORBIDDENToken lacks the required ability for this blueprint
404RESOURCE_NOT_FOUNDUnknown blueprint slug, unknown or malformed resource ID, or a resource from another blueprint or project
422VALIDATION_ERRORInvalid field values (wrong type, missing required field, reference to a resource that doesn't exist), or more than 100 items in bulk create/update
422INVALID_FILTERUnknown filter field or operator. See Filtering
422UNPROCESSABLE_ENTITYRequest understood but refused, e.g. an export over 10,000 rows
429RATE_LIMIT_EXCEEDEDToo many requests. See Rate limits
other 4xxHTTP_ERRORAny other HTTP error, e.g. 405 for an unsupported method
500INTERNAL_ERRORUnexpected server error

BULK_LIMIT_EXCEEDED

This error is returned directly by the bulk endpoints and only carries code and message: no details, timestamp or request_id.

Rate limits ​

Each project may make 1,000 requests per minute. The limit is per project, not per token: every token of the project shares the same budget, across V1 and V2.

Responses carry the current state of the budget:

HeaderDescription
X-RateLimit-LimitRequests allowed per minute (1000)
X-RateLimit-RemainingRequests left in the current window

When the limit is exceeded, the API returns 429 with the number of seconds to wait in error.details.retry_after:

json
{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Too many requests. Please try again later.",
    "details": {
      "retry_after": 42
    },
    "timestamp": "2026-02-07T12:00:00+00:00",
    "request_id": "9b2f4c1e-6a7d-4f3b-8e21-0c5d9a7b1f42"
  }
}

API v1 ​

The deprecated V1 endpoints do not use this format. They return Laravel's default body: {"message": "..."}, plus an errors object keyed by field on 422.

Troubleshooting ​

"Unauthenticated" (401) ​

  • Verify the token is passed as Authorization: Bearer {token}
  • Check that the token has not expired, been revoked or been regenerated in the dashboard
  • Ensure you're using the correct project token

"Forbidden" (403) ​

  • The token exists but lacks the required ability. Check the token's permissions in Settings › API Tokens
  • Abilities are scoped per blueprint: a token with view on posts cannot access products

"Not Found" (404) ​

  • Verify the blueprint slug matches exactly (e.g. blog-posts, not blogposts)
  • Check the resource ID is correct and belongs to the same blueprint and project as the token
  • A view-only token cannot see drafts or scheduled resources

"Unprocessable Entity" (422) ​

  • Read error.details to identify which fields failed validation
  • Ensure field values match the expected types defined in the blueprint
  • For reference fields, ensure the referenced resource ID exists
  • For INVALID_FILTER, the message lists the fields you can filter on

Diggama Documentation