Errors

Every error response — across Sites, Posts, Tags, and the Public Blog API — uses the same envelope:

{ "error": "SITE_NOT_FOUND", "details": "Site with id 42 not found" }

error is a stable machine-readable code — match on this, not on details or the HTTP status text. details is a human-readable string for logs/debugging and its exact wording isn't guaranteed to stay stable between releases.

All codes

StatusCodeWhere it can happen
400VALIDATION_ERRORPOST /sites — request body fails field validation (e.g. blank name)
400BAD_REQUESTinvalid nav link URL, customCss too long, domain is reserved/is the home domain
400INVALID_INVITATIONan invitation link's token is expired, revoked, or doesn't exist
401UNAUTHORIZEDmissing, invalid, or expired credentials on any authenticated endpoint
403FORBIDDENcaller is a site member but their role doesn't allow this action
404SITE_NOT_FOUNDsite doesn't exist, or the caller doesn't have access to it
404POST_NOT_FOUNDpost doesn't exist under the given site
404POST_VERSION_NOT_FOUNDthe given version id doesn't exist for that post translation
404INVITATION_NOT_FOUNDinvitation doesn't exist under the given site
404SERVICE_ACCOUNT_NOT_FOUNDservice account doesn't exist, or isn't owned by the caller
404NOT_FOUNDgeneric fallback for routes with no more specific not-found case
409SITE_DOMAIN_TAKENcustom domain is already claimed by another site
409SUBDOMAIN_NOT_ALLOWEDsubdomain label fails length/charset rules, or is reserved
409SUBDOMAIN_HELDsubdomain label is inside another user's reservation window
409SLUG_ALREADY_EXISTSa post translation's slug collides with an existing one in the same site+language
500INTERNAL_SERVER_ERRORunhandled server error — safe to retry, report if persistent

The Public Blog API is unauthenticated, so it never returns 401 — a domain that doesn't resolve to any site, or a slug with no published match, comes back as a plain 404 instead.

The MCP server is the one exception to this envelope — it returns standard JSON-RPC errors instead, since that's the format MCP clients expect.