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.
Headers
-
X-Twilio-Webhook-Enabled string
The X-Twilio-Webhook-Enabled HTTP request header
Values are
true
orfalse
.
Path parameters
-
The unique SID identifier of the Service.
-
A 34 character string that uniquely identifies this Channel.
Body
-
MessagingServiceSid string
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}$
. -
Type string
TThe Type for this Channel to migrate to. Can only be
private
. Migration to 'public' is not allowed.Values are
public
orprivate
.
POST /v3/Services/{ServiceSid}/Channels/{Sid}
curl \
-X POST https://chat.twilio.com/v3/Services/{ServiceSid}/Channels/{Sid} \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "X-Twilio-Webhook-Enabled: true" \
-d 'MessagingServiceSid=string&Type=public'
Request example
# Headers
X-Twilio-Webhook-Enabled: true
# Payload
{
"MessagingServiceSid": "string",
"Type": "public"
}
Request examples
# Headers
X-Twilio-Webhook-Enabled: true
# Payload
{
"MessagingServiceSid": "string",
"Type": "public"
}
Response examples (200)
{
"account_sid": "string",
"attributes": "string",
"created_by": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"friendly_name": "string",
"members_count": 42,
"messages_count": 42,
"messaging_service_sid": "string",
"service_sid": "string",
"sid": "string",
"type": "public",
"unique_name": "string",
"url": "https://example.com"
}
Response examples (200)
{
"account_sid": "string",
"attributes": "string",
"created_by": "string",
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"friendly_name": "string",
"members_count": 42,
"messages_count": 42,
"messaging_service_sid": "string",
"service_sid": "string",
"sid": "string",
"type": "public",
"unique_name": "string",
"url": "https://example.com"
}