Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

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

Names in PHP format
sid
sid<KI> Not PII

The unique string that we created to identify the MessageInteraction resource.

sessionSid
sid<KC> Not PII

The SID of the parent Session resource.

serviceSid
sid<KS> Not PII

The SID of the parent Service resource.

accountSid
sid<AC> Not PII

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. {"body": "hello"})

type
enum:type Not PII

The Type of Message Interaction. This value is always message.

participantSid
sid<KP> Not PII

The SID of the Participant resource.

inboundParticipantSid
sid<KP> Not PII

Always empty for created Message Interactions.

inboundResourceSid
sid Not PII

Always empty for created Message Interactions.

inboundResourceStatus
enum:resource_status Not PII

Always empty for created Message Interactions.

inboundResourceType
string Not PII

Always empty for created Message Interactions.

inboundResourceUrl
url Not PII

Always empty for created Message Interactions.

outboundParticipantSid
sid<KP> Not PII

The SID of the outbound Participant resource.

outboundResourceSid
sid Not PII

The SID of the outbound Message resource.

outboundResourceStatus
enum:resource_status Not PII

The outbound message resource status. Can be: accepted, deleted, delivered, delivery-unknown, failed, queued, received, receiving, scheduled, sending, sent, undelivered, or unknown.

outboundResourceType
string Not PII

The outbound resource type. This value is always Message.

outboundResourceUrl
url Not PII

The URL of the Twilio message resource.

dateCreated
date_time<iso8601> Not PII

The ISO 8601 date and time in GMT when the resource was created.

dateUpdated
date_time<iso8601> Not PII

The ISO 8601 date and time in GMT when the resource was last updated.

url
url Not PII

The absolute URL of the MessageInteraction resource.

Create a MessageInteraction resource

post
https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions
Parameters
Names in None format
body
Required if media_url is not passed
post string Not PII

The message to send to the participant

media_url
Required if body is not passed
post url[] Not PII

Reserved. Not currently supported.

service_sid
Required
post sid<KS> Not PII

The SID of the parent Service resource.

session_sid
Required
post sid<KC> Not PII

The SID of the parent Session resource.

participant_sid
Required
post sid<KP> Not PII

The SID of the Participant resource.

Example
        
        
        
        
        Rate this page:

        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.