Skip to content

Error Model ​

All API errors from the Public API use RFC 9457 Problem Details (obsoleting RFC 7807) with Content-Type: application/problem+json. Internal API errors use a standard { "error": "..." } envelope.

Public API error shape:

json
{
  "type": "https://beechcms.dev/problems/validation-failed",
  "title": "Bad Request",
  "status": 400,
  "detail": "Validation failed",
  "instance": "/api/v1/public/articoli/add",
  "errors": [
    {
      "field": "title",
      "expected": "string",
      "received": "number",
      "message": "Field 'title' expects type 'string' but received 'number'"
    },
    {
      "field": "publish_date",
      "expected": "date|ISO",
      "received": "string",
      "message": "Field 'publish_date' expects type 'date|ISO' but received 'string'"
    }
  ]
}

Standard type URIs ​

type SlugHTTP StatusMeaning
seed-not-found404Content type does not exist in registry, or the public API does not expose it (same answer, no list of other types)
entry-not-found404No entry with the specified UUID or slug
operation-not-allowed403Seed is public for another operation, but its allowPublicPost flag is false for an anonymous submission, or its allowPublicEdit flag is false for this edit
public-api-key-unauthorized401Missing or invalid API key
public-api-not-configured403The key the request needs is not configured (BEECH_SECRET_KEY for writes, no key at all for reads)
public-api-secret-key-required403A publishable key was sent for a write; writes need the secret key
public-api-dev-secret-key403The local secret key beech_sk_dev was sent while ENV is not development
forbidden-origin403Origin header does not match allowed CORS origins
validation-failed400Field type mismatch, missing required field, or unknown alias
dangerous-content422Dangerous HTML/script markup detected in text or richtext
sensitive-field-write422Attempted to submit a confidential/encrypted field via public add
sensitive-field-edit422Attempted to modify a confidential/encrypted field via public edit
honeypot-triggered422Hidden anti-spam honeypot field was filled out
time-trap-missing422Anti-bot Time-Trap token is missing or expired
time-trap-replayed422Single-use Time-Trap token was already consumed
time-trap-violation422Form submitted too quickly (submission time below threshold)
invalid-json-body400Request body is not valid JSON
invalid-filter400Malformed filter syntax or unknown operator
slug-conflict409Slug already exists for this content type
idempotency-key-conflict409Idempotency key reused with a different payload
rate-limit-exceeded429IP or account exceeded rate limit
internal-server-error500Unhandled server error (details masked to "An unexpected error occurred." unless ENV is development or test; an omitted or unrecognised ENV is masked)

Note: The errors array is only present on validation-failed responses. It provides field-level detail for every field that failed validation.

Internal content & Trash type URIs ​

The JWT-authenticated content surface uses content--prefixed slugs for the same conditions, plus these:

type SlugHTTP StatusMeaning
content-seed-not-found404Seed slug is not in the registry
content-not-found404No entry with that id — on /restore, no trashed entry with that id
content-slug-conflict409Slug already taken by a live entry
draft-publish-conflict409The live entry was written after the draft captured its snapshot — publishing would overwrite that write
content-invalid-slug-or-id400Missing seed slug or entry id in the path
content-invalid-json400Request body is not valid JSON
bulk-invalid-ids400ids is not a non-empty array of strings
bulk-size-exceeded400More than 500 ids in a bulk operation

Bulk trash operations return 200 OK even when some ids fail: each failure is reported per id inside failed[].problem (content-not-found, bulk-restore-error, or bulk-purge-error) rather than failing the whole batch. See the Internal Content API.