Sending Messages
We can send text messages through the Proxy API by creating a Message Interaction on a Participant. The referenced Participant will receive the message from their allocated proxy number on the appropriate channel.
Note: Only POST (create) is available on Message Interactions. To query past messages you've created with this resource, query the Interaction resource.
MessageInteraction properties
Resource Properties in REST API format | |
---|---|
sid
|
The unique string that we created to identify the MessageInteraction resource. |
session_sid
|
The SID of the parent Session resource. |
service_sid
|
The SID of the parent Service resource. |
account_sid
|
The SID of the Account that created the MessageInteraction resource. |
data
|
A JSON string that includes the message body sent to the participant. (e.g. |
type
|
The Type of Message Interaction. This value is always |
participant_sid
|
The SID of the Participant resource. |
inbound_participant_sid
|
Always empty for created Message Interactions. |
inbound_resource_sid
|
Always empty for created Message Interactions. |
inbound_resource_status
|
Always empty for created Message Interactions. |
inbound_resource_type
|
Always empty for created Message Interactions. |
inbound_resource_url
|
Always empty for created Message Interactions. |
outbound_participant_sid
|
The SID of the outbound Participant resource. |
outbound_resource_sid
|
The SID of the outbound Message resource. |
outbound_resource_status
|
The outbound message resource status. Can be: |
outbound_resource_type
|
The outbound resource type. This value is always |
outbound_resource_url
|
The URL of the Twilio message resource. |
date_created
|
The ISO 8601 date and time in GMT when the resource was created. |
date_updated
|
The ISO 8601 date and time in GMT when the resource was last updated. |
url
|
The absolute URL of the MessageInteraction resource. |
Create a MessageInteraction resource
https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the parent Service resource. |
session_sid
Path
|
The SID of the parent Session resource. |
participant_sid
Path
|
The SID of the Participant resource. |
body
Required if
media_url
is not passed
|
The message to send to the participant |
media_url
Required if
body
is not passed
|
Reserved. Not currently supported. |
Example 1
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.