Docs

<sendMessage>

This command sends a message to the specified phone number.

Important For the moment, only SMS messages are supported.

Attribute name

Description

Default value

from

Number to be used as a CallerID. This number must be rented from Apifonica.

If the from attribute has no value, the CallerID is set to the recipient’s phone number.

see description

to

Recipient’s number — the number where Apifonica sends the message.

If no value is provided, the message is sent to the current caller/sender.

see description

controller_url

URL which will be used to transmit message status and parameters.

Apifonica will expect to receive a new Apifonica XML file to which flow control will be transferred. In this case any command after the <sendMessage> command is unreachable.

If no controller URL is provided, Apifonica will proceed processing the current XML file and will not send any message parameters.

Cannot be used with controller_app simultaneously.

none

controller_app

Application SID which will be used to make a request for an XML controller file.

Apifonica will expect to receive a new Apifonica XML file to which flow control will be transferred. In this case any command after is unreachable.

If no controller URL is provided Apifonica will proceed processing the current XML file and will not send any message parameters.

Cannot be used with controller_url simultaneously

none

method

Method to be used to make a request to the specified controller.

POST

The following parameters for messages are sent to the controller if specified.

Parameter name

Description

message_sid

Unique message identifier.

account_sid

Unique account identifier.

from

Sender’s phone number (conventional or virtual).

to

Recipient’s phone number (conventional or virtual).

text

Message text.

Example

<?xml version="1.0" encoding="UTF-8" ?>
<response>
	<sendMessage from="358942704951" to="35315313424" text="Hello, this is my first SMS sent via Apifonica!"></sendMessage>
</response>