Message
The <Message> verb sends an SMS message to a phone number during a phone call.

Message (SMS) Attributes

Name
Allowed values
Default value
Required
to
Phone number
Caller
No
from
Phone number
Callee
No
action
URL
none
No
To: The 'to' attribute takes a valid E.164 phone number as a value. Callapi will send an SMS message to this number. When sending an SMS during an incoming call, 'to' defaults to the caller. When sending an SMS during an outgoing call, 'to' defaults to the called party. The value of 'to' must be a valid phone number.
From: The 'from' attribute takes a valid E.164 phone number as an argument. When sending an SMS during an incoming call, 'from' defaults to the calling party. When sending an SMS during an outgoing call, 'from' defaults to the called party.
Action: The action attribute takes a URL address as an argument. After processing the verb, CPaaS will make a POST request to this URL with the form parameters 'SmsStatus' and 'SmsSid'. Using an 'action' URL, your application can receive synchronous notification that the message was successfully enqueued or not.
None of these are required, or you can send only one or the other. If they are blank, the system will determine if you called them or they called you, and send the message appropriately. This allows you to change the from if required.

Request Parameters

Parameter
Description
SmsSid
The Sid for the SMS message.
SmsStatus
The current status of the SMS message. Currently the status will be Queued

Nesting

The <Message> verb can’t have any other verbs or nouns nested.

Examples

Examples of how to use the <Message> verb:
1
<Response>
2
<Message>Hello World!</Message>
3
</Response>
4
5
<Response>
6
<Message to="3035551212" from="72123">Hello World!</Message>
7
</Response>
Copied!
Last modified 1yr ago