<Sms>
Send an SMS as a side-effect of the voice call (legacy form of <Message>).
Element body
The message text.
Example
<Response>
<Sms to="+12125550100">Thanks for calling — here is the link we discussed.</Sms>
<Say>We just texted you the link.</Say>
</Response>
Attributes
| Attribute | Default | Behaviour |
|---|---|---|
to |
the call's other party |
E.164 destination number. When omitted: the caller on an inbound call, the called number on an outbound call. |
from |
the call's own number |
Sending number. When omitted: the number called on an inbound call, the caller ID on an outbound call. |
action |
unset |
URL requested once the message is handed off, with SmsSid and SmsStatus (sending, or invalid for a malformed to number). Its VoiceML response replaces the rest of the document; without action the call continues to the next verb. |
method |
POST |
HTTP method for the action request. |
statusCallback |
unset |
URL that receives the delivery result asynchronously: SmsSid and SmsStatus (sent or failed). With an action, it fires after the action request. |
Callbacks
action request
| Field | Description |
|---|---|
SmsSid |
Identifier of the message record. |
SmsStatus |
sending, or invalid when the to number is malformed. |
statusCallback request
| Field | Description |
|---|---|
SmsSid |
Identifier of the message record. |
SmsStatus |
sent or failed. |
Every callback also carries the standard call parameters (CallSid, AccountSid, From, To, CallStatus) and is signed with your account's API key.
Notes
- Without an action the call continues to the next verb regardless of send outcome. Every send creates a Message record (SM-prefixed identifier) queryable over REST.
- <Sms> is the legacy spelling and takes text only; <Message> is the modern equivalent on the same send path and also takes <Body> and <Media>.