Update an existing conversation user in your account's default service
A User resource represents a conversation user belonging to a default conversation service.
Update an existing conversation user in your account's default service
Path parameters
-
The SID of the User resource to update. This value can be either the
sid
or theidentity
of the User resource to update.
Body
-
The string that you assigned to describe the resource.
-
The JSON Object string that stores application-specific data. If attributes have not been set,
{}
is returned. -
The SID of a service-level Role to assign to the user.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^RL[0-9a-fA-F]{32}$
.
POST
/v1/Users/{Sid}
curl \
--request POST 'https://conversations.twilio.com/v1/Users/{Sid}' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--header "X-Twilio-Webhook-Enabled: true" \
--data 'RoleSid=RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Attributes=%7B+%22duty%22%3A+%22tech%22%2C+%22team%22%3A+%22internals%22+%7D&FriendlyName=new+name'
Request example
{"RoleSid"=>"RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Attributes"=>"{ \"duty\": \"tech\", \"team\": \"internals\" }", "FriendlyName"=>"new name"}
Response examples (200)
{
"sid": "USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://conversations.twilio.com/v1/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"user_conversations": "https://conversations.twilio.com/v1/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations"
},
"identity": "admin",
"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"is_online": true,
"attributes": "{ \"duty\": \"tech\", \"team\": \"internals\" }",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2019-12-16T22:18:37Z",
"date_updated": "2019-12-16T22:18:38Z",
"friendly_name": "new name",
"is_notifiable": null,
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}