> ## Documentation Index
> Fetch the complete documentation index at: https://www.bolna.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate from Vapi

> Step-by-step guide to moving your Vapi assistants, squads, tools, knowledge bases, analysis plans, BYO SIP trunks, and campaigns to Bolna.

Move your Vapi assistants, squads, tools, knowledge bases, and post-call analysis plans to Bolna with one command. Your existing Vapi setup stays live and untouched while you test on Bolna.

## What you'll need

* **Bolna API key** — from [platform.bolna.ai](https://platform.bolna.ai) -> **Developers -> API Keys** (`bn-...`)
* **Vapi Private API key** — from Vapi Dashboard -> **Org Settings -> API Keys**
* **Node.js 18+** (for the CLI), or an AI client connected to [Bolna MCP](https://www.bolna.ai/docs/mcp-server.md)

> [!WARNING]
>
> **Use your Vapi Private API key, not the Public key.** Vapi returns `401 Invalid Key` if you pass a public web key.

***

## Step-by-step migration

**1. Set your API keys**

```bash theme={"system"}
export BOLNA_API_KEY="bn-xxxxxxxxxxxxxxxx"
export VAPI_API_KEY="your-vapi-private-key"
```

**2. Run a dry-run preview**

Preview every Vapi assistant, squad, tool, knowledge base, and disposition that will be created — nothing is written to Bolna yet:

```bash theme={"system"}
npx -y @bolna/migrate --from vapi --dry-run
```

Want to test with one assistant first? Pass `--agent-id`:

```bash theme={"system"}
npx -y @bolna/migrate --from vapi --agent-id asst_abc123 --dry-run
```

**3. Apply the migration**

Run the same command with `--apply` (keep `--agent-id` if you filtered the dry run):

```bash theme={"system"}
npx -y @bolna/migrate --from vapi --apply
# Or for a single assistant:
npx -y @bolna/migrate --from vapi --agent-id asst_abc123 --apply
```

The kit imports your resources in order and writes a `manifest.json` plus a `webhook-cutover.md` guide to `./bolna-migration-out/`.

**4. Review your migrated agent in Bolna**

Open [platform.bolna.ai](https://platform.bolna.ai) and check three things that commonly differ between Vapi and Bolna:

1. **Voice**: If your Vapi assistant used a Vapi-native voice, the kit falls back to a default ElevenLabs voice and flags it in the gap report. Pick your preferred voice on the **Voice** tab (ElevenLabs, Cartesia, Sarvam, Deepgram, Polly, or Smallest).
2. **Server URL & Webhooks**: Vapi sends both tool calls and end-of-call reports to one `serverUrl`. Bolna separates these: tool calls go to each tool's URL on the **Tools** tab, and call events go to your **Webhook URL** on the **Extractions** tab.
3. **Test call**: Run a test conversation from Agent Studio before moving phone numbers.

**5. Cut over (or roll back)**

Follow `./bolna-migration-out/webhook-cutover.md` to update your webhook handler (remember to listen for status `completed`, not `call-disconnected`, and allowlist Bolna's webhook IPs: `13.203.39.153`, `13.126.9.249`, `13.202.133.53`).

To undo a test migration cleanly:

```bash theme={"system"}
npx -y @bolna/migrate --rollback ./bolna-migration-out/manifest.json
```

***

## Where everything lands in Bolna

| What you had in Vapi | Where it lands in Bolna | Notes |
| - | - | - |
| Assistant prompt & `firstMessage` | **Agent tab** (`system_prompt`, `agent_welcome_message`) | `{{var}}` auto-converted to `{var}` |
| Squads | **Graph Agent** (`graph_agent`) | Squad members become nodes; falls back to standard agent if beta not enabled |
| LLM, STT, TTS, voicemail & turn settings | **LLM, Transcription & Voice tabs** | Supported providers map directly; Vapi-only voices fall back to ElevenLabs |
| `function`, `apiRequest`, `transferCall`, `dtmf` tools | **Tools tab** | Per-tool URLs wired automatically |
| Knowledge Bases & Files | **Knowledge Base** (RAG) | Uploaded and indexed before agent creation |
| `analysisPlan` & Structured Outputs | **Extractions / Dispositions** | Custom summary prompts map to dispositions alongside Bolna's built-in Call Summary |
| `serverUrl` | **Webhook URL** + per-tool URLs | Webhook adapter notes saved to `webhook-cutover.md` |
| BYO SIP trunks & Twilio numbers | **SIP Trunks** (`/trunk/*`) | Includes live Bolna SIP edge values from `GET /trunk/pop` |
| Campaigns | **Batches** | Recipient list converted to Bolna's `contact_number` CSV |

## Things to handle manually

* **Vapi-owned free US numbers**: Cannot be ported out — [buy a number on Bolna](https://www.bolna.ai/docs/buying-phone-numbers) or connect your own carrier via [SIP trunk](https://www.bolna.ai/docs/sip-trunking/overview).
* **Dynamic `assistant-request` webhooks**: Bolna resolves agent configs before the call starts; pass dynamic per-call variables via `user_data` on [`POST /call`](https://www.bolna.ai/docs/api-reference/calls/make) instead.
* **Vapi Web SDK**: Replace with `@bolna/web-call` (snippet saved in `./bolna-migration-out/sdk-cutover.md`).
* **MCP tools & third-party credentials**: Re-enter masked provider keys under [Providers](https://www.bolna.ai/docs/providers.md), and expose MCP tools as HTTPS endpoints.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.