Skip to main content
You do not have to migrate. v1 is stable, hosted separately at api.voice-agents.miraiminds.co, and is not going away. Nothing in your integration changes because v2 exists. Migrate when you want one of these:
  • GET on a call — v1 has no way to read a call’s status, only webhooks.
  • Wallet balance and ledger over the API.
  • One auth header instead of three.
  • Idempotent call creation.
  • The published tier rate card.
Stay on v1 if you need: inbound calls, phone-number purchase, knowledge base/RAG, API tools (function calling), web calls, campaign scheduling, or post-call analysis. v2 has none of these yet. The two APIs can address the same workspace side by side — migrate calls first, keep the rest on v1.

Hosts

The v1 host has /v2/ paths on itv1’s call endpoints are literally named POST /v2/call/initiate. That /v2/ is a path segment inside the v1 product, not this API. The distinguishing thing is the host, not the prefix.

Authentication

Three headers become one. The workspace is implied by the key, so there is no way to accidentally address the wrong workspace with the right credentials.

Endpoints

Fields

Creating an agent / assistant

Placing a call

v1 → v2 call request
v1 → v2 response

Statuses

v1’s status vocabulary is hyphenated and mixes phases with outcomes. v2 uses snake_case and separates status from ended_reason.

Webhooks

v1 → v2 webhook body
Note the differences that will bite:
  • metadata is gone. v1 echoed an arbitrary object back on every event. In v2, correlate on data.call.id — store the call_id we return from POST /v2/calls against your own record.
  • recordingUrl is not in v2. Recordings are not exposed through the v2 API; ask your Mirai contact.
  • credits becomes cost on the call itself, in rupees rather than credit units, and the running balance moves to GET /v2/wallet.
  • No end-of-call analysis event yet. Post-call analytics (AI summary + QA score on every call) is part of every tier and its v2 API surface is rolling out — see the roadmap. Until it lands, v1’s analysisPlan is the only API surface for post-call analysis.

Errors

v1’s success responses wrap the payload in { status_code, message, data }. v2 returns the resource itself. See the error reference.

A migration that fits in an afternoon

  1. Get a v2 key. Keep your v1 credentials — you will run both for a while.
  2. Recreate your assistants as agents. Move the opening line out of systemPrompt into first_message; rename your payload keys to the variables keys your prompt references.
  3. Point a new webhook route at the v2 signature scheme. Do not modify the v1 route — the schemes are incompatible and you need both live during cutover.
  4. Switch one low-volume campaign to POST /v2/calls. Compare outcomes against the same campaign’s v1 numbers for a day.
  5. Move the rest. Leave numbers, knowledge base and tools on v1.