Error response format
All API errors return a JSON body with the following structure:Standard HTTP status codes
These standard codes apply across all PolyAI APIs. Client errors (4xx) mean fix the request; server errors (5xx) mean retry or contact support.Platform error codes
Expand the category you’re hitting, or use one of the jump links above.Authentication and authorization
Authentication and authorization
Conversations
Conversations
Chat
Chat
Deployments
Deployments
Flows
Flows
Functions
Functions
Knowledge base
Knowledge base
Phone numbers and connectors
Phone numbers and connectors
Variants
Variants
Real-time configuration
Real-time configuration
Accounts and projects
Accounts and projects
SMS
SMS
Test suite
Test suite
WebSocket close codes
If you are using the WebRTC Gateway or webchat WebSocket connections, you may encounter these close codes:Troubleshooting
Common patterns
Quick diagnostics for the errors you are most likely to hit. Expand a row to see the likely cause and how to resolve it.401 on every request
401 on every request
Likely cause — API key missing or malformed.Resolution — Verify the
x-api-key header is present and correctly formatted. Check for stray whitespace or missing characters when the key is copied from a secret store.403 after key rotation
403 after key rotation
Likely cause — Old key revoked.Resolution — Confirm you are using the new key everywhere it is referenced — including local
.env files, CI secrets, and any deployed services.404 for a known resource
404 for a known resource
Likely cause — Wrong region.Resolution — Verify the base URL matches your account region. See API getting started for the list of regional base URLs.
409 on create
409 on create
Likely cause — Duplicate identifier.Resolution — Use a different name or ID, or check for an existing resource with the same identifier before retrying.
422 on import
422 on import
Likely cause — Schema mismatch.Resolution — Verify CSV columns match the expected format. Check the error
data field for column-level details.Related pages
API getting started
Authentication, base URLs, and API versioning.
Conversations API
Retrieve conversation data and transcripts.

