Path parameters
-
The SID of the parent Service resource.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^KS[0-9a-fA-F]{32}$
.
Body
-
An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. This value should not have PII.
-
The ISO 8601 date when the Session should expire. If this is value is present, it overrides the
ttl
value. -
The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction.
-
The Mode of the Session. Can be:
message-only
,voice-only
, orvoice-and-message
.Values are
message-only
,voice-only
, orvoice-and-message
. -
The status of the Session. Can be:
open
,in-progress
,closed
,failed
, orunknown
.Values are
open
,in-progress
,closed
,failed
, orunknown
. -
The Participant objects to include in the new session.
curl \
--request POST 'https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Ttl=3600&UniqueName=Order+%231234'
{"Ttl"=>3600, "UniqueName"=>"Order #1234"}
{
"sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ttl": 3600,
"url": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sessions/KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"mode": "voice-and-message",
"links": {
"interactions": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sessions/KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Interactions",
"participants": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sessions/KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants"
},
"status": "open",
"date_ended": "2015-07-30T20:00:00Z",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_expiry": "2015-07-30T20:00:00Z",
"service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"unique_name": "Order #1234",
"date_created": "2015-07-30T20:00:00Z",
"date_started": "2015-07-30T20:00:00Z",
"date_updated": "2015-07-30T20:00:00Z",
"closed_reason": "",
"date_last_interaction": "2015-07-30T20:00:00Z"
}