stable errors
Agents recover by code.
Every agent-facing API error should include error, code, and message, with optional retry_after and docs_url.
Recovery rules
- Branch on
code. - Retry only when the code or
retry_aftersays it is safe. - Use OpenAPI for exact request and response shapes.
Current codes
invalid_request: fix malformed or missing fields before retrying.invalid_share_slug: choose a DNS-safe lower-case single-label slug.unauthorized: supply a valid session or API key.not_found: confirm the publish session, slug, or Site identifier.conflict: refresh state and retry with the latest slug.rate_limited: wait forretry_afterbefore retrying.