202 Accepted immediately and the
outcome arrives by webhook (or by polling
GET /v2/calls/{id}).
Base URL https://api.voice.miraiminds.co.
The call object
Statuses
Statuses only move forward. A terminal status never changes.
Ended reasons
ended_reason explains why a terminal status was reached. Match on status
for control flow; use ended_reason for analytics and support.
Treat
ended_reason as an open vocabulary. New values are added without a
version bump — always have a default branch. The last two rows above are in the
vocabulary but no call emits them today; they arrive with the warm-transfer
rollout and the t3/t5 tiers — see the roadmap.Create a call
Request
- cURL
- Python
- Node.js
202 Accepted
202 means the call is admitted to the queue — the phone has not rung yet.
The full call object is available from GET /v2/calls/{id}.
Errors
Variables
variables is a flat map of string keys to string values. Each key replaces the
matching {{key}} placeholder in the agent’s system_prompt and
first_message.
- Keys are matched literally and case-sensitively.
- A placeholder with no matching variable is substituted with an empty string —
it does not error, and it does not leave
{{braces}}for the agent to read aloud. Validate on your side. - Keep values short. They are part of the prompt, and the prompt is on the latency path.
- Variables are static per call. There is no way to change them mid-call.
Idempotency
SendIdempotency-Key with a value derived from your own domain object:
409 duplicate_call. It means “already in flight, no
second call placed” — retry a moment later and you will get the original
response, or wait for the webhook.
Get a call
- cURL
- Python
- Node.js
200 OK — the call object. 404 not_found for an
unknown ID, and for an ID that belongs to another workspace — the two are
deliberately indistinguishable.
Abort a call
queued,
dialing or in_progress — a live call is hung up on the SIP server
mid-conversation, not merely flagged. Only a call that has already reached a
terminal status is refused: there is nothing left to stop.
202 Accepted
202 means the cancel was signalled. The call reaches aborted shortly after
with ended_reason: "aborted-by-api", and a
call.aborted event fires. An aborted call is never
billed — including one aborted after media went live.
List calls
200 OK
The list endpoint is for reconciliation and reporting, not for driving your
application state. For that, use webhooks.