diff --git a/fern/apis/webhooks/openapi.yml b/fern/apis/webhooks/openapi.yml index 5ef96413b..0ad26cdd9 100644 --- a/fern/apis/webhooks/openapi.yml +++ b/fern/apis/webhooks/openapi.yml @@ -28,7 +28,7 @@ paths: summary: Client Message description: | These are all the webhook messages that will be sent to the client-side SDKs during the call. - Configure the messages you'd like to receive in `assistant.clientMessages``. + Configure the messages you'd like to receive in `assistant.clientMessages`. requestBody: content: diff --git a/fern/calls/call-outbound.mdx b/fern/calls/call-outbound.mdx new file mode 100644 index 000000000..3f3a119c0 --- /dev/null +++ b/fern/calls/call-outbound.mdx @@ -0,0 +1,81 @@ +## Introduction to Outbound Calling + +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. + +## Prerequisites + +- **Vapi Account**: Access to the Vapi Dashboard for configuration. +- **Configured Assistant**: Either a saved assistant or a transient assistant. +- **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). +- **Customer's Phone Number**: The phone number that you want to call. + +## Outbound Calls + +You can place an outbound call from one of your phone numbers using the [`/call`](/api-reference/calls/create-phone-call) endpoint. + +1. **Specify an Assistant:** you must specify either a transient assistant in the `assistant` field or reuse a saved assistant in the `assistantId` field. +2. **Get a Phone Number:** provide the `phoneNumberId` of the imported number or free Vapi number you wish to call from. +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). + +Provide your authorization token and now we're ready to issue the API call! + +```jsx +{ + "assistantId": "assistant-id", + "phoneNumberId": "phone-number-id", + "customer": { + "number": "+11231231234" + } +} +``` + +## Scheduling Outbound Calls + +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. + +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. + +```jsx +{ + "assistantId": "assistant-id", + "phoneNumberId": "phone-number-id", + "customer": { + "number": "+11231231234" + }, + "schedulePlan": { + "earliestAt": "2025-05-30T00:00:00Z" + } +} +``` + +## Batch Calling + +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. + +Use both `customers` and `schedulePlan` together to schedule batched calls. + +```jsx +{ + "assistantId": "assistant-id", + "phoneNumberId": "phone-number-id", + "customers": [ + { + "number": "+11231231234" + }, + { + "number": "+12342342345" + } + ], + "schedulePlan": { + "earliestAt": "2025-05-30T00:00:00Z" + } +} +``` + +Note: Vapi free numbers have limited number of outbound calls per day. Import a number from Twilio, Vonage, or Telnyx to scale without limits. + + + It is a violation of FCC law to dial phone numbers without consent in an + automated manner. See [Telemarketing Sales + Rule](/glossary#telemarketing-sales-rule) to learn more. + \ No newline at end of file diff --git a/fern/docs.yml b/fern/docs.yml index a36ce7b08..0960d7dc1 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -201,7 +201,7 @@ navigation: contents: - page: Twilio path: advanced/sip/sip-twilio.mdx - - page: Telnyx + - page: Telnyx path: advanced/sip/sip-telnyx.mdx - page: Zadarma path: advanced/sip/sip-zadarma.mdx @@ -344,24 +344,13 @@ navigation: - page: Vapify path: providers/vapify.mdx - - section: Test - collapsed: true - contents: - - page: Test Suites - path: test/test-suites.mdx - - page: Chat Testing - path: test/chat-testing.mdx - - page: Voice Testing - path: test/voice-testing.mdx - - - section: Deploy - collapsed: true - contents: - section: Calls path: phone-calling.mdx contents: - page: Call Forwarding path: call-forwarding.mdx + - page: Outbound Calls + path: calls/call-outbound.mdx - page: Dynamic Call Transfers path: calls/call-dynamic-transfers.mdx - page: Ended Reason @@ -402,6 +391,16 @@ navigation: - page: Server Authentication path: server-url/server-authentication.mdx + - section: Test + collapsed: true + contents: + - page: Test Suites + path: test/test-suites.mdx + - page: Chat Testing + path: test/chat-testing.mdx + - page: Voice Testing + path: test/voice-testing.mdx + - section: Community collapsed: true contents: diff --git a/fern/phone-calling.mdx b/fern/phone-calling.mdx index 7a4a0ba91..2e25d3eb7 100644 --- a/fern/phone-calling.mdx +++ b/fern/phone-calling.mdx @@ -17,7 +17,7 @@ If you want to use your own phone number, you can also use the dashboard or the You can place an outbound call from one of your phone numbers using the - [`/call/phone`](/api-reference/calls/create-phone-call) endpoint. If the system message will be + [`/call`](/api-reference/calls/create-phone-call) endpoint. If the system message will be different with every call, you can specify a temporary assistant in the `assistant` field. If you want to reuse an assistant, you can specify its ID in the `assistantId` field.