Skip to main content


This represents the API interface for the Messaging Relay Service. This object is used to make requests related to managing SMS and MMS messages.



Send a message to the destination number.

Available In:


contextstringrequiredThe context to receive inbound events.
fromstringrequiredThe phone number to place the message from. Must be a SignalWire phone number or short code that you own.
tostringrequiredThe phone number to send to.
bodystringrequiredThe content of the message.
Optional if media is present.
mediastring[]requiredArray of URLs to send in the message.
Optional if body is present.
tagsstring[]optionalArray of strings to tag the message with for searching in the UI.


React\Promise\Promise - Promise that will be fulfilled with a Relay.Messaging.SendResult object.


Send a message in the context 'office'.

$params = [
'context' => 'office',
'from' => '+1XXXXXXXXXX',
'to' => '+1YYYYYYYYYY',
'body' => 'Welcome at SignalWire!'
$client->messaging->send($params)->done(function($sendResult) {
if ($sendResult->isSuccessful()) {
echo "Message ID: " . $sendResult->getMessageId();