Update a specific Channel.
A Channel resource represents a chat/conversation channel with an ordered list of messages and a participant roster.
Update a specific Channel.
Path parameters
-
The unique SID identifier of the Service.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^IS[0-9a-fA-F]{32}$
. -
A 34 character string that uniquely identifies this Channel.
Body
-
The visibility of the channel. Can be:
public
orprivate
.Values are
public
orprivate
. -
The unique ID of the Messaging Service this channel belongs to.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^MG[0-9a-fA-F]{32}$
.
POST
/v3/Services/{ServiceSid}/Channels/{Sid}
curl \
--request POST 'https://chat.twilio.com/v3/Services/{ServiceSid}/Channels/{Sid}' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--header "X-Twilio-Webhook-Enabled: true" \
--data 'Type=private&MessagingServiceSid=MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
Request example
{"Type"=>"private", "MessagingServiceSid"=>"MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}
Response examples (200)
{
"sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://chat.twilio.com/v3/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"type": "public",
"attributes": "{ \"foo\": \"bar\" }",
"created_by": "username",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"unique_name": "unique_name",
"date_created": "2015-12-16T22:18:37Z",
"date_updated": "2015-12-16T22:18:38Z",
"friendly_name": "friendly_name",
"members_count": 0,
"messages_count": 0,
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}