# Vapi

> Build and run Vapi voice agents: create assistants, place and read back calls, route phone numbers, and browse past text chats.

App · Voice AI · 16 actions. Web page: https://docs.lodol.com/docs/integrations/vapi

## Actions

### Create assistant

Create a Vapi voice assistant - the agent that answers and places calls. Every field is optional: leave them all empty and Vapi creates one on its own defaults, which you can then shape from the dashboard.

**Inputs**

- Name (`name`, text): A name for your own reference, at most 40 characters. Vapi needs one before a call can be transferred between assistants.
- First message (`first_message`, text): What the assistant says as soon as the call connects. Leave empty and it waits for the caller to speak.
- System prompt (`system_prompt`, text): The instructions the assistant follows - who it is, what it is for, what it must not do.
- Model provider (`model_provider`, text): Who supplies the assistant's model. Defaults to openai. Anything other than openai and vapi needs that provider's credentials added in the Vapi dashboard first. One of: `openai`, `anthropic`, `anthropic-bedrock` (Anthropic on AWS Bedrock), `google`, `groq`, `xai`, `deep-seek` (DeepSeek), `perplexity-ai` (Perplexity AI), `together-ai` (Together AI), `openrouter`, and 7 more.
- Model name (`model_name`, text): Which model to use. Free text rather than a list, because Vapi's model catalogue runs to over 150 entries and retires them on notice. Leave empty to use gpt-4o with openai; every other provider needs one of its own model names.
- Temperature (`temperature`, number): How much the model varies its wording, from 0.0 (always the same) to 2.0. Vapi's default is 0.5. From 0.0 to 2.0.
- Maximum tokens per turn (`max_tokens`, number): The longest reply the model may generate in one turn, from 50 to 10000. Vapi's default is 250, which is about a long sentence or two. From 50 to 10000.
- Voice provider (`voice_provider`, text): Who supplies the assistant's voice. Defaults to vapi, which needs no extra credentials; every other provider has to be connected in the Vapi dashboard first. One of: `vapi`, `openai`, `11labs` (ElevenLabs), `azure`, `cartesia`, `deepgram`, `hume`, `inworld`, `lmnt`, `microsoft`, and 10 more.
- Voice (`voice_id`, text): Which voice to speak with, as that provider names it. Browse and listen to them under Voice Library in the Vapi dashboard. Required if you choose a voice provider.
- Who speaks first (`first_message_mode`, text): Whether the assistant opens the call or waits. One of: `assistant-speaks-first` (The assistant speaks first), `assistant-speaks-first-with-model-generated-message` (The assistant speaks first, in its own words), `assistant-waits-for-user` (The assistant waits for the caller).
- Background sound (`background_sound`, text): Ambience played behind the assistant. Phone calls default to office ambience and web calls to silence. One of: `off` (Silence), `office` (Office ambience).
- Maximum call length, seconds (`max_duration_seconds`, number): Vapi ends the call once it reaches this many seconds, from 10 to 43200. Defaults to 600. From 10 to 43200.
- Sign-off (`end_call_message`, text): What the assistant says before it hangs up. Leave empty and it hangs up without saying anything.
- Voicemail message (`voicemail_message`, text): What the assistant leaves if the call goes to voicemail. Leave empty and it hangs up.
- Hang-up phrases (`end_call_phrases`, list): Phrases that end the call if the assistant says them, such as 'goodbye'. Case insensitive.
- Metadata (`metadata`, object): Anything of your own to store on the assistant, as an object. Vapi keeps it and hands it back; it is never spoken.

**Outputs**

- `analysisPlan` (object)
- `artifactPlan` (object)
- `backgroundSound` (text)
- `backgroundSpeechDenoisingPlan` (object)
- `clientMessages` (list)
- `compliancePlan` (object)
- `createdAt` (text)
- `credentialIds` (list)
- `endCallMessage` (text)
- `endCallPhrases` (list)
- `firstMessage` (text)
- `firstMessageInterruptionsEnabled` (true/false)
- `firstMessageMode` (text)
- `hooks` (list)
- `id` (text)
- `keypadInputPlan` (object)
- `latestVersion` (text)
- `maxDurationSeconds` (number)
- `metadata` (object)
- `model` (object)
- `modelOutputInMessagesEnabled` (true/false)
- `monitorPlan` (object)
- `name` (text)
- `observabilityPlan` (object)
- `orgId` (text)
- `server` (object)
- `serverMessages` (list)
- `startSpeakingPlan` (object)
- `stopSpeakingPlan` (object)
- `transcriber` (object)
- `transportConfigurations` (list)
- `updatedAt` (text)
- `voice` (object)
- `voicemailDetection` (object)
- `voicemailMessage` (text)

**Example output**

```json
{
  "createdAt": "2026-09-01T10:15:00.000Z",
  "firstMessage": "Hi, this is Ada calling from the clinic.",
  "firstMessageMode": "assistant-speaks-first",
  "id": "0c2b1a9e-6f43-4d1e-9a52-3c8f7b6e1d40",
  "maxDurationSeconds": 600,
  "model": {
    "messages": [
      {
        "content": "You remind people of appointments.",
        "role": "system"
      }
    ],
    "model": "gpt-4o",
    "provider": "openai"
  },
  "name": "Appointment reminders",
  "orgId": "3f21c7d8-9b04-4a6e-8f11-72ad5e9c4b03",
  "updatedAt": "2026-09-12T08:40:00.000Z",
  "voice": {
    "provider": "vapi",
    "voiceId": "Elliot"
  }
}
```

### Create squad

Group assistants into a squad so one call can be handed between them. The call starts with the first assistant in the list, so order matters.

**Inputs**

- Name (`name`, text): A name for the squad, for your own reference.
- Assistants (`assistant_ids`, list, required): The assistants in the squad, as a list of ids. The call starts with the first one.

**Outputs**

- `createdAt` (text)
- `id` (text)
- `members` (list)
- `membersOverrides` (object)
- `name` (text)
- `orgId` (text)
- `updatedAt` (text)

**Example output**

```json
{
  "createdAt": "2026-09-05T11:20:00.000Z",
  "id": "e50a7c34-1b8d-4e29-a7f6-5c3b9d0e8f21",
  "members": [
    {
      "assistantId": "0c2b1a9e-6f43-4d1e-9a52-3c8f7b6e1d40"
    }
  ],
  "name": "Front desk",
  "orgId": "3f21c7d8-9b04-4a6e-8f11-72ad5e9c4b03",
  "updatedAt": "2026-09-05T11:20:00.000Z"
}
```

### Delete assistant

Delete a Vapi assistant. Vapi answers with the assistant it deleted. It refuses if a squad, a phone number or a call still pins one of the assistant's versions.

**Inputs**

- Assistant (`assistant_id`, text, required): The assistant to act on. Pick one, or paste its id or the dashboard address that ends in one.

**Outputs**

- `analysisPlan` (object)
- `artifactPlan` (object)
- `backgroundSound` (text)
- `backgroundSpeechDenoisingPlan` (object)
- `clientMessages` (list)
- `compliancePlan` (object)
- `createdAt` (text)
- `credentialIds` (list)
- `endCallMessage` (text)
- `endCallPhrases` (list)
- `firstMessage` (text)
- `firstMessageInterruptionsEnabled` (true/false)
- `firstMessageMode` (text)
- `hooks` (list)
- `id` (text)
- `keypadInputPlan` (object)
- `latestVersion` (text)
- `maxDurationSeconds` (number)
- `metadata` (object)
- `model` (object)
- `modelOutputInMessagesEnabled` (true/false)
- `monitorPlan` (object)
- `name` (text)
- `observabilityPlan` (object)
- `orgId` (text)
- `server` (object)
- `serverMessages` (list)
- `startSpeakingPlan` (object)
- `stopSpeakingPlan` (object)
- `transcriber` (object)
- `transportConfigurations` (list)
- `updatedAt` (text)
- `voice` (object)
- `voicemailDetection` (object)
- `voicemailMessage` (text)

**Example output**

```json
{
  "createdAt": "2026-09-01T10:15:00.000Z",
  "firstMessage": "Hi, this is Ada calling from the clinic.",
  "firstMessageMode": "assistant-speaks-first",
  "id": "0c2b1a9e-6f43-4d1e-9a52-3c8f7b6e1d40",
  "maxDurationSeconds": 600,
  "model": {
    "messages": [
      {
        "content": "You remind people of appointments.",
        "role": "system"
      }
    ],
    "model": "gpt-4o",
    "provider": "openai"
  },
  "name": "Appointment reminders",
  "orgId": "3f21c7d8-9b04-4a6e-8f11-72ad5e9c4b03",
  "updatedAt": "2026-09-12T08:40:00.000Z",
  "voice": {
    "provider": "vapi",
    "voiceId": "Elliot"
  }
}
```

### Delete squad

Delete a squad. The assistants that were in it are left alone; only the grouping goes.

**Inputs**

- Squad (`squad_id`, text, required): The squad to act on. Pick one, or paste its id or the dashboard address that ends in one.

**Outputs**

- `createdAt` (text)
- `id` (text)
- `members` (list)
- `membersOverrides` (object)
- `name` (text)
- `orgId` (text)
- `updatedAt` (text)

**Example output**

```json
{
  "createdAt": "2026-09-05T11:20:00.000Z",
  "id": "e50a7c34-1b8d-4e29-a7f6-5c3b9d0e8f21",
  "members": [
    {
      "assistantId": "0c2b1a9e-6f43-4d1e-9a52-3c8f7b6e1d40"
    }
  ],
  "name": "Front desk",
  "orgId": "3f21c7d8-9b04-4a6e-8f11-72ad5e9c4b03",
  "updatedAt": "2026-09-05T11:20:00.000Z"
}
```

### Get assistant

One assistant's full configuration: its model and system prompt, its voice, what it says first, and every plan attached to it.

**Inputs**

- Assistant (`assistant_id`, text, required): The assistant to act on. Pick one, or paste its id or the dashboard address that ends in one.

**Outputs**

- `analysisPlan` (object)
- `artifactPlan` (object)
- `backgroundSound` (text)
- `backgroundSpeechDenoisingPlan` (object)
- `clientMessages` (list)
- `compliancePlan` (object)
- `createdAt` (text)
- `credentialIds` (list)
- `endCallMessage` (text)
- `endCallPhrases` (list)
- `firstMessage` (text)
- `firstMessageInterruptionsEnabled` (true/false)
- `firstMessageMode` (text)
- `hooks` (list)
- `id` (text)
- `keypadInputPlan` (object)
- `latestVersion` (text)
- `maxDurationSeconds` (number)
- `metadata` (object)
- `model` (object)
- `modelOutputInMessagesEnabled` (true/false)
- `monitorPlan` (object)
- `name` (text)
- `observabilityPlan` (object)
- `orgId` (text)
- `server` (object)
- `serverMessages` (list)
- `startSpeakingPlan` (object)
- `stopSpeakingPlan` (object)
- `transcriber` (object)
- `transportConfigurations` (list)
- `updatedAt` (text)
- `voice` (object)
- `voicemailDetection` (object)
- `voicemailMessage` (text)

**Example output**

```json
{
  "createdAt": "2026-09-01T10:15:00.000Z",
  "firstMessage": "Hi, this is Ada calling from the clinic.",
  "firstMessageMode": "assistant-speaks-first",
  "id": "0c2b1a9e-6f43-4d1e-9a52-3c8f7b6e1d40",
  "maxDurationSeconds": 600,
  "model": {
    "messages": [
      {
        "content": "You remind people of appointments.",
        "role": "system"
      }
    ],
    "model": "gpt-4o",
    "provider": "openai"
  },
  "name": "Appointment reminders",
  "orgId": "3f21c7d8-9b04-4a6e-8f11-72ad5e9c4b03",
  "updatedAt": "2026-09-12T08:40:00.000Z",
  "voice": {
    "provider": "vapi",
    "voiceId": "Elliot"
  }
}
```

### Get phone number

One phone number: its telephony provider, its status, and the assistant or squad that answers on it.

**Inputs**

- Phone number (`phone_number_id`, text, required): The phone number to act on. Pick one, or paste its id. Numbers live under Phone Numbers in the Vapi dashboard.

**Outputs**

- `assistantId` (text)
- `createdAt` (text)
- `fallbackDestination` (object)
- `hooks` (list)
- `id` (text)
- `name` (text)
- `number` (text)
- `orgId` (text)
- `provider` (text)
- `server` (object)
- `squadId` (text)
- `status` (text)
- `updatedAt` (text)
- `workflowId` (text)

**Example output**

```json
{
  "assistantId": "0c2b1a9e-6f43-4d1e-9a52-3c8f7b6e1d40",
  "createdAt": "2026-08-20T12:00:00.000Z",
  "id": "6d9c0f2b-4a7e-4c15-b3d8-0e5f1a2c3d47",
  "name": "Clinic line",
  "number": "+15551234567",
  "orgId": "3f21c7d8-9b04-4a6e-8f11-72ad5e9c4b03",
  "provider": "vapi",
  "status": "active",
  "updatedAt": "2026-09-12T08:45:00.000Z"
}
```

### Get squad

One squad, with its members in order and any overrides applied across them.

**Inputs**

- Squad (`squad_id`, text, required): The squad to act on. Pick one, or paste its id or the dashboard address that ends in one.

**Outputs**

- `createdAt` (text)
- `id` (text)
- `members` (list)
- `membersOverrides` (object)
- `name` (text)
- `orgId` (text)
- `updatedAt` (text)

**Example output**

```json
{
  "createdAt": "2026-09-05T11:20:00.000Z",
  "id": "e50a7c34-1b8d-4e29-a7f6-5c3b9d0e8f21",
  "members": [
    {
      "assistantId": "0c2b1a9e-6f43-4d1e-9a52-3c8f7b6e1d40"
    }
  ],
  "name": "Front desk",
  "orgId": "3f21c7d8-9b04-4a6e-8f11-72ad5e9c4b03",
  "updatedAt": "2026-09-05T11:20:00.000Z"
}
```

### List assistants

The assistants on your Vapi organisation, with each one's id, name, model and voice.

**Inputs**

- Name contains (`name_contains`, text): Only assistants whose name contains this text. Vapi has no name filter of its own, so this narrows the records that came back rather than the request.
- Maximum records (`limit`, number): The most records to return, from 1 to 1000. Defaults to 50. From 1 to 1000. Default: `50`.
- Created on or after (`created_after`, date and time): Only records created at or after this moment.
- Created on or before (`created_before`, date and time): Only records created at or before this moment.

**Outputs**

- `assistants` (list): The assistants that matched
- `count` (number): How many assistants came back

**Example output**

```json
{
  "assistants": [
    {
      "createdAt": "2026-09-01T10:15:00.000Z",
      "firstMessage": "Hi, this is Ada calling from the clinic.",
      "firstMessageMode": "assistant-speaks-first",
      "id": "0c2b1a9e-6f43-4d1e-9a52-3c8f7b6e1d40",
      "maxDurationSeconds": 600,
      "model": {
        "messages": [
          {
            "content": "You remind people of appointments.",
            "role": "system"
          }
        ],
        "model": "gpt-4o",
        "provider": "openai"
      },
      "name": "Appointment reminders",
      "orgId": "3f21c7d8-9b04-4a6e-8f11-72ad5e9c4b03",
      "updatedAt": "2026-09-12T08:40:00.000Z",
      "voice": {
        "provider": "vapi",
        "voiceId": "Elliot"
      }
    }
  ],
  "count": 1
}
```

### List calls

The calls on your Vapi organisation, newest first, with each one's status, cost and how it ended. Narrow by assistant, by phone number, or by when the call was made.

**Inputs**

- Assistant (`assistant_id`, text): Only records belonging to this assistant. Leave empty for all of them.
- Phone number (`phone_number_id`, text): Only calls on this number. Leave empty for all of them.
- Maximum records (`limit`, number): The most records to return, from 1 to 1000. Defaults to 50. From 1 to 1000. Default: `50`.
- Created on or after (`created_after`, date and time): Only records created at or after this moment.
- Created on or before (`created_before`, date and time): Only records created at or before this moment.

**Outputs**

- `calls` (list): The calls that matched
- `count` (number): How many calls came back

**Example output**

```json
{
  "calls": [
    {
      "assistantId": "0c2b1a9e-6f43-4d1e-9a52-3c8f7b6e1d40",
      "cost": 0.0412,
      "createdAt": "2026-09-12T09:00:00.000Z",
      "endedAt": "2026-09-12T09:02:28.000Z",
      "endedReason": "customer-ended-call",
      "id": "b7e4d2c1-58fa-4f37-9c60-1d8e2a4f9b55",
      "name": "Reminder for Tuesday",
      "orgId": "3f21c7d8-9b04-4a6e-8f11-72ad5e9c4b03",
      "phoneNumberId": "6d9c0f2b-4a7e-4c15-b3d8-0e5f1a2c3d47",
      "startedAt": "2026-09-12T09:00:04.000Z",
      "status": "ended",
      "type": "outboundPhoneCall",
      "updatedAt": "2026-09-12T09:02:31.000Z"
    }
  ],
  "count": 1
}
```

### List chats

The text chats on your Vapi organisation, a page at a time, newest first. This is the one Vapi list that pages, so it reports which page you are on and how many there are.

**Inputs**

- Assistant (`assistant_id`, text): Only records belonging to this assistant. Leave empty for all of them.
- Session (`session_id`, text): Only chats in this session. Leave empty for all of them.
- Page (`page`, number): Which page to fetch, counting from 1. From 1 to 1000000. Default: `1`.
- Maximum records (`limit`, number): The most records to return, from 1 to 1000. Defaults to 50. From 1 to 1000. Default: `50`.
- Sort by (`sort_by`, text): What to order the chats by. One of: `createdAt` (When it was created), `duration` (How long it took), `cost` (What it cost).
- Order (`sort_order`, text): Which way round to sort them. One of: `DESC` (Newest first), `ASC` (Oldest first).

**Outputs**

- `chats` (list): The chats on this page
- `count` (number): How many chats are on this page
- `has_next_page` (true/false): Whether another page is available
- `page` (number): Which page this is, counting from 1
- `total_items` (number): How many chats match the filters in total
- `total_pages` (number): How many pages there are

**Example output**

```json
{
  "chats": [
    {
      "assistantId": "0c2b1a9e-6f43-4d1e-9a52-3c8f7b6e1d40",
      "cost": 0.0031,
      "createdAt": "2026-09-13T14:05:00.000Z",
      "id": "c92b4e17-6a35-4f80-b1d2-8e7c0a5f3b64",
      "input": "When is my appointment?",
      "name": "Reception test",
      "orgId": "3f21c7d8-9b04-4a6e-8f11-72ad5e9c4b03",
      "output": [
        {
          "content": "Your appointment is on Tuesday at 3pm.",
          "role": "assistant"
        }
      ],
      "reply": "Your appointment is on Tuesday at 3pm.",
      "sessionId": "7a1e5c92-3b47-4d68-8f0a-2c6b9e4d1f35",
      "updatedAt": "2026-09-13T14:05:02.000Z"
    }
  ],
  "count": 1,
  "has_next_page": false,
  "page": 1,
  "total_items": 1,
  "total_pages": 1
}
```

### List phone numbers

The phone numbers on your Vapi account, with what each one answers with. Telephony credentials stored against a number are never returned.

**Inputs**

- Maximum records (`limit`, number): The most records to return, from 1 to 1000. Defaults to 50. From 1 to 1000. Default: `50`.
- Created on or after (`created_after`, date and time): Only records created at or after this moment.
- Created on or before (`created_before`, date and time): Only records created at or before this moment.

**Outputs**

- `count` (number): How many phone numbers came back
- `phone_numbers` (list): The phone numbers on the account

**Example output**

```json
{
  "count": 1,
  "phone_numbers": [
    {
      "assistantId": "0c2b1a9e-6f43-4d1e-9a52-3c8f7b6e1d40",
      "createdAt": "2026-08-20T12:00:00.000Z",
      "id": "6d9c0f2b-4a7e-4c15-b3d8-0e5f1a2c3d47",
      "name": "Clinic line",
      "number": "+15551234567",
      "orgId": "3f21c7d8-9b04-4a6e-8f11-72ad5e9c4b03",
      "provider": "vapi",
      "status": "active",
      "updatedAt": "2026-09-12T08:45:00.000Z"
    }
  ]
}
```

### List squads

The squads on your Vapi organisation and the assistants that make each one up.

**Inputs**

- Maximum records (`limit`, number): The most records to return, from 1 to 1000. Defaults to 50. From 1 to 1000. Default: `50`.
- Created on or after (`created_after`, date and time): Only records created at or after this moment.
- Created on or before (`created_before`, date and time): Only records created at or before this moment.

**Outputs**

- `count` (number): How many squads came back
- `squads` (list): The squads that matched

**Example output**

```json
{
  "count": 1,
  "squads": [
    {
      "createdAt": "2026-09-05T11:20:00.000Z",
      "id": "e50a7c34-1b8d-4e29-a7f6-5c3b9d0e8f21",
      "members": [
        {
          "assistantId": "0c2b1a9e-6f43-4d1e-9a52-3c8f7b6e1d40"
        }
      ],
      "name": "Front desk",
      "orgId": "3f21c7d8-9b04-4a6e-8f11-72ad5e9c4b03",
      "updatedAt": "2026-09-05T11:20:00.000Z"
    }
  ]
}
```

### List tools

The tools on your Vapi organisation - the functions, API requests, transfers and integrations an assistant can be given. Use this to find a tool's id. Tools are built in the Vapi dashboard, where each of the twenty-five kinds has its own form.

**Inputs**

- Maximum records (`limit`, number): The most records to return, from 1 to 1000. Defaults to 50. From 1 to 1000. Default: `50`.
- Created on or after (`created_after`, date and time): Only records created at or after this moment.
- Created on or before (`created_before`, date and time): Only records created at or before this moment.

**Outputs**

- `count` (number): How many tools came back
- `tools` (list): The tools on the organisation

**Example output**

```json
{
  "count": 1,
  "tools": [
    {
      "createdAt": "2026-08-28T16:30:00.000Z",
      "function": {
        "description": "Book an appointment for the caller.",
        "name": "book_appointment"
      },
      "id": "a41f8b60-2d93-41e7-8c5b-7e0d6f4a9128",
      "orgId": "3f21c7d8-9b04-4a6e-8f11-72ad5e9c4b03",
      "type": "function",
      "updatedAt": "2026-08-28T16:30:00.000Z"
    }
  ]
}
```

### Query call analytics

Aggregate your Vapi calls: how many there were, what they cost, how long they ran, broken down by assistant, status or why they ended. Defaults to the last seven days.

**Inputs**

- What to measure (`table`, text): Calls, or your subscription's usage. Defaults to calls. One of: `call` (Calls), `subscription` (Subscription usage). Default: `call`.
- Aggregate (`metric`, text, required): How to combine the values. One of: `count` (How many), `sum` (Total), `avg` (Average), `min` (Smallest), `max` (Largest), `history` (Value over time).
- Over (`column`, text, required): Which value to aggregate. To count calls, choose the 'how many' aggregate over 'Calls (count them by id)'. One of: `id` (Calls (count them by id)), `cost` (Total cost, USD), `duration` (Call duration), `minutesUsed` (Minutes used), `concurrency` (Concurrent calls), `costBreakdown.llm` (Cost: model), `costBreakdown.stt` (Cost: speech to text), `costBreakdown.tts` (Cost: text to speech), `costBreakdown.vapi` (Cost: Vapi), `costBreakdown.transport` (Cost: telephony), and 6 more.
- Break down by (`group_by`, list): Split the answer into one row per value of these. Leave empty for a single total. One or more of: `assistantId` (Assistant), `type` (Call type), `status` (Call status), `endedReason` (Why the call ended), `analysis.successEvaluation` (Success evaluation).
- From (`start`, date and time): The start of the range. Vapi defaults to seven days ago.
- To (`end`, date and time): The end of the range. Vapi defaults to now.
- Bucket by (`step`, text): Split the range into buckets of this size. Leave empty for one bucket covering the whole range. One of: `second` (Per second), `minute` (Per minute), `hour` (Per hour), `day` (Per day), `week` (Per week), `month` (Per month), `quarter` (Per quarter), `year` (Per year), `decade` (Per decade), `century` (Per century), `millennium` (Per millennium).
- Time zone (`timezone_name`, text): The zone the buckets are aligned to, as an IANA name such as Europe/London. Vapi defaults to UTC.

**Outputs**

- `column` (text): The column it was computed over
- `count` (number): How many groups came back
- `metric` (text): The aggregate that was asked for
- `rows` (list): One entry per group. Each is keyed by the columns you grouped by plus the aggregate itself, named after the operation and the column - 'countId', 'sumCost'. The keys therefore depend on what was asked for, so they are not described further.
- `time_range` (object)

**Example output**

```json
{
  "column": "id",
  "count": 1,
  "metric": "count",
  "rows": [
    {
      "assistantId": "0c2b1a9e",
      "countId": 42
    }
  ],
  "time_range": {
    "end": "2026-09-14T00:00:00.000Z",
    "start": "2026-09-07T00:00:00.000Z",
    "step": "day",
    "timezone": "UTC"
  }
}
```

### Update assistant

Change a Vapi assistant. Only the fields you fill in change; the rest are left exactly as they were. This writes the live assistant - the dashboard's draft-and-publish flow is its own per-person workspace and there is nothing to publish afterwards.

**Inputs**

- Assistant (`assistant_id`, text, required): The assistant to act on. Pick one, or paste its id or the dashboard address that ends in one.
- Name (`name`, text): A name for your own reference, at most 40 characters. Vapi needs one before a call can be transferred between assistants.
- First message (`first_message`, text): What the assistant says as soon as the call connects. Leave empty and it waits for the caller to speak.
- System prompt (`system_prompt`, text): The instructions the assistant follows - who it is, what it is for, what it must not do.
- Model provider (`model_provider`, text): Who supplies the assistant's model. Defaults to openai. Anything other than openai and vapi needs that provider's credentials added in the Vapi dashboard first. One of: `openai`, `anthropic`, `anthropic-bedrock` (Anthropic on AWS Bedrock), `google`, `groq`, `xai`, `deep-seek` (DeepSeek), `perplexity-ai` (Perplexity AI), `together-ai` (Together AI), `openrouter`, and 7 more.
- Model name (`model_name`, text): Which model to use. Free text rather than a list, because Vapi's model catalogue runs to over 150 entries and retires them on notice. Leave empty to use gpt-4o with openai; every other provider needs one of its own model names.
- Temperature (`temperature`, number): How much the model varies its wording, from 0.0 (always the same) to 2.0. Vapi's default is 0.5. From 0.0 to 2.0.
- Maximum tokens per turn (`max_tokens`, number): The longest reply the model may generate in one turn, from 50 to 10000. Vapi's default is 250, which is about a long sentence or two. From 50 to 10000.
- Voice provider (`voice_provider`, text): Who supplies the assistant's voice. Defaults to vapi, which needs no extra credentials; every other provider has to be connected in the Vapi dashboard first. One of: `vapi`, `openai`, `11labs` (ElevenLabs), `azure`, `cartesia`, `deepgram`, `hume`, `inworld`, `lmnt`, `microsoft`, and 10 more.
- Voice (`voice_id`, text): Which voice to speak with, as that provider names it. Browse and listen to them under Voice Library in the Vapi dashboard. Required if you choose a voice provider.
- Who speaks first (`first_message_mode`, text): Whether the assistant opens the call or waits. One of: `assistant-speaks-first` (The assistant speaks first), `assistant-speaks-first-with-model-generated-message` (The assistant speaks first, in its own words), `assistant-waits-for-user` (The assistant waits for the caller).
- Background sound (`background_sound`, text): Ambience played behind the assistant. Phone calls default to office ambience and web calls to silence. One of: `off` (Silence), `office` (Office ambience).
- Maximum call length, seconds (`max_duration_seconds`, number): Vapi ends the call once it reaches this many seconds, from 10 to 43200. Defaults to 600. From 10 to 43200.
- Sign-off (`end_call_message`, text): What the assistant says before it hangs up. Leave empty and it hangs up without saying anything.
- Voicemail message (`voicemail_message`, text): What the assistant leaves if the call goes to voicemail. Leave empty and it hangs up.
- Hang-up phrases (`end_call_phrases`, list): Phrases that end the call if the assistant says them, such as 'goodbye'. Case insensitive.
- Metadata (`metadata`, object): Anything of your own to store on the assistant, as an object. Vapi keeps it and hands it back; it is never spoken.

**Outputs**

- `analysisPlan` (object)
- `artifactPlan` (object)
- `backgroundSound` (text)
- `backgroundSpeechDenoisingPlan` (object)
- `clientMessages` (list)
- `compliancePlan` (object)
- `createdAt` (text)
- `credentialIds` (list)
- `endCallMessage` (text)
- `endCallPhrases` (list)
- `firstMessage` (text)
- `firstMessageInterruptionsEnabled` (true/false)
- `firstMessageMode` (text)
- `hooks` (list)
- `id` (text)
- `keypadInputPlan` (object)
- `latestVersion` (text)
- `maxDurationSeconds` (number)
- `metadata` (object)
- `model` (object)
- `modelOutputInMessagesEnabled` (true/false)
- `monitorPlan` (object)
- `name` (text)
- `observabilityPlan` (object)
- `orgId` (text)
- `server` (object)
- `serverMessages` (list)
- `startSpeakingPlan` (object)
- `stopSpeakingPlan` (object)
- `transcriber` (object)
- `transportConfigurations` (list)
- `updatedAt` (text)
- `voice` (object)
- `voicemailDetection` (object)
- `voicemailMessage` (text)

**Example output**

```json
{
  "createdAt": "2026-09-01T10:15:00.000Z",
  "firstMessage": "Hi, this is Ada calling from the clinic.",
  "firstMessageMode": "assistant-speaks-first",
  "id": "0c2b1a9e-6f43-4d1e-9a52-3c8f7b6e1d40",
  "maxDurationSeconds": 600,
  "model": {
    "messages": [
      {
        "content": "You remind people of appointments.",
        "role": "system"
      }
    ],
    "model": "gpt-4o",
    "provider": "openai"
  },
  "name": "Appointment reminders",
  "orgId": "3f21c7d8-9b04-4a6e-8f11-72ad5e9c4b03",
  "updatedAt": "2026-09-12T08:40:00.000Z",
  "voice": {
    "provider": "vapi",
    "voiceId": "Elliot"
  }
}
```

### Update phone number

Route a Vapi phone number to an assistant or a squad, rename it, or point its webhook somewhere new. Only the fields you fill in change. Vapi needs to be told which telephony provider the number is on; this reads that off the number itself, so you never have to.

**Inputs**

- Phone number (`phone_number_id`, text, required): The phone number to act on. Pick one, or paste its id. Numbers live under Phone Numbers in the Vapi dashboard.
- Assistant (`assistant_id`, text): The assistant that should answer on this number. Leave empty to leave the routing alone.
- Squad (`squad_id`, text): A squad to answer on this number instead of a single assistant. Set this or the assistant, not both.
- Name (`name`, text): A label for this number in your Vapi dashboard, at most 40 characters.
- Webhook URL (`server_url`, text): Where Vapi should post this number's call events. Give the plain address, with no query string or fragment.

**Outputs**

- `assistantId` (text)
- `createdAt` (text)
- `fallbackDestination` (object)
- `hooks` (list)
- `id` (text)
- `name` (text)
- `number` (text)
- `orgId` (text)
- `provider` (text)
- `server` (object)
- `squadId` (text)
- `status` (text)
- `updatedAt` (text)
- `workflowId` (text)

**Example output**

```json
{
  "assistantId": "0c2b1a9e-6f43-4d1e-9a52-3c8f7b6e1d40",
  "createdAt": "2026-08-20T12:00:00.000Z",
  "id": "6d9c0f2b-4a7e-4c15-b3d8-0e5f1a2c3d47",
  "name": "Clinic line",
  "number": "+15551234567",
  "orgId": "3f21c7d8-9b04-4a6e-8f11-72ad5e9c4b03",
  "provider": "vapi",
  "status": "active",
  "updatedAt": "2026-09-12T08:45:00.000Z"
}
```
