Skip to content
Discord

Mirai Voice API v2

v2 is the current API. It is resource-oriented, uses a single auth header, and returns the same error envelope everywhere.

https://api.voice.miraiminds.co

Quickstart

Key → agent → call → webhook in five minutes. Start here.

Agents

The reusable configuration a call runs. Reference.

Calls

Place, inspect and abort outbound calls. Reference.

Webhooks

Signed lifecycle events. Guide.

Every request carries one header:

Authorization: Bearer sk_live_YOUR_API_KEY

A secret key is sk_live_ followed by 32 hex characters. It is scoped to one workspace and carries your default tier. Keys are issued by ops — email sneh@miraiminds.co.

We store only the SHA-256 of your key, so a lost key cannot be recovered — it is rotated. Never ship a secret key to a browser or a mobile app.

SituationStatuserror.code
Header missing or key unknown401unauthorized
Key revoked403forbidden

JSON only. Send Content-Type: application/json on every request with a body. Responses are always JSON, including errors.

IDs are server-minted and prefixed by resource type. Treat them as opaque strings — do not parse them.

ResourceFormatExample
Agentagt_<ulid>agt_01JZQ8F3K7M2N5P9R4T6V8W0XZ
Callcall_<ulid>call_01JZQ9B4M8N3P6R2S5T7V9W1YA
Webhook eventevt_<ulid>evt_01JZQ9C5N9P4R7S3T6V8W2X4YB

Errors always use one envelope. See the full error reference.

{
  "error": {
    "code": "insufficient_balance",
    "message": "wallet balance 0.40 INR is below the minimum for one minute at t1"
  }
}

Timestamps are RFC 3339 in UTC: 2026-07-26T09:14:02Z.

Money is INR. amount_inr and per_min_inr are numbers, not strings.

Phone numbers are E.164 with the leading +: +919876543210.

List endpoints take limit and cursor and return a cursor-paginated envelope.

curl "https://api.voice.miraiminds.co/v2/calls?limit=50&cursor=call_01JZQ9B4M8N3P6R2S5T7V9W1YA" \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"
{
  "data": [ { "id": "call_01JZQ9B4M8N3P6R2S5T7V9W1YA", "…": "…" } ],
  "has_more": true,
  "next_cursor": "call_01JZQ9B4M8N3P6R2S5T7V9W1YB"
}

Pass next_cursor back as cursor to get the following page. Stop when has_more is false. Default limit is 20, maximum 100.

POST /v2/calls accepts an Idempotency-Key header. Reuse the key and you get the original response replayed instead of a second phone call. Keys are held for 24 hours.

-H "Idempotency-Key: order-8842-reminder-1"

Use something derived from your own domain object (an order ID, a job ID) rather than a random UUID per attempt — the point is that your retry produces the same key. See Calls.

Not in v2Where it lives
Inbound callsv1 assistants with an inbound number
Buying / releasing phone numbersv1 Telephony
Knowledge base / RAGv1 Knowledge Base
API tools (function calling)v1 Tools
Self-serve wallet top-upops-issued, see Billing
OAuth / user-scoped tokenssecret keys only

v1 keeps serving all of the above. The two APIs can run side by side against the same workspace.