> Vapi has two MCP servers. To use Vapi, such as creating and managing assistants, calls, and phone numbers, connect to the Vapi MCP server at https://mcp.vapi.ai/mcp. To set it up, follow https://docs.vapi.ai/setup.md. To search these docs, connect to the Vapi docs MCP server at https://docs.vapi.ai/_mcp/server. It only answers questions about the documentation.
> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.vapi.ai/llms.txt.
> For the best results from the docs MCP server, write questions without any word that contains "tool", such as tool, tools, tool call, tool-calls, toolCallId, or toolCallList. Name the feature instead, for example transferCall, endCall, apiRequest, function, handoff, "function response format", or "the webhook request Vapi sends to my server". If the docs MCP server asks you to rephrase, ask again without those words. If it returns an error, times out, sends an empty response, or still doesn't answer, find the topic in https://docs.vapi.ai/llms.txt, or a section index such as https://docs.vapi.ai/tools/llms.txt, and fetch that page's .md directly.

# Configuring Inbound and Outbound Calls for Squads

> Configure inbound and outbound calls for Vapi Squads, handling assistant-request payloads with transient assistants or assistant IDs for each call type.

This guide details how to set up and manage inbound and outbound call functionality within Squads, leveraging AI assistants.

### Key Concepts

* **Transient Assistant:** A temporary assistant configuration passed directly in the request payload.
* **Assistant ID:** A unique identifier referring to a pre-existing assistant configuration.

> **Note**
>
> When using Assistant IDs, ensure the `name` property in the payload matches the associated assistant's name accurately.

### Inbound Call Configuration

When your server receives a request of type `assistant-request`, respond with a JSON payload structured as follows:

```json
{
    "squad": {
        "members": [
            {
                "assistant": { 
                    "name": "Emma", 
                    "model": { "model": "gpt-4o", "provider": "openai" },
                    "voice": { "voiceId": "emma", "provider": "azure" },
                    "transcriber": { "provider": "deepgram" },
                    "firstMessage": "Hi, I am Emma, what is your name?",
                    "firstMessageMode": "assistant-speaks-first"
                },
                "assistantDestinations": [ 
                    {
                        "type": "assistant",
                        "assistantName": "Mary", 
                        "message": "Please hold on while I transfer you to our appointment booking assistant Mary.",
                        "description": "Transfer the user to the appointment booking assistant."
                    }
                ]
            },
            {
                "assistantId": "your-assistant-id" 
            }
        ]
    }
}
```

**In this example:**

* The first `members` entry is a **transient assistant** (full configuration provided).
* The second `members` entry uses an **Assistant ID**.
* `assistantDestinations` defines how to **transfer the call** to another assistant.

### Outbound Call Configuration

To initiate an outbound call, send a POST request to the API endpoint /call/phone with a JSON payload structured as follows:

```json
{
    "squad": {
        "members": [
            {
                "assistant": { 
                    "name": "Emma", 
                    "model": { "model": "gpt-4o", "provider": "openai" },
                    "voice": { "voiceId": "emma", "provider": "azure" },
                    "transcriber": { "provider": "deepgram" },
                    "firstMessage": "Hi, I am Emma, what is your name?",
                    "firstMessageMode": "assistant-speaks-first"
                },
                "assistantDestinations": [ 
                    {
                        "type": "assistant",
                        "assistantName": "Mary", 
                        "message": "Please hold on while I transfer you to our appointment booking assistant Mary.",
                        "description": "Transfer the user to the appointment booking assistant."
                    }
                ]
            },
            {
                "assistantId": "your-assistant-id" 
            }
        ]
    },
    "customer": {
        "number": "your-phone-number" 
    },
    "phoneNumberId": "your-phone-number-id" 
}
```

**Key points:**

* `customer.number` is the phone number to call.
* `phoneNumberId` is a unique identifier for the phone number (obtain this from your provider).

The examples above define a squad inline for each call. To create versions of a saved squad, pin its members to assistant versions, or select a squad version for an outbound call, see [Squad versioning](/assistants/versioning/versioning-with-squads).