Interactions are read-only communications logs of a given Session. Each Interaction represents a single communication.
Interactions are composed of an inbound (to Twilio) and an outbound (from Twilio) leg. Interactions can have both inbound and outbound legs or be "one-sided" (like when creating a Message Interaction resource).
If a user sends an SMS to a proxy number, and Twilio Proxy handles the proxying to the other Participant, you'll have an Interaction with both an inbound SMS and an outbound SMS.
A JSON string that includes the message body of message interactions (e.g. {"body": "hello"}
) or the call duration (when available) of a call (e.g. {"duration": "5"}
).
The Type of the Interaction. Can be: message
, voice
or unknown
.
message
voice
unknown
The inbound resource status of the Interaction. Will always be delivered
for messages and in-progress
for calls.
The outbound resource status of the Interaction. Can be: accepted
, canceled
, deleted
, delivered
, delivery-unknown
, failed
, partially-delivered
, queued
, read
, received
, receiving
, scheduled
, sending
, sent
, undelivered
, or unknown
for messages. Can be initiated
or completed
or unknown
for calls.
The ISO 8601 date and time in GMT when the Interaction was created.
The ISO 8601 date and time in GMT when the resource was last updated.
The absolute URL of the Interaction resource.
You cannot POST
to the Interactions resource. Instead, you can generate Interactions via the appropriate Participant's MessageInteraction resource. For details, see Sending Messages. Otherwise, Interactions are created automatically when Participants text or call each other.
GET https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}
The Twilio-provided string that uniquely identifies the Interaction resource to fetch.
GET https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions
Retrieve a list of Interactions for a given Session.
How many resources to return in each list page. The default is 50, and the maximum is 1000.
DELETE https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}
Deleting an Interaction removes it permanently.
Any Message or Call records created during this interaction will NOT be deleted automatically. If you want to delete all related Message/Call resources, you must issue direct DELETE
requests for the inbound and outbound resources directly. Once you have deleted an interaction, those resource SIDs will not be discoverable via Proxy.
The Twilio-provided string that uniquely identifies the Interaction resource to delete.