Skip to main content
When a request fails, PolyAI APIs return a structured JSON error response. This page documents the HTTP status codes, error response format, and platform-specific error codes you may encounter.

Error response format

All API errors return a JSON body with the following structure:
{
  "success": false,
  "error": "Request body failed schema validation.",
  "error_id": "550e8400-e29b-41d4-a716-446655440000",
  "error_code": "SCHEMA_VALIDATION_FAILED",
  "error_message": "Request body failed schema validation.",
  "data": null
}
FieldTypeDescription
successbooleanAlways false for error responses.
errorstringHuman-readable error message.
error_idstringUnique request identifier from the X-PolyAI-Correlation-Id header. Include this when contacting support.
error_codestringMachine-readable error code in UPPER_SNAKE_CASE.
error_messagestringHuman-readable error message.
datanullAlways null for error responses.

Standard HTTP status codes

These standard codes apply across all PolyAI APIs.
StatusMeaningWhen it occurs
400Bad requestThe request body or query parameters failed validation.
401UnauthorizedMissing, expired, or invalid API key or token.
403ForbiddenYou do not have permission for the requested action.
404Not foundThe requested resource does not exist.
405Method not allowedThe HTTP method is not supported for this endpoint.
408Request timeoutThe request exceeded the server timeout.
409ConflictA resource with the same identifier already exists.
410GoneThe resource has been permanently deleted.
412Precondition failedA required precondition was not met (for example, deploying to live before pre-release).
415Unsupported media typeThe uploaded file type is not supported.
422Unprocessable entityThe request is well-formed but contains semantic errors.
429Too many requestsRate limit exceeded. Retry after the period indicated in the response headers.
500Internal server errorAn unexpected error occurred on the server.
501Not implementedThe requested functionality is not yet available.
502Bad gatewayAn upstream service returned an error or timed out.
503Service unavailableThe service is temporarily unavailable.

Platform error codes

PolyAI APIs return domain-specific error codes alongside HTTP status codes. There are 63 of them across 13 categories — search by code, ID, or keyword below, or filter by HTTP status, instead of scanning tables.

WebSocket close codes

If you are using the WebRTC Gateway or webchat WebSocket connections, you may encounter these close codes:
CodeMeaningWhen it occurs
1000Normal closureConnection closed cleanly.
1006Abnormal closureConnection dropped unexpectedly (for example, network failure).
408Pong timeoutServer did not receive a pong response within the configured timeout.

Troubleshooting

Include the correlation ID in support requests

Every API response includes an X-PolyAI-Correlation-Id header. When contacting PolyAI support, include this value so the team can trace the request through the system.

Common patterns

SymptomLikely causeResolution
401 on every requestAPI key missing or malformedVerify the x-api-key header is present and correctly formatted.
403 after key rotationOld key revokedConfirm you are using the new key.
404 for a known resourceWrong regionVerify the base URL matches your account region.
409 on createDuplicate identifierUse a different name or ID, or check for existing resources.
422 on importSchema mismatchVerify CSV columns match the expected format. Check the error data field for column details.

API getting started

Authentication, base URLs, and API versioning.

Conversations API

Retrieve conversation data and transcripts.
Last modified on July 2, 2026