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.
sid
type: SID<KI>The unique string that we created to identify the MessageInteraction resource.
^KI[0-9a-fA-F]{32}$
34
34
session_sid
type: SID<KC>service_sid
type: SID<KS>account_sid
type: SID<AC>The SID of the Account that created the MessageInteraction resource.
^AC[0-9a-fA-F]{32}$
34
34
data
type: stringA JSON string that includes the message body sent to the participant. (e.g. {"body": "hello"}
)
type
type: enum<string>The Type of Message Interaction. This value is always message
.
message
voice
unknown
participant_sid
type: SID<KP>inbound_participant_sid
type: SID<KP>Always empty for created Message Interactions.
^KP[0-9a-fA-F]{32}$
34
34
inbound_resource_sid
type: SIDAlways empty for created Message Interactions.
^[a-zA-Z]{2}[0-9a-fA-F]{32}$
34
34
inbound_resource_status
type: enum<string>Always empty for created Message Interactions.
outbound_participant_sid
type: SID<KP>The SID of the outbound Participant resource.
^KP[0-9a-fA-F]{32}$
34
34
outbound_resource_sid
type: SIDThe SID of the outbound Message resource.
^[a-zA-Z]{2}[0-9a-fA-F]{32}$
34
34
outbound_resource_status
type: enum<string>The outbound message resource status. Can be: accepted
, deleted
, delivered
, delivery-unknown
, failed
, queued
, received
, receiving
, scheduled
, sending
, sent
, undelivered
, or unknown
.
date_updated
type: string<date-time>The ISO 8601 date and time in GMT when the resource was last updated.
POST https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions
ParticipantSid
type: SID<KP>