create
messages.create
Send an outbound SMS or MMS message. The from_ number determines the channel;
pass media or send_as_mms=True to send an MMS.
Request
Response
Parameters
All parameters are keyword-only.
to
Destination phone number in E.164 format.
from_
Sending phone number in E.164 format. It must belong to your project. The
trailing underscore avoids Python’s reserved word; the SDK sends it as from.
body
Text content of the message.
media
URLs of media attachments. Supplying media sends the message as MMS.
send_as_mms
Send as MMS even when no media is attached.
status_callback
URL that receives delivery status updates for this message.
custom_variables
Your own key/value string pairs, up to 20. When status_callback is set, every
status callback includes them as a custom_variables object so you can match
it to a record in your own system.
extras
Additional request body fields merged into the payload as sent.
request_options
Per-call timeout and retry overrides. See
RequestOptions.
Returns
Message — the queued message, including its id, status, direction, and
number_of_segments.