Flex Conversations requires Flex UI 2.0.x. If you are on Flex UI 1.x.x, refer to the Messaging in Flex pages.
The Interaction Channel Invite subresource allows you to add an agent as a new participant to an existing interaction channel.
_10/Interactions/<interaction_sid>/Channels/<channel_sid>/Invites
Use this endpoint to:
The invite creates a new task for the existing interaction which will result in reservations offered to the agent(s). Note the example JSON response on this page is not representative of the actual API response. See example response on "Park an Interaction".
Remember to handle certain terminal TaskRouter events according to your application's needs, as conversations may stay orphaned with an open
state.
See Conversations Best Practices for details.
Parameter | Sub-field | Description |
---|---|---|
Routing [required] | A JSON Object representing the routing rules for the Interaction Channel. See Outbound SMS Example for an example Routing object. The Interactions resource uses TaskRouter for all routing functionality. | |
properties [required] | Fields needed to create a task: workspace_sid [required] The TaskRouter Workspace SID which starts with WS. workflow_sid [optional] The Workflow SID prefixed by WW. Optional if there's only one workflow defined otherwise it's mandatory queue_sid [required for agent-initiated], the Task router Queue SID prefixed by WQ. worker_sid [required for agent-initiated] task_channel_sid [optional] task_channel_unique_name [optional] attributes [optional] : The task attributes. priority [optional]: The priority of the task in the queue. timeout [optional]: The task/reservation timeout interval in seconds. All attributes in the Routing object on your Interaction request body are added "as is" to the task. For a list of known attributes consumed by the Flex UI and/or Flex Insights, see Known Task Attributes. |
sid
type: SID<KG>The unique string created by Twilio to identify an Interaction Channel Invite resource.
^KG[0-9a-fA-F]{32}$
34
34
interaction_sid
type: SID<KD>The Interaction SID for this Channel.
^KD[0-9a-fA-F]{32}$
34
34
channel_sid
type: SID<UO>The Channel SID for this Invite.
^UO[0-9a-fA-F]{32}$
34
34
routing
type: objectA JSON object representing the routing rules for the Interaction Channel. See Outbound SMS Example for an example Routing object. The Interactions resource uses TaskRouter for all routing functionality. All attributes in the Routing object on your Interaction request body are added “as is” to the task. For a list of known attributes consumed by the Flex UI and/or Flex Insights, see Known Task Attributes.
url
type: string<uri>POST https://flex-api.twilio.com/v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Invites
InteractionSid
type: SID<KD>The Interaction SID for this Channel.
^KD[0-9a-fA-F]{32}$
34
34
ChannelSid
type: SID<UO>The Channel SID for this Invite.
^UO[0-9a-fA-F]{32}$
34
34
This example request invites an agent to a channel in an interaction.