For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
ReferenceGuides
ReferenceGuides
  • Core
    • Introduction to SWML
    • Expressions
    • Template functions
    • Variables
    • Errors
  • Calling
    • Overview
    • ai
    • ai_sidecar
    • amazon_bedrock
    • answer
    • cond
    • connect
    • denoise
    • detect_machine
    • enter_queue
    • execute
    • goto
    • hangup
    • join_conference
    • join_room
    • label
    • live_transcribe
    • live_translate
    • pay
    • play
    • prompt
    • receive_fax
    • record
    • record_call
    • request
    • return
    • send_digits
    • send_fax
    • send_sms
    • set
    • sip_refer
    • sleep
    • stop_denoise
    • stop_record_call
    • stop_tap
    • switch
    • tap
    • transcribe
    • transcribe_stop
    • transfer
    • unset
    • user_event
  • Messaging
    • Overview
    • execute
    • goto
    • label
    • receive
    • reply
    • request
    • return
    • switch
    • transfer
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Properties
  • Message types
  • Variables
  • Status callbacks
  • Examples
Calling

send_sms

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

set

Next
Built with

Send an outbound message to a PSTN phone number.

Properties

send_sms
objectRequired

An object that accepts the following properties. Supports both SMS and MMS messages. See message types below for the properties specific to each type.

Message types

The send_sms object accepts the following properties depending on the message type:

SMS
MMS
send_sms.to_number
stringRequired

Phone number to send SMS message to in e.164 format

send_sms.from_number
stringRequired

Phone number SMS message will be sent from

send_sms.body
stringRequired

Body of the text message

send_sms.region
stringDefaults to Chosen based on account preferences or device location

Region of the world to originate the message from

send_sms.tags
string[]

Array of tags to associate with the message to facilitate log searches

send_sms.status_callback
string

URL to receive delivery status callbacks for the outbound message (e.g., queued, sent, delivered, failed). Default is not set. See Status callbacks below.

Variables

Set by the method:

  • send_sms_result: (out) success | failed.

Status callbacks

When status_callback is set, SignalWire sends an HTTP POST to that URL each time the outbound message transitions to a new state. Callback delivery is independent of SWML execution: the document continues as soon as the message is accepted, and delivery-state callbacks fire afterwards.

The callback uses the same payload as other outbound messages sent through SignalWire:

Payload
1{
2 "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
3 "project_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
4 "status": "delivered",
5 "to": "+15551234567",
6 "from": "+15559876543",
7 "body": "Hello World!",
8 "number_of_segments": 1,
9 "timestamp": "2026-03-17T22:26:57Z"
10}

See the Message status callback webhook page for the full field reference and the list of possible status values.

Examples

SMS
MMS
Status callbacks

Send a text-only message:

1version: 1.0.0
2sections:
3 main:
4 - send_sms:
5 from_number: "+155512312345"
6 to_number: "+15555554321"
7 body: "Hi, I hope you're well."