Skip to main content
Server path: /twilio-messaging | Type: Application | PCID required: Yes

Tools

ToolDescription
twilio_messaging_create_messageSend a message
twilio_messaging_delete_mediaDelete the Media resource.
twilio_messaging_delete_messageDeletes a Message resource from your account
twilio_messaging_fetch_mediaFetch a single Media resource associated with a specific Message resource
twilio_messaging_fetch_messageFetch a specific Message
twilio_messaging_fetch_short_codeFetch an instance of a short code
twilio_messaging_list_mediaRead a list of Media resources associated with a specific Message resource
twilio_messaging_list_messageRetrieve a list of Message resources associated with a Twilio Account
twilio_messaging_list_short_codeRetrieve a list of short-codes belonging to the account used to make the request
twilio_messaging_update_messageUpdate a Message resource (used to redact Message body text and to cancel not-yet-sent messages)
twilio_messaging_update_short_codeUpdate a short code with the following parameters

twilio_messaging_create_message

Send a message Parameters:
ParameterTypeRequiredDefaultDescription
AddressRetentionstringNoDetermines if the address can be stored or obfuscated based on privacy settings
ApplicationSidstringNoThe SID of the associated TwiML Application. Message status callback requests are sent to the TwiML App’s message_status_callback URL. Note that the status_callback parameter of a request takes priority over the application_sid parameter; if both are included application_sid is ignored.
AttemptintegerNoTotal number of attempts made (including this request) to send the message regardless of the provider used
BodystringNoThe text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the body contains more than 160 GSM-7 characters (or 70 UCS-2 characters), the message is segmented and charged accordingly. For long body text, consider using the send_as_mms parameter.
ContentRetentionstringNoDetermines if the message content can be stored or redacted based on privacy settings
ContentSidstringNoFor Content Editor/API only: The SID of the Content Template to be used with the Message, e.g., HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio’s response when creating the Template or by fetching your Templates.
ContentVariablesstringNoFor Content Editor/API only: Key-value pairs of Template variables and their substitution values. content_sid parameter must also be provided. If values are not defined in the content_variables parameter, the Template’s default placeholder values are used.
FallbackFromstringNoA fallback SMS sender to use when the recipient cannot be reached over RCS. This parameter may only be used when also providing a Messaging Service containing an RCS sender. The fallback SMS sender must be either a Twilio phone number (in E.164 format), alphanumeric sender ID, or short code, hosted within Twilio and belong to the Account creating the Message.
ForceDeliverybooleanNoReserved
FromstringNoThe sender’s Twilio phone number (in E.164 format), alphanumeric sender ID, Wireless SIM, short code, or channel address (e.g., whatsapp:+15554449999). The value of the from parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using messaging_service_sid, this parameter can be empty (Twilio assigns a from value from the Messaging Service’s Sender Pool) or you can provide a specific sender from your Sender Pool.
MaxPricenumberNo[OBSOLETE] This parameter will no longer have any effect as of 2024-06-03.
MediaUrlstring[]NoThe URL of media to include in the Message content. jpeg, jpg, gif, and png file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (jpeg, jpg, png, gif) and 500 KB for other types of accepted media. To send more than one image in the message, provide multiple media_url parameters in the POST request. You can include up to ten media_url parameters per message. International and carrier limits apply.
MessagingServiceSidstringNoThe SID of the Messaging Service you want to associate with the Message. When this parameter is provided and the from parameter is omitted, Twilio selects the optimal sender from the Messaging Service’s Sender Pool. You may also provide a from parameter if you want to use a specific Sender from the Sender Pool.
PersistentActionstring[]NoRich actions for non-SMS/MMS channels. Used for sending location in WhatsApp messages.
ProvideFeedbackbooleanNoBoolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the Message Feedback subresource). Default value is false.
RiskCheckstringNoInclude this parameter with a value of disable to skip any kind of risk check on the respective message request.
ScheduleTypestringNoFor Messaging Services only: Include this parameter with a value of fixed in conjuction with the send_time parameter in order to schedule a Message.
SendAsMmsbooleanNoIf set to true, Twilio delivers the message as a single MMS message, regardless of the presence of media.
SendAtstringNoThe time that Twilio will send the message. Must be in ISO 8601 format.
ShortenUrlsbooleanNoFor Messaging Services with Link Shortening configured only: A Boolean indicating whether or not Twilio should shorten links in the body of the Message. Default value is false. If true, the messaging_service_sid parameter must also be provided.
SmartEncodedbooleanNoWhether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: true or false.
StatusCallbackstringNoThe URL of the endpoint to which Twilio sends Message status callback requests. URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the messaging_service_sid, Twilio uses this URL instead of the Status Callback URL of the Messaging Service.
TostringYesThe recipient’s phone number in E.164 format (for SMS/MMS) or channel address, e.g. whatsapp:+15552229999.
TrafficTypestringNoTraffic Type
ValidityPeriodintegerNoThe maximum length in seconds that the Message can remain in Twilio’s outgoing message queue. If a queued Message exceeds the validity_period, the Message is not sent. Accepted values are integers from 1 to 36000. Default value is 36000. A validity_period greater than 5 is recommended. Learn more about the validity period

twilio_messaging_delete_media

Delete the Media resource. Parameters:
ParameterTypeRequiredDefaultDescription
MessageSidstringYesThe SID of the Message resource that is associated with the Media resource.
SidstringYesThe unique identifier of the to-be-deleted Media resource.

twilio_messaging_delete_message

Deletes a Message resource from your account Parameters:
ParameterTypeRequiredDefaultDescription
SidstringYesThe SID of the Message resource you wish to delete

twilio_messaging_fetch_media

Fetch a single Media resource associated with a specific Message resource Parameters:
ParameterTypeRequiredDefaultDescription
MessageSidstringYesThe SID of the Message resource that is associated with the Media resource.
SidstringYesThe Twilio-provided string that uniquely identifies the Media resource to fetch.

twilio_messaging_fetch_message

Fetch a specific Message Parameters:
ParameterTypeRequiredDefaultDescription
SidstringYesThe SID of the Message resource to be fetched

twilio_messaging_fetch_short_code

Fetch an instance of a short code Parameters:
ParameterTypeRequiredDefaultDescription
SidstringYesThe Twilio-provided string that uniquely identifies the ShortCode resource to fetch

twilio_messaging_list_media

Read a list of Media resources associated with a specific Message resource Parameters:
ParameterTypeRequiredDefaultDescription
MessageSidstringYesThe SID of the Message resource that is associated with the Media resources.
DateCreatedstringNoOnly include Media resources that were created on this date. Specify a date as YYYY-MM-DD in GMT, for example: 2009-07-06, to read Media that were created on this date. You can also specify an inequality, such as StartTime<=YYYY-MM-DD, to read Media that were created on or before midnight of this date, and StartTime>=YYYY-MM-DD to read Media that were created on or after midnight of this date.
DateCreated<stringNoOnly include Media resources that were created on this date. Specify a date as YYYY-MM-DD in GMT, for example: 2009-07-06, to read Media that were created on this date. You can also specify an inequality, such as StartTime&lt;=YYYY-MM-DD, to read Media that were created on or before midnight of this date, and StartTime&gt;=YYYY-MM-DD to read Media that were created on or after midnight of this date.
DateCreated>stringNoOnly include Media resources that were created on this date. Specify a date as YYYY-MM-DD in GMT, for example: 2009-07-06, to read Media that were created on this date. You can also specify an inequality, such as StartTime&lt;=YYYY-MM-DD, to read Media that were created on or before midnight of this date, and StartTime&gt;=YYYY-MM-DD to read Media that were created on or after midnight of this date.
PageSizeintegerNoHow many resources to return in each list page. The default is 50, and the maximum is 1000.
PageintegerNoThe page index. This value is simply for client state.
PageTokenstringNoThe page token. This is provided by the API.

twilio_messaging_list_message

Retrieve a list of Message resources associated with a Twilio Account Parameters:
ParameterTypeRequiredDefaultDescription
TostringNoFilter by recipient. For example: Set this parameter to +15558881111 to retrieve a list of Message resources sent to +15558881111.
FromstringNoFilter by sender. For example: Set this parameter to +15552229999 to retrieve a list of Message resources sent by +15552229999.
DateSentstringNoFilter by Message sent_date. Accepts GMT dates in the following formats: YYYY-MM-DD (to find Messages with a specific sent_date), &lt;=YYYY-MM-DD (to find Messages with sent_dates on and before a specific date), and &gt;=YYYY-MM-DD (to find Messages with sent_dates on and after a specific date).
DateSent<stringNoFilter by Message sent_date. Accepts GMT dates in the following formats: YYYY-MM-DD (to find Messages with a specific sent_date), &lt;=YYYY-MM-DD (to find Messages with sent_dates on and before a specific date), and &gt;=YYYY-MM-DD (to find Messages with sent_dates on and after a specific date).
DateSent>stringNoFilter by Message sent_date. Accepts GMT dates in the following formats: YYYY-MM-DD (to find Messages with a specific sent_date), &lt;=YYYY-MM-DD (to find Messages with sent_dates on and before a specific date), and &gt;=YYYY-MM-DD (to find Messages with sent_dates on and after a specific date).
PageSizeintegerNoHow many resources to return in each list page. The default is 50, and the maximum is 1000.
PageintegerNoThe page index. This value is simply for client state.
PageTokenstringNoThe page token. This is provided by the API.

twilio_messaging_list_short_code

Retrieve a list of short-codes belonging to the account used to make the request Parameters:
ParameterTypeRequiredDefaultDescription
FriendlyNamestringNoThe string that identifies the ShortCode resources to read.
ShortCodestringNoOnly show the ShortCode resources that match this pattern. You can specify partial numbers and use ’*’ as a wildcard for any digit.
PageSizeintegerNoHow many resources to return in each list page. The default is 50, and the maximum is 1000.
PageintegerNoThe page index. This value is simply for client state.
PageTokenstringNoThe page token. This is provided by the API.

twilio_messaging_update_message

Update a Message resource (used to redact Message body text and to cancel not-yet-sent messages) Parameters:
ParameterTypeRequiredDefaultDescription
SidstringYesThe SID of the Message resource to be updated
BodystringNoThe new body of the Message resource. To redact the text content of a Message, this parameter’s value must be an empty string
StatusstringNoThe status value

twilio_messaging_update_short_code

Update a short code with the following parameters Parameters:
ParameterTypeRequiredDefaultDescription
SidstringYesThe Twilio-provided string that uniquely identifies the ShortCode resource to update
ApiVersionstringNoThe API version to use to start a new TwiML session. Can be: 2010-04-01 or 2008-08-01.
FriendlyNamestringNoA descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the FriendlyName is the short code.
SmsFallbackMethodstringNoThe HTTP method that we should use to call the sms_fallback_url. Can be: GET or POST.
SmsFallbackUrlstringNoThe URL that we should call if an error occurs while retrieving or executing the TwiML from sms_url.
SmsMethodstringNoThe HTTP method we should use when calling the sms_url. Can be: GET or POST.
SmsUrlstringNoThe URL we should call when receiving an incoming SMS message to this short code.