Every error response from /api/v1/ is a JSON object with a single top-level error key whose value is
a human-readable string:
{ "error": "Invalid or expired API key."}
This is consistent across authentication failures, permission checks, throttling, not-found, and
method-not-allowed responses — you can always read body.error for a displayable message.
A few errors you are expected to branch on also carry a code next to error. Match on code, never on
the message text, which may be reworded:
code
Status
Meaning
trial_expired
403
The workspace’s trial has ended and no paid plan is active. The API key is refused for every request, reads included, until a plan is chosen in the dashboard.
monthly_limit_exceeded
429
Returned only by POST /api/v1/broadcasts/{id}/confirm/: the broadcast needs more messages than are left in the organization’s monthly quota. Nothing is sent and the broadcast stays a draft (see below). Single messages (POST /api/v1/messages/) are never refused for quota.
rpm_limit_exceeded
429
The organization’s per-minute send limit was hit. Retry after the Retry-After interval.
{ "error": "This workspace's trial has expired. Choose a plan to restore access.", "code": "trial_expired"}
Errors without a listed code have no code key.A monthly_limit_exceeded refusal also carries the numbers behind it, so you can narrow the audience or
prompt an upgrade without another request:
{ "error": "This send needs 1,200 messages but only 350 of your 5,000 are left this month (resets Oct 01). Narrow the audience or upgrade your plan.", "code": "monthly_limit_exceeded", "calls_used": 4650, "calls_limit": 5000, "calls_remaining": 350, "calls_needed": 1200}
A broadcast either fits in what’s left or isn’t sent at all; it is never sent in part. The monthly quota
stops bulk sends only (broadcasts and sequences). Replies, including POST /api/v1/messages/, keep working at the
cap and still count toward usage.
Field-level validation errors (400 Bad Request) are the one intentional exception to the single-error
envelope. They follow Django REST Framework’s field-keyed convention — a map of field name to a list of
messages, so you can surface errors next to the right input:
{ "phone_number": ["This field is required."], "template_name": ["No approved template with this name exists in your workspace."]}
Non-field errors appear under non_field_errors:
{ "non_field_errors": ["Either `text` or `template_name` must be provided, not both."]}
When parsing a 400, check for the error key first; if it’s absent, treat the body as a
field → messages map.
A 500 never leaks internal detail. The full exception (including stack trace) is captured server-side;
the client always receives a fixed, parsable body:
{ "error": "An unexpected error occurred. Please try again or contact support if the problem persists."}
If you hit a reproducible 500, contact support with the timestamp and endpoint — we can correlate it to
the captured exception.A request to an unrouted /api/v1/... path (a typo’d or non-existent endpoint) returns 404 with the
same envelope, {"error": "Not found"}.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"ChatBridge","description":"ChatBridge Public REST API — contacts, conversations, messages, templates, tickets, and WhatsApp Flows.","colors":{"primary":"#25D366","light":"#4ADE80","dark":"#0F2340"},"logo":{"light":"https://mintcdn.com/algosmithssoftcom/q59wWso_0E1ON8iS/logo/light.webp?fit=max\u0026auto=format\u0026n=q59wWso_0E1ON8iS\u0026q=85\u0026s=9d707b2e25eb1a936f0c2559572856a7","dark":"https://mintcdn.com/algosmithssoftcom/q59wWso_0E1ON8iS/logo/dark.webp?fit=max\u0026auto=format\u0026n=q59wWso_0E1ON8iS\u0026q=85\u0026s=02a10d4f7f56ad453ed72d49c6553103"},"favicon":"https://mintcdn.com/algosmithssoftcom/q59wWso_0E1ON8iS/favicon.png?fit=max\u0026auto=format\u0026n=q59wWso_0E1ON8iS\u0026q=85\u0026s=f7e5edf0fdc1c1ddc6c820024140552c","api":{"playground":{"display":"interactive"}},"navbar":{"links":[{"href":"https://chatbridge.algosmiths.com","label":"Dashboard"}]},"footer":{"socials":{"website":"https://chatbridge.algosmiths.com"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"algosmithssoftcom","hasAudioNarration":false,"actualSubdomain":"algosmithssoftcom","customDomains":["docs.chatbridge.algosmiths.com"],"gitSource":{"type":"github","owner":"algosmiths-softcom","repo":"whatsconnect","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6abb4f5ed0c82aa0ccb84753","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"API Reference","count":58},{"language":"default","tag":"Tickets","count":10},{"language":"default","tag":"Guides","count":9},{"language":"default","tag":"Get Started","count":9},{"language":"default","tag":"Contacts","count":8},{"language":"default","tag":"Broadcasts","count":7},{"language":"default","tag":"Custom Fields","count":5},{"language":"default","tag":"Ticket Pipelines","count":5},{"language":"default","tag":"Ticket Stages","count":5},{"language":"default","tag":"Flows","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"errors","slug":"/errors","pageMetadata":{"title":"Errors","description":"Status codes, the error envelope, and validation error shape","href":"/errors"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Status codes, the error envelope, and validation error shape\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`the-error-envelope`,children:`The error envelope`}),`\n`,_jsxs(_components.p,{children:[`Every error response from `,_jsx(_components.code,{children:`/api/v1/`}),` is a JSON object with a single top-level `,_jsx(_components.code,{children:`error`}),` key whose value is\na human-readable string:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid or expired API key.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This is consistent across authentication failures, permission checks, throttling, not-found, and\nmethod-not-allowed responses — you can always read `,_jsx(_components.code,{children:`body.error`}),` for a displayable message.`]}),`\n`,_jsx(Heading,{level:`2`,id:`machine-readable-codes`,children:`Machine-readable codes`}),`\n`,_jsxs(_components.p,{children:[`A few errors you are expected to branch on also carry a `,_jsx(_components.code,{children:`code`}),` next to `,_jsx(_components.code,{children:`error`}),`. Match on `,_jsx(_components.code,{children:`code`}),`, never on\nthe message text, which may be reworded:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`code`})}),_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`trial_expired`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:`The workspace’s trial has ended and no paid plan is active. The API key is refused for every request, reads included, until a plan is chosen in the dashboard.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`monthly_limit_exceeded`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsxs(_components.td,{children:[`Returned only by `,_jsx(_components.code,{children:`POST /api/v1/broadcasts/{id}/confirm/`}),`: the broadcast needs more messages than are left in the organization’s monthly quota. Nothing is sent and the broadcast stays a draft (see below). Single messages (`,_jsx(_components.code,{children:`POST /api/v1/messages/`}),`) are never refused for quota.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`rpm_limit_exceeded`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsxs(_components.td,{children:[`The organization’s per-minute send limit was hit. Retry after the `,_jsx(_components.code,{children:`Retry-After`}),` interval.`]})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This workspace's trial has expired. Choose a plan to restore access.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"trial_expired\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Errors without a listed code have no `,_jsx(_components.code,{children:`code`}),` key.`]}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`monthly_limit_exceeded`}),` refusal also carries the numbers behind it, so you can narrow the audience or\nprompt an upgrade without another request:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This send needs 1,200 messages but only 350 of your 5,000 are left this month (resets Oct 01). Narrow the audience or upgrade your plan.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"monthly_limit_exceeded\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"calls_used\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4650`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"calls_limit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"calls_remaining\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`350`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"calls_needed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1200`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`A broadcast either fits in what’s left or isn’t sent at all; it is never sent in part. The monthly quota\nstops bulk sends only (broadcasts and sequences). Replies, including `,_jsx(_components.code,{children:`POST /api/v1/messages/`}),`, keep working at the\ncap and still count toward usage.`]}),`\n`,_jsx(Heading,{level:`2`,id:`status-codes`,children:`Status codes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`200 OK`}),` / `,_jsx(_components.code,{children:`201 Created`})]}),_jsxs(_components.td,{children:[`Success. `,_jsx(_components.code,{children:`201`}),` on resource creation.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`204 No Content`})}),_jsxs(_components.td,{children:[`Success with no body (e.g. a `,_jsx(_components.code,{children:`DELETE`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`400 Bad Request`})}),_jsxs(_components.td,{children:[`Invalid input — see `,_jsx(_components.a,{href:`#validation-errors`,children:`validation errors`}),` below.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`401 Unauthorized`})}),_jsx(_components.td,{children:`Missing, malformed, or revoked API key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`403 Forbidden`})}),_jsxs(_components.td,{children:[`Valid key, but it lacks the required `,_jsx(_components.a,{href:`/authentication#scopes`,children:`scope`}),`, or the workspace trial has expired (`,_jsx(_components.code,{children:`code: trial_expired`}),` — every request is refused, reads included).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`404 Not Found`})}),_jsx(_components.td,{children:`The resource doesn’t exist, or isn’t in your workspace.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`405 Method Not Allowed`})}),_jsx(_components.td,{children:`The endpoint doesn’t support that HTTP method.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`429 Too Many Requests`})}),_jsxs(_components.td,{children:[_jsx(_components.a,{href:`/rate-limits`,children:`Rate limit`}),` exceeded (includes a `,_jsx(_components.code,{children:`Retry-After`}),` header), or a broadcast confirm that doesn’t fit in the monthly quota (`,_jsx(_components.code,{children:`code: monthly_limit_exceeded`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`500 Internal Server Error`})}),_jsxs(_components.td,{children:[`An unexpected server error — see `,_jsx(_components.a,{href:`#server-errors`,children:`below`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`validation-errors`,children:`Validation errors`}),`\n`,_jsxs(_components.p,{children:[`Field-level validation errors (`,_jsx(_components.code,{children:`400 Bad Request`}),`) are the one intentional exception to the single-`,_jsx(_components.code,{children:`error`}),`\nenvelope. They follow Django REST Framework’s field-keyed convention — a map of field name to a list of\nmessages, so you can surface errors next to the right input:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"phone_number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This field is required.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"template_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"No approved template with this name exists in your workspace.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Non-field errors appear under `,_jsx(_components.code,{children:`non_field_errors`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"non_field_errors\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:'\"Either `text` or `template_name` must be provided, not both.\"'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`When parsing a `,_jsx(_components.code,{children:`400`}),`, check for the `,_jsx(_components.code,{children:`error`}),` key first; if it’s absent, treat the body as a\nfield → messages map.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`server-errors`,children:`Server errors`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`500`}),` never leaks internal detail. The full exception (including stack trace) is captured server-side;\nthe client always receives a fixed, parsable body:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"An unexpected error occurred. Please try again or contact support if the problem persists.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`If you hit a reproducible `,_jsx(_components.code,{children:`500`}),`, contact support with the timestamp and endpoint — we can correlate it to\nthe captured exception.`]}),`\n`,_jsxs(_components.p,{children:[`A request to an unrouted `,_jsx(_components.code,{children:`/api/v1/...`}),` path (a typo’d or non-existent endpoint) returns `,_jsx(_components.code,{children:`404`}),` with the\nsame envelope, `,_jsx(_components.code,{children:`{\"error\": \"Not found\"}`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Errors","description":"Status codes, the error envelope, and validation error shape","href":"/errors"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"The error envelope","slug":"the-error-envelope","depth":2,"children":[]},{"title":"Machine-readable codes","slug":"machine-readable-codes","depth":2,"children":[]},{"title":"Status codes","slug":"status-codes","depth":2,"children":[]},{"title":"Validation errors","slug":"validation-errors","depth":2,"children":[]},{"title":"Server errors","slug":"server-errors","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"algosmithssoftcom","siteName":"ChatBridge","title":"Errors - ChatBridge","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-26T15:22:02.751Z","originalFileLocation":"errors.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Status codes, the error envelope, and validation error shape\">\u003cmeta data-mint-head name=\"application-name\" content=\"ChatBridge\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/algosmithssoftcom/7doyscT2WZhBOfHO/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/algosmithssoftcom/7doyscT2WZhBOfHO/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/algosmithssoftcom/7doyscT2WZhBOfHO/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/algosmithssoftcom/7doyscT2WZhBOfHO/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/algosmithssoftcom/7doyscT2WZhBOfHO/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/algosmithssoftcom/7doyscT2WZhBOfHO/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/algosmithssoftcom/7doyscT2WZhBOfHO/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/algosmithssoftcom/7doyscT2WZhBOfHO/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/algosmithssoftcom/7doyscT2WZhBOfHO/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Errors - ChatBridge\">\u003cmeta data-mint-head property=\"og:description\" content=\"Status codes, the error envelope, and validation error shape\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ChatBridge\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.chatbridge.algosmiths.com/errors\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://algosmithssoftcom.mintlify.site/_mintlify/api/og/v2?division=Get+Started\u0026amp;title=Errors\u0026amp;description=Status+codes%2C+the+error+envelope%2C+and+validation+error+shape\u0026amp;theme=6d496d433348106e519d404e\u0026amp;signature=0dae82f775c4c84334991dc3ccf6619c90347b0f0a70f3d7ccd0b4babf9a0b60\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Errors - ChatBridge\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Status codes, the error envelope, and validation error shape\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://algosmithssoftcom.mintlify.site/_mintlify/api/og/v2?division=Get+Started\u0026amp;title=Errors\u0026amp;description=Status+codes%2C+the+error+envelope%2C+and+validation+error+shape\u0026amp;theme=6d496d433348106e519d404e\u0026amp;signature=0dae82f775c4c84334991dc3ccf6619c90347b0f0a70f3d7ccd0b4babf9a0b60\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/algosmithssoftcom/7doyscT2WZhBOfHO/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ChatBridge\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#25D366\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.chatbridge.algosmiths.com/errors\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/errors.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.chatbridge.algosmiths.com/#organization\",\"name\":\"ChatBridge\",\"url\":\"https://docs.chatbridge.algosmiths.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/algosmithssoftcom/q59wWso_0E1ON8iS/logo/light.webp?fit=max\u0026auto=format\u0026n=q59wWso_0E1ON8iS\u0026q=85\u0026s=9d707b2e25eb1a936f0c2559572856a7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.chatbridge.algosmiths.com#website\",\"name\":\"ChatBridge\",\"url\":\"https://docs.chatbridge.algosmiths.com\",\"publisher\":{\"@id\":\"https://docs.chatbridge.algosmiths.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.chatbridge.algosmiths.com/errors#webpage\",\"url\":\"https://docs.chatbridge.algosmiths.com/errors\",\"name\":\"Errors\",\"description\":\"Status codes, the error envelope, and validation error shape\",\"dateModified\":\"2026-09-26T15:22:02.751Z\",\"isPartOf\":{\"@id\":\"https://docs.chatbridge.algosmiths.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.chatbridge.algosmiths.com/errors#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.chatbridge.algosmiths.com/errors#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get Started\",\"item\":\"https://docs.chatbridge.algosmiths.com/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Errors\",\"item\":\"https://docs.chatbridge.algosmiths.com/errors\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.chatbridge.algosmiths.com/errors#article\",\"headline\":\"Errors\",\"name\":\"Errors\",\"description\":\"Status codes, the error envelope, and validation error shape\",\"url\":\"https://docs.chatbridge.algosmiths.com/errors\",\"mainEntityOfPage\":{\"@id\":\"https://docs.chatbridge.algosmiths.com/errors#webpage\"},\"dateModified\":\"2026-09-26T15:22:02.751Z\",\"publisher\":{\"@id\":\"https://docs.chatbridge.algosmiths.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.chatbridge.algosmiths.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ChatBridge\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"ChatBridge\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/errors.md","siteName":"ChatBridge","nav":{"global":null,"tabs":[{"tab":"Guides","groups":[{"group":"Get Started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"},{"title":"Authentication","href":"/authentication"},{"title":"Rate Limits","href":"/rate-limits"},{"title":"Pagination","description":"How list endpoints page through results","href":"/pagination"},{"title":"Errors","href":"/errors"},{"title":"SDKs \u0026 Tools","description":"Official SDKs, the OpenAPI spec, and importing into your tooling","href":"/sdks"},{"title":"MCP Server","href":"/mcp"},{"title":"Changelog","href":"/changelog"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference"}]}]},"basePath":"","title":"Errors - ChatBridge","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":[],"chunks":[]}