Path parameters
-
The SID of the Service to update the resource from.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^IS[0-9a-fA-F]{32}$
. -
The Twilio-provided string that uniquely identifies the Channel resource to update.
Body
-
A descriptive string that you create to describe the resource. It can be up to 64 characters long.
-
An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's
sid
in the URL. This value must be 64 characters or less in length and be unique within the Service. -
A valid JSON string that contains application-specific data.
POST
/v1/Services/{ServiceSid}/Channels/{Sid}
curl \
--request POST 'https://chat.twilio.com/v1/Services/{ServiceSid}/Channels/{Sid}' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Type=channel&Attributes=%7B+%22foo%22%3A+%22bar%22+%7D&UniqueName=unique_name&FriendlyName=friendly_name'
Request example
{"Type"=>"channel", "Attributes"=>"{ \"foo\": \"bar\" }", "UniqueName"=>"unique_name", "FriendlyName"=>"friendly_name"}
Response examples (200)
{
"sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"type": "public",
"links": {
"invites": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites",
"members": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members",
"messages": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages",
"last_message": null
},
"attributes": "{ \"foo\": \"bar\" }",
"created_by": "system",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"unique_name": "unique_name",
"date_created": "2015-12-16T22:18:37Z",
"date_updated": "2015-12-16T22:18:37Z",
"friendly_name": "friendly_name",
"members_count": 0,
"messages_count": 0
}