Skip to content

Commit b27b98b

Browse files
sahilsuman933cursoragentsahil
authored
Add documentation for Inbound SMS feature with Twilio (#622)
Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: sahil <[email protected]>
1 parent 631cfae commit b27b98b

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

fern/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ navigation:
310310
- page: Free Vapi number
311311
path: phone-numbers/free-telephony.mdx
312312
icon: fa-light fa-gift
313+
- page: Inbound SMS
314+
path: phone-numbers/inbound-sms.mdx
315+
icon: fa-light fa-message
313316
- section: Telephony integrations
314317
icon: fa-light fa-link
315318
contents:

fern/phone-numbers/inbound-sms.mdx

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: Inbound SMS
3+
subtitle: Let agents auto-start chats from incoming text messages (US only)
4+
slug: phone-numbers/inbound-sms
5+
---
6+
7+
## Overview
8+
9+
Vapi agents can automatically initiate a conversation when your number receives an inbound SMS.
10+
11+
<Warning>
12+
Inbound SMS is currently supported only for **Twilio US numbers** with **SMS enabled**, and only for **US ↔ US** messaging. Messages sent from or to non‑US numbers are not supported.
13+
</Warning>
14+
15+
When enabled, Vapi configures the Twilio Messaging webhook on your number so inbound texts start a session with your agent.
16+
17+
<Tip>
18+
Prefer a walkthrough? Watch the video guide: [Inbound SMS with Vapi](https://www.youtube.com/watch?v=NCf9Q-z-xUk)
19+
</Tip>
20+
21+
## Requirements
22+
23+
- **Twilio number in the US**
24+
- **SMS capability enabled** on that number (in Twilio and in Vapi)
25+
- **US-to-US** messaging only
26+
27+
## Set up from the dashboard
28+
29+
<Steps>
30+
<Step title="Import your Twilio number">
31+
Bring your number into Vapi so we can manage voice and messaging webhooks.
32+
33+
See: [Import number from Twilio](/phone-numbers/import-twilio)
34+
</Step>
35+
<Step title="Enable SMS for the number">
36+
In the number settings, turn on the **SMS** option. Vapi will set the Twilio Messaging webhook to route inbound texts to your agent.
37+
</Step>
38+
<Step title="Attach your agent (optional)">
39+
Assign the assistant you want handling conversations for this number. Inbound texts will start a session with that assistant.
40+
</Step>
41+
</Steps>
42+
43+
## Set up via API
44+
45+
You can enable inbound SMS while creating or updating a Twilio phone number by setting `smsEnabled: true`.
46+
47+
### Create or import a Twilio number with SMS enabled
48+
49+
<EndpointRequestSnippet endpoint='POST /phone-number' />
50+
51+
Key fields:
52+
53+
- **provider**: `twilio`
54+
- **smsEnabled**: `true` (lets Vapi manage Twilio Messaging webhooks)
55+
56+
<ParamField path="smsEnabled" type="boolean" default="true">
57+
Controls whether Vapi configures the Twilio Messaging webhook during import/creation. If `false`, Vapi leaves your Twilio messaging URL unchanged.
58+
</ParamField>
59+
60+
### Enable SMS on an existing number
61+
62+
<EndpointRequestSnippet endpoint='PATCH /phone-number/{id}' />
63+
64+
Update your number to set `smsEnabled: true` if it was previously disabled.
65+
66+
## Notes and limitations
67+
68+
- **US-only**: Both sender and recipient must be US numbers.
69+
- **Twilio only**: Other telephony providers are not supported for inbound SMS at this time.
70+
- **Webhooks**: With `smsEnabled: true`, Vapi manages the Twilio Messaging webhook for you.
71+
72+
For full endpoint details, see the [OpenAPI reference](/api-reference/openapi).
73+

0 commit comments

Comments
 (0)