Calls by API: errors

Errors come in the same { error, description, data } envelope as in the rest of the API. A refused call action is 409 with error: call_refused, the reason is in data.reason.

HTTPCodeMeaning and what to do
400invalid_requestWrong fields, which ones — in data: a number not of 7–15 digits, an operator_id not from /operators/, a wrong history parameter. Fix the fields from data and repeat.
401unauthorizedNo key, a broken one or a revoked one. Check the Authorization header or create a new key.
403forbiddenThe key lacks the calls:voice permission. Create a Key for calls.
404not_found, channel_not_foundNo such call or line for this key: someone else’s line, a line not chosen for the key, a hidden dialogue. Tick the line in the key.
409call_ownedThe call is already someone’s: an operator or another key took it. The program has nothing to do.
409call_not_yoursVoice and this action are only for your key’s call. Accept the call first: accept.
409call_not_ringingThe call no longer rings: it was taken or it ended. See what happened to the call: GET /calls/<id>/.
409call_not_transferableThe call cannot be transferred now: it is not in conversation, for example the client still hears the ringing. Repeat once the client answers.
409transfer_unsupportedThe line’s messenger cannot hand a call on in the middle of a conversation (WhatsApp Cloud, MAX). Finish the talk with the program or hang up.
409command_in_progressThe previous command on the call is still running: repeat a little later
409calls_unsupportedThe line does not call: its type, or calls are off on it. Turn the line’s calls on: Channels → the line’s gear → Calls.
409contact_refuses_automationThe client asked not to be called automatically: TehProf Dialogs does not call them. An operator can call them.
429rate_limitedToo often. How long to wait — in Retry-After

Request rate limits are the same as in the rest of the API: lists, history and summaries count as reads, commands and voice as sends. The voice connection’s close codes are in Commands and voice.

Install TehProf Dialogs in your CRM

Installing the app and connecting WhatsApp by QR code are free. The line subscription is billed separately.