Skip to main content
A call request we refuse never becomes a call. It has no call id, sends no webhook and is not in your call list, so if your code doesn’t check the answer, nobody finds out. We record every refusal, group the repeats, and email your company when one keeps happening.

What is recorded

  • Every 4xx answer to POST /v2/calls, on every channel. Two answers are left out because neither means a call was lost: 409 duplicate_call (a request with the same Idempotency-Key is still in flight) and the replay of an answer we already gave for a key.
  • Every row in contacts_rejected from POST /v2/campaigns/{id}/contacts, and from contacts you send with POST /v2/campaigns. Each is recorded with status 400, code contact_rejected, the row’s reason as its message, and the route POST /v2/campaigns/{id}/contacts. Only rejected rows are recorded on these routes. A request we refuse as a whole, such as one with more than 1000 rows, is answered with its error and not recorded, so check those answers in your code.
Calls the platform places for you are not recorded: a call-back the agent promised on a call, the console’s test calls and calls on the shared test line. Each of those has its own record of what happened. Refusals of the same kind form one group: the same route, status and code, and the same message apart from its numbers and ids. A variable that was 4,105 characters on one call and 4,230 on the next is one group, and the group shows the latest message. If 750 calls are refused for the same reason, you see one group with count: 750. We keep only what tells you what went wrong. Before a message is stored, every phone number and email address in it becomes •••. That is any run of six or more digits, with or without a leading +, and also when spaces, hyphens or brackets split the digits. The message is then cut at 300 characters. We never store the request body, its variables or the phone number. The record is kept for 30 days.

Read them with the API

Refusals are counted by the hour (UTC), so the window starts at the top of its first hour. At 10:20 UTC, hours=1 covers everything since 09:00 UTC, a little more than the last 60 minutes. Send your secret key, as you do for POST /v2/calls. For a sub-workspace, add its Mirai-Workspace header to read that brand’s refusals.
200 OK
503 refusals_unavailable means we couldn’t read the record just then. Try again shortly.

See them in the console

Open Developers → Refused requests in the sandbox or live console. Each row is one group: when it was last seen, the route, the status, the count, the message, the fix, and the agent’s name when we know it. When alert is true, the console shows a banner with how many API calls were refused in the last 24 hours, the message and fix of the largest group, and a See refused requests link. If you dismiss it, it stays hidden for the rest of the day.

Email when a refusal repeats

When one kind of refusal happens 10 times within an hour, we email your company’s owners and billing contacts. The email says what was refused and how many times, quotes the message with numbers masked, says how to fix it, and links to Refused requests in the console and to this page.
  • Only companies that have gone live get these emails. A sandbox sees the same record in the API and the console, but gets no email.
  • One email a day at most for each kind of refusal. The day runs on India time.
  • At most 3 refusal emails a day for one workspace.
  • Our support team gets an alert at the same time.

Alert on refusals in your own code

The email reaches people and comes at most once a day per kind. Your own code sees every refusal the moment it happens, so alert there too:
  • Log error.code and error.message for every 4xx from POST /v2/calls, with your own record id.
  • Alert when 4xx answers pass a small rate, for example 5 in 10 minutes. A 400, 402, 403, 404 or 422 keeps coming back until someone changes the request, the wallet or the agent, so retrying never clears it.
  • Treat a non-empty contacts_rejected from a campaign the same way.
  • From your monitoring, you can also read GET /v2/account/refusals?hours=1 every few minutes and alert when total goes up or alert is true.
RetryLater and alert_ops (alertOps in Node.js) stand for your own job queue and alerting.

Common refusals

Every error code, with its fix, is on Errors.

Calls

Every error POST /v2/calls can answer, and how long a variable can be.

Direct calls or campaigns

When a steady flow of calls belongs in an always-on campaign.

Errors

The error envelope, every code, and the retry rules.

Campaigns

How a campaign reports rejected rows.