Menu

Expand
Rate this page:

Chat Channel Migration Resource

A Channel is a Programmable Chat object that is equivalent to a Conversation in the Conversations API.

Please see the Conversation Resource for Conversations that are already available to your Conversations application.

Only 'private' type Channels are automatically migrated to Conversations. For 'public' type Channels, please use this API to migrate them to 'private' type.

API Base URL

https://chat.twilio.com/v3

There is only one API endpoint on the v3 Chat API:

POST /Services/ISxx/Channels/CHxx

Channel properties

Resource Properties in REST API format
sid
sid<CH> Not PII

The unique string that we created to identify the Channel resource.

account_sid
sid<AC> Not PII

The SID of the Account that created the Channel resource.

service_sid
sid<IS> Not PII

The SID of the Service the Channel resource is associated with.

friendly_name

The string that you assigned to describe the resource.

unique_name

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.

attributes

The JSON string that stores application-specific data. If attributes have not been set, {} is returned.

type
enum:channel_type Not PII

The visibility of the channel. Can be: public or private.

date_created
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in ISO 8601 format.

date_updated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in ISO 8601 format.

created_by

The identity of the User that created the channel. If the Channel was created by using the API, the value is system.

members_count
integer Not PII

The number of Members in the Channel.

messages_count
integer Not PII

The number of Messages that have been passed in the Channel.

messaging_service_sid
sid<MG> Not PII

The unique ID of the Messaging Service this channel belongs to.

url
url Not PII

The absolute URL of the Channel resource.

Update Channel Type

post
https://chat.twilio.com/v3/Services/{ServiceSid}/Channels/{Sid}

Use this API to change a Channel's type from public to private. This makes it available in Conversations.

Read here to determine if you need to include a Messaging Service SID in your request.

Parameters
Parameters in REST API format
service_sid
Path
post sid<IS> Not PII

The unique SID identifier of the Service.

sid
Path
post sid_like<CH> Not PII

A 34 character string that uniquely identifies this Channel.

type
Optional
post ienum:channel_type Not PII

TThe Type for this Channel to migrate to. Can only be private. Migration to 'public' is not allowed.

messaging_service_sid
Optional
post sid<MG> Not PII

The unique ID of the Messaging Service this channel belongs to.

x_twilio_webhook_enabled
Header
post ienum:webhook_enabled_type Not PII

The X-Twilio-Webhook-Enabled HTTP request header

Example 1
Loading Code Sample...
        
        

        Migrate public Channel to Conversations

        Rate this page:

        Need some help?

        We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

        Loading Code Sample...
              
              
              

              Thank you for your feedback!

              Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

              Sending your feedback...
              🎉 Thank you for your feedback!
              Something went wrong. Please try again.

              Thanks for your feedback!

              thanks-feedback-gif