Update a specific Session
TODO: Resource-level docs
Update a specific Session.
Path parameters
-
The SID of the parent Service of the resource to update.
-
The Twilio-provided string that uniquely identifies the Session resource to update.
Body
-
DateExpiry string(date-time)
The ISO 8601 date when the Session should expire. If this is value is present, it overrides the
ttl
value. -
FailOnParticipantConflict boolean
[Experimental] For accounts with the ProxyAllowParticipantConflict account flag, setting to true enables per-request opt-in to allowing Proxy to return a 400 error (Twilio error code 80604) when a request to set a Session to in-progress would cause Participants with the same Identifier/ProxyIdentifier pair to be active in multiple Sessions. If not provided, requests will be allowed to succeed, and a Debugger notification (80801) will be emitted. Having multiple, active Participants with the same Identifier/ProxyIdentifier pair causes calls and messages from affected Participants to be routed incorrectly. Please note, the default behavior for accounts without the ProxyAllowParticipantConflict flag is to reject the request as described. This will eventually be the default for all accounts.
-
Status string
The new status of the resource. Can be:
in-progress
to re-open a session orclosed
to close a session.Values are
open
,in-progress
,closed
,failed
, orunknown
. -
Ttl integer
The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction.
curl \
-X POST https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{Sid} \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'DateExpiry=2023-05-04T09%3A42%3A00%2B00%3A00&FailOnParticipantConflict=true&Status=open&Ttl=42'
{
"DateExpiry": "2023-05-04T09:42:00+00:00",
"FailOnParticipantConflict": true,
"Status": "open",
"Ttl": 42
}
{
"DateExpiry": "2024-05-04T09:42:00+00:00",
"FailOnParticipantConflict": true,
"Status": "open",
"Ttl": 42
}
{
"account_sid": "string",
"closed_reason": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_ended": "2023-05-04T09:42:00+00:00",
"date_expiry": "2023-05-04T09:42:00+00:00",
"date_last_interaction": "2023-05-04T09:42:00+00:00",
"date_started": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"links": {},
"mode": "message-only",
"service_sid": "string",
"sid": "string",
"status": "open",
"ttl": 42,
"unique_name": "string",
"url": "https://example.com"
}
{
"account_sid": "string",
"closed_reason": "string",
"date_created": "2024-05-04T09:42:00+00:00",
"date_ended": "2024-05-04T09:42:00+00:00",
"date_expiry": "2024-05-04T09:42:00+00:00",
"date_last_interaction": "2024-05-04T09:42:00+00:00",
"date_started": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"links": {},
"mode": "message-only",
"service_sid": "string",
"sid": "string",
"status": "open",
"ttl": 42,
"unique_name": "string",
"url": "https://example.com"
}