Update an existing participant in the conversation
A Service Participant resource represents a member of the conversation within a specific service.
Update an existing participant in the conversation
Path parameters
-
The SID of the Conversation Service the Participant resource is associated with.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^IS[0-9a-fA-F]{32}$
. -
The unique ID of the Conversation for this participant.
-
A 34 character string that uniquely identifies this resource.
Body
-
The date on which this resource was created.
-
The date on which this resource was last updated.
-
A unique string identifier for the conversation participant as Conversation User. This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters.
-
An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set
{}
will be returned. -
The SID of a conversation-level Role to assign to the participant.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^RL[0-9a-fA-F]{32}$
. -
The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it.
-
The address of the Twilio phone number that is used in Group MMS. 'null' value will remove it.
-
Index of last “read” message in the Conversation for the Participant.
-
Timestamp of last “read” message in the Conversation for the Participant.
curl \
--request POST 'https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--header "X-Twilio-Webhook-Enabled: true" \
--data 'RoleSid=RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Attributes=%7B+%22role%22%3A+%22driver%22+%7D&DateCreated=2015-12-16T22%3A18%3A37Z&DateUpdated=2015-12-16T22%3A18%3A38Z'
{"RoleSid"=>"RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Attributes"=>"{ \"role\": \"driver\" }", "DateCreated"=>"2015-12-16T22:18:37Z", "DateUpdated"=>"2015-12-16T22:18:38Z"}
{"MessagingBinding.ProjectedAddress"=>"+15017122661"}
{
"sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"identity": null,
"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"attributes": "{ \"role\": \"driver\" }",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2015-12-16T22:18:37Z",
"date_updated": "2015-12-16T22:18:38Z",
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"messaging_binding": {
"type": "sms",
"address": "+15558675310",
"proxy_address": "+15017122661"
},
"last_read_timestamp": null,
"last_read_message_index": null
}
{
"sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"identity": "id",
"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"attributes": "{ \"role\": \"driver\" }",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2015-12-16T22:18:37Z",
"date_updated": "2015-12-16T22:18:38Z",
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"messaging_binding": {
"type": "sms",
"projected_address": "+15017122661"
},
"last_read_timestamp": null,
"last_read_message_index": null
}