Skip to content

Commit 2910d6a

Browse files
authored
VAP-5163: Add outbound docs (#278)
* add outbound docs * fix * fix * example
1 parent d934ec8 commit 2910d6a

File tree

4 files changed

+96
-16
lines changed

4 files changed

+96
-16
lines changed

fern/apis/webhooks/openapi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ paths:
2828
summary: Client Message
2929
description: |
3030
These are all the webhook messages that will be sent to the client-side SDKs during the call.
31-
Configure the messages you'd like to receive in `assistant.clientMessages``.
31+
Configure the messages you'd like to receive in `assistant.clientMessages`.
3232
3333
requestBody:
3434
content:

fern/calls/call-outbound.mdx

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
## Introduction to Outbound Calling
2+
3+
Vapi’s outbound calling API lets you programmatically initiate single or batch calls to any phone number. You can schedule calls for specific dates and times, ideal for time-sensitive communications. Easily integrate outbound calling into your app for appointment reminders, automated surveys, and call campaigns.
4+
5+
## Prerequisites
6+
7+
- **Vapi Account**: Access to the Vapi Dashboard for configuration.
8+
- **Configured Assistant**: Either a saved assistant or a transient assistant.
9+
- **Phone Number**: Either an imported phone number from one of the supported providers or a free Vapi number. (Note: You cannot make international calls with a free Vapi number).
10+
- **Customer's Phone Number**: The phone number that you want to call.
11+
12+
## Outbound Calls
13+
14+
You can place an outbound call from one of your phone numbers using the [`/call`](/api-reference/calls/create-phone-call) endpoint.
15+
16+
1. **Specify an Assistant:** you must specify either a transient assistant in the `assistant` field or reuse a saved assistant in the `assistantId` field.
17+
2. **Get a Phone Number:** provide the `phoneNumberId` of the imported number or free Vapi number you wish to call from.
18+
3. **Provide a Destination:** Finally, pass the customer's phone number or SIP URI in [`customer`](/api-reference/calls/create-phone-call#request.body.customer).
19+
20+
Provide your authorization token and now we're ready to issue the API call!
21+
22+
```jsx
23+
{
24+
"assistantId": "assistant-id",
25+
"phoneNumberId": "phone-number-id",
26+
"customer": {
27+
"number": "+11231231234"
28+
}
29+
}
30+
```
31+
32+
## Scheduling Outbound Calls
33+
34+
To schedule a call for the future, use the [`schedulePlan`](/api-reference/calls/create-phone-call#request.body.schedulePlan) parameter and pass a future ISO date-time string to `earliestAt`. This will be the earliest time Vapi will attempt to trigger the outbound call. You may also provider `latestAt`, which will be the latest time Vapi will attempt to trigger the call.
35+
36+
When you schedule a call, we will save the Assistant, Phone Number, and Customer Number resources and refetch them at the time of the call. If you choose to provide a saved assistant through `assistantId`, we will pick up the most up-to-date version of your assistant at the call time. Likewise, if you delete your saved assistant, the call will fail! To ensure the call is issued with a static version of an assistant, pass it as a transient assistant through the `assistant` parameter.
37+
38+
```jsx
39+
{
40+
"assistantId": "assistant-id",
41+
"phoneNumberId": "phone-number-id",
42+
"customer": {
43+
"number": "+11231231234"
44+
},
45+
"schedulePlan": {
46+
"earliestAt": "2025-05-30T00:00:00Z"
47+
}
48+
}
49+
```
50+
51+
## Batch Calling
52+
53+
To call more than one number at a time, use the [`customers`](/api-reference/calls/create-phone-call#request.body.customers) parameter to pass an array of `customer`. To provide customer specific assistant overrides, please call the endpoint separately for each destination number.
54+
55+
Use both `customers` and `schedulePlan` together to schedule batched calls.
56+
57+
```jsx
58+
{
59+
"assistantId": "assistant-id",
60+
"phoneNumberId": "phone-number-id",
61+
"customers": [
62+
{
63+
"number": "+11231231234"
64+
},
65+
{
66+
"number": "+12342342345"
67+
}
68+
],
69+
"schedulePlan": {
70+
"earliestAt": "2025-05-30T00:00:00Z"
71+
}
72+
}
73+
```
74+
75+
Note: Vapi free numbers have limited number of outbound calls per day. Import a number from Twilio, Vonage, or Telnyx to scale without limits.
76+
77+
<Warning>
78+
It is a violation of FCC law to dial phone numbers without consent in an
79+
automated manner. See [Telemarketing Sales
80+
Rule](/glossary#telemarketing-sales-rule) to learn more.
81+
</Warning>

fern/docs.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ navigation:
201201
contents:
202202
- page: Twilio
203203
path: advanced/sip/sip-twilio.mdx
204-
- page: Telnyx
204+
- page: Telnyx
205205
path: advanced/sip/sip-telnyx.mdx
206206
- page: Zadarma
207207
path: advanced/sip/sip-zadarma.mdx
@@ -344,24 +344,13 @@ navigation:
344344
- page: Vapify
345345
path: providers/vapify.mdx
346346

347-
- section: Test
348-
collapsed: true
349-
contents:
350-
- page: Test Suites
351-
path: test/test-suites.mdx
352-
- page: Chat Testing
353-
path: test/chat-testing.mdx
354-
- page: Voice Testing
355-
path: test/voice-testing.mdx
356-
357-
- section: Deploy
358-
collapsed: true
359-
contents:
360347
- section: Calls
361348
path: phone-calling.mdx
362349
contents:
363350
- page: Call Forwarding
364351
path: call-forwarding.mdx
352+
- page: Outbound Calls
353+
path: calls/call-outbound.mdx
365354
- page: Dynamic Call Transfers
366355
path: calls/call-dynamic-transfers.mdx
367356
- page: Ended Reason
@@ -402,6 +391,16 @@ navigation:
402391
- page: Server Authentication
403392
path: server-url/server-authentication.mdx
404393

394+
- section: Test
395+
collapsed: true
396+
contents:
397+
- page: Test Suites
398+
path: test/test-suites.mdx
399+
- page: Chat Testing
400+
path: test/chat-testing.mdx
401+
- page: Voice Testing
402+
path: test/voice-testing.mdx
403+
405404
- section: Community
406405
collapsed: true
407406
contents:

fern/phone-calling.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ If you want to use your own phone number, you can also use the dashboard or the
1717

1818
<Accordion title="Outbound Calls">
1919
You can place an outbound call from one of your phone numbers using the
20-
[`/call/phone`](/api-reference/calls/create-phone-call) endpoint. If the system message will be
20+
[`/call`](/api-reference/calls/create-phone-call) endpoint. If the system message will be
2121
different with every call, you can specify a temporary assistant in the `assistant` field. If you
2222
want to reuse an assistant, you can specify its ID in the `assistantId` field.
2323
</Accordion>

0 commit comments

Comments
 (0)