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 operations
201 CreatedResource createdPOST
204 No ContentResource deletedDELETE
207 Multi-StatusPartial success in bulk operationBulk endpoints

Error codes

StatusDescriptionCommon cause
401 UnauthorizedMissing or invalid tokenNo Authorization header, expired or revoked token
403 ForbiddenInsufficient permissionsToken lacks the required ability for this blueprint
404 Not FoundResource not foundInvalid resource ID, wrong blueprint, or resource belongs to another project
422 Unprocessable EntityValidation failedInvalid field values (wrong type, missing required fields)
429 Too Many RequestsRate limit exceededToo many requests in a short period

Error response format

All error responses return a JSON body with a message field:

json
{
  "message": "Unauthenticated."
}

Validation errors (422)

Validation errors include a message and an errors object keyed by field name:

json
{
  "message": "The given data was invalid.",
  "errors": {
    "attributes.email": ["The email field must be a valid email address."],
    "attributes.title": ["The title field is required."]
  }
}

Rate limiting

The API allows 1,000 requests per minute per authenticated token (or per IP address for unauthenticated requests). This limit applies to all endpoints across both V1 and V2.

When the limit is exceeded, the API returns a 429 response with a Retry-After header indicating how many seconds to wait:

json
{
  "error": "RATE_LIMIT_EXCEEDED",
  "message": "Too many requests. Please try again later.",
  "details": {
    "retry_after": 42
  }
}

Troubleshooting

"Unauthenticated" (401)

  • Verify the token is passed as Authorization: Bearer {token}
  • Check that the token has not been revoked 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 Project settings > 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 project as the token

"Unprocessable Entity" (422)

  • Read the errors object 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

Diggama Documentation