Menu

Expand
Rate this page:

Flex Chat Channel Resource

This guide is for Flex UI 1.x and channels that use Programmable Chat and Proxy. If you are using Flex UI 2.x or you are starting out, we recommend that you build with Flex Conversations.

Flex Chat Channels allow agents to communicate with your customers across multiple channels like Webchat, SMS, and Whatsapp through a single chat interface. You can create a chat channel in Flex whenever you want to initiate a new communication flow between an agent and a customer. The Flex Chat Channel is an implementation of the Chat Channel Resource orchestrated for Flex.

Channel properties

Resource Properties in REST API format
account_sid
sid<AC> Not PII

The SID of the Account that created the Channel resource and owns this Workflow.

flex_flow_sid
sid<FO> Not PII

The SID of the Flex Flow.

sid
sid<CH> Not PII

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

user_sid
sid<US> Not PII

The SID of the chat user.

task_sid
sid<WT> Not PII

The SID of the TaskRouter Task. Only valid when integration type is task. null for integration types studio & external

url
url Not PII

The absolute URL of the Flex chat channel resource.

date_created
date_time<iso8601> Not PII

The date and time in GMT when the Flex chat channel was created specified in ISO 8601 format.

date_updated
date_time<iso8601> Not PII

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

Create a Channel resource

post
https://flex-api.twilio.com/v1/Channels
Parameters
Parameters in REST API format
flex_flow_sid
Required
post sid<FO> Not PII

The SID of the Flex Flow.

identity
Required
post string PII MTL: 30 DAYS

The identity value that uniquely identifies the new resource's chat User.

chat_user_friendly_name
Required
post string PII MTL: 30 DAYS

The chat participant's friendly name.

chat_friendly_name
Required
post string PII MTL: 30 DAYS

The chat channel's friendly name.

target
Optional
post string PII MTL: 30 DAYS

The Target Contact Identity, for example the phone number of an SMS.

chat_unique_name
Optional
post string PII MTL: 30 DAYS

The chat channel's unique name.

pre_engagement_data
Optional
post string PII MTL: 30 DAYS

The pre-engagement data.

task_sid
Optional
post sid<WT> Not PII

The SID of the TaskRouter Task. Only valid when integration type is task. null for integration types studio & external

task_attributes
Optional
post string PII MTL: 30 DAYS

The Task attributes to be added for the TaskRouter Task.

long_lived
Optional
post boolean Not PII

Whether to create the channel as long-lived.

Example 1
Loading Code Sample...
        
        

        Create Channel

        Fetch a Channel resource

        get
        https://flex-api.twilio.com/v1/Channels/{Sid}
        Parameters
        Parameters in REST API format
        sid
        Path
        get sid<CH> Not PII

        The SID of the Flex chat channel resource to fetch.

        Example 1
        Loading Code Sample...
              
              

              Fetch Channel

              Read multiple Channel resources

              get
              https://flex-api.twilio.com/v1/Channels
              Example 1
              Loading Code Sample...
                    
                    

                    Read Channel

                    Delete a Channel resource

                    delete
                    https://flex-api.twilio.com/v1/Channels/{Sid}
                    Parameters
                    Parameters in REST API format
                    sid
                    Path
                    delete sid<CH> Not PII

                    The SID of the Flex chat channel resource to delete.

                    Example 1
                    Loading Code Sample...
                          
                          

                          Delete Channel

                          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