Skip to content

Errors

Both APIs use HTTP status codes and return a machine-readable code with a message. The message is written so you can show it to an end user. Branch on code, never on message, because messages may change.

Conversations API: the error is inside detail:

{ "detail": { "code": "origin_not_allowed", "message": "This key cannot be used from this website." } }

A request that does not match the schema (a missing field, a value too long) answers 422 with a list in detail:

{ "detail": [ { "loc": ["body", "visitorId"], "msg": "Value error, visitorId must be 8–80 letters, digits, '-' or '_'", "type": "value_error" } ] }

Workflows API: the error is at the top level, with details for validation problems:

{ "code": "invalid_request", "message": "The request is invalid.", "details": [ { "path": "/eventId", "message": "Field required" } ] }
Status Meaning What to do
400, 422 The request is wrong. Fix the request. Do not retry it unchanged.
401 The key, token or signature is missing or not valid. Check the credential. For a chat, start a new chat.
403 Not allowed for this key, website, user or setting. Fix the configuration. Do not retry.
404 Not found, ended, or not switched on. Check the id. For a chat, start a new chat.
409 Conflicts with the current state. See the code; often wait and retry, or treat as done.
413, 415 The upload is too large or the wrong type. Tell the user.
429 A limit was reached. Wait and retry with backoff. See Rate limits.
503 A service is briefly unavailable. Retry with backoff. See Idempotency and retries.
Code Status Meaning What to do
invalid_api_key 401 The key is unknown, revoked or expired. Check the key; create a new one if needed.
origin_not_allowed 403 The page’s website is not in the publishable key’s allowed websites. Add the exact origin to the key in the console.
agent_not_allowed 403 The key is limited to other agents, or the agent is not in the key’s workspace. Use the right key or agent id.
use_case_not_allowed 403 The use case is not in the key’s workspace, or does not exist. Check the use case id and key.
use_case_not_ready 403 The use case has no entry agent yet. Set an entry agent in the console.
invalid_user_hash 403 userHash does not match userId. Fix your server’s signing code. See Signed users.
identity_not_configured 403 A userHash was sent but the workspace has no identity secret. Create one under Settings → Developers → User verification.
agent_not_available 404 The agent (or the use case’s entry agent) has no live version. Publish the agent.
modality_mismatch 422 A chat was started with a voice-only agent, or a call with a text-only agent. Use the right endpoint or agent.
channel_disabled 403 Web chat or web calls are switched off for this agent. Switch the channel on and publish.
blocked 403 This visitor or user is on your organisation’s block list. None. Show the message.
chat_link_refused 403 A call’s chatSessionId and chatToken do not match. Send the chat’s own session id and token.
rate_limited 429 Too many new chats or calls from this network, key or visitor. Wait and retry.
too_many_open_chats 429 This visitor already has the maximum number of chats open. Continue an open chat, or end one first.
workspace_busy 429 The workspace is starting chats faster than its per-minute limit. Retry shortly.
workspace_budget_reached 429 The workspace reached its daily chat limit. Retry tomorrow, or ask for a higher limit.
lines_busy 429 All of your organisation’s concurrent call places are in use. Retry in a few minutes.
studio_unavailable 503 The key could not be checked just now. Retry with backoff.
public_runtime_disabled 503 Public chat is not enabled. Contact NuacemOne support.
unavailable 503 The service, or calls, are briefly unavailable. Retry with backoff.
Code Status Meaning What to do
invalid_session_token 401 The session token is missing, wrong or expired. Start a new chat.
session_not_found 404 The chat has ended or expired. Start a new chat.
turn_in_progress 409 The agent is still replying to the previous message, or an upload could not be saved while it replied. Wait for done, then send again.
chat_limit_reached 409 The chat has reached its maximum number of messages. Start a new chat.
postback_unknown 409 The tapped option is no longer available. Ask the visitor to type their answer.
feedback_given 409 The chat (or call) was already rated. Treat as done.
session_store_unavailable 503 Chats are briefly unavailable. Retry with backoff.
rate_limited 429 Messages, uploads or event polls are coming too fast for this chat. Slow down.
not_enabled 404 Live agent events: handoff is not set up for your organisation. Stop polling.
invalid_token 401 A call’s callToken is missing or not valid. Use the callToken from the call’s start.
Code Status Meaning What to do
files_disabled 403 File sharing is off for this chat. Hide the upload button.
file_too_large 413 The file is over the size limit. Tell the visitor.
file_empty 422 The file has no content. Tell the visitor.
file_limit_reached 409 The chat already has the maximum number of files, or as much file text as it can take. Start a new chat to share more.
too_many_files 422 Too many fileIds in one message (5 by default). Send fewer at a time.
file_not_available 422 A fileId is unknown, blocked or not in this chat. Upload the file again.
file_already_sent 422 That file was already sent in this chat. Do not send it again.
scanner_unavailable 503 Files cannot be scanned right now. Retry later.
files_unavailable 503 Files cannot be shared right now. Retry later.
voice_notes_off 404 Voice notes are off for this chat. Hide the microphone button.
unsupported_audio 415 The body is not an accepted audio type. Send audio/webm, audio/ogg, audio/mp4 or similar.
voice_note_too_long 413 The note is too long or too large. Keep notes under 2 minutes.
voice_note_unclear 422 Nothing clear could be heard. Ask the visitor to try again or type.

A file that fails the malware scan or the type check is not an error. It answers 201 with status: "blocked". See Files.

Once the reply stream has started, the HTTP status is already 200. A failure then arrives as an error event, and the stream ends:

event: error
data: {"code": "llm_unavailable", "message": "The agent's language model is unavailable. Try again shortly."}
Code Meaning What to do
turn_failed The agent could not reply. Let the visitor send the message again.
llm_unavailable The agent’s language model is briefly unavailable. Retry shortly.
model_not_allowed Your plan does not include this agent’s language model. Change the agent’s model or your plan.
session_store_unavailable The chat could not be saved. Retry shortly.
live_agent_unavailable The message could not reach the person handling the chat. Retry, or show the message.
files_not_relayed Files cannot be passed to a person on a live agent platform. Ask the visitor to type instead.
Code Status Meaning What to do
missing_api_key 401 No X-VoiceCX-Key header. Send your secret key.
invalid_api_key 401 The key is unknown, revoked or expired. Check the key.
secret_key_required 403 A publishable key was used. Use a secret key from your server.
key_limited_to_agents 403 The key is limited to some agents. Use a key with no agent limit.
not_found 404 The run or task does not exist in this workspace, or the Workflows API is not switched on for your organisation. Check the id; ask for the beta to be enabled.
not_published 404 The workflow has no live version in this workspace. Publish the workflow.
no_api_trigger 409 The workflow has no API / webhook trigger. Add one and publish.
invalid_request 422 The body is invalid, the trigger is wrong, the outcome is not allowed, or a rejection has no note. Fix the request.
invalid_input 422 The input (or a task’s form answers) does not fit the fields the workflow expects. Fix the values listed in message.
client_not_allowed 403 The trigger allows only some API keys, and this is not one of them. Use an allowed key, or change the trigger.
run_finished 409 The run has already finished, so it cannot be cancelled. Treat as done.
task_closed 409 The task was already decided or has expired. Treat as done.
already_approved 409 This key already approved; another approver is needed. Decide with a different approver.
maker_cannot_approve 403 The key that started the run cannot approve it. Decide with a different key or in the console.
rate_limited 429 Too many requests for this key, or for the workspace’s signed hooks. Wait and retry.
invalid_signature 401 Signed hook: the signature or timestamp header is missing or wrong. Check the inbound secret and your signing code.
stale_signature 401 Signed hook: the timestamp is more than 5 minutes off. Fix your server’s clock.
replayed 409 Signed hook: this exact signed request was already received. Sign each request afresh.
payload_too_large 413 Signed hook: the body is over 64 KB. Send less data.
studio_unavailable 503 Workflow definitions or keys could not be read just now. Retry with backoff.
engine_unavailable 503 The run could not be started, or a decision could not reach the run. Retry with backoff. A decision is already saved; retrying it is safe.