Add a Participant to a Channel.

POST /v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Participants

Add a Participant to a Channel.

Path parameters

  • InteractionSid string Required

    The Interaction Sid for the new Channel Participant.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^KD[0-9a-fA-F]{32}$.

  • ChannelSid string Required

    The Channel Sid for the new Channel Participant.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^UO[0-9a-fA-F]{32}$.

application/x-www-form-urlencoded

Body

  • Type string Required

    Participant type. Can be: agent, customer, supervisor, external, unknown

    Values are supervisor, customer, external, agent, or unknown.

  • MediaProperties Required

    JSON representing the Media Properties for the new Participant.

  • RoutingProperties

    Object representing the Routing Properties for the new Participant.

Responses

  • 201 application/json

    Created

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • sid string | null

      The unique string created by Twilio to identify an Interaction Channel Participant resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^UT[0-9a-fA-F]{32}$.

    • type string

      Participant type. Can be: agent, customer, supervisor, external, unknown

      Values are supervisor, customer, external, agent, or unknown.

    • interaction_sid string | null

      The Interaction Sid for this channel.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^KD[0-9a-fA-F]{32}$.

    • channel_sid string | null

      The Channel Sid for this Participant.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^UO[0-9a-fA-F]{32}$.

    • url string(uri) | null
    • routing_properties

      The Participant's routing properties.

POST /v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Participants
curl \
 --request POST 'https://flex-api.twilio.com/v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Participants' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'Type=customer&MediaProperties=%7B%22level%22%3A+%22to%22%2C+%22name%22%3A+%22Random+Person+test%22%2C+%22address%22%3A%22random%40person.com%22%2C++%22type%22%3A+%22email%22%7D&RoutingProperties=%7B%22task_sid%22%3A+%22WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa%22%2C+%22worker_sid%22%3A+%22WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa%22%2C+%22reservation_sid%22%3A+%22WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa%22%7D'
Request example
{"Type"=>"customer", "MediaProperties"=>"{\"level\": \"to\", \"name\": \"Random Person test\", \"address\":\"random@person.com\",  \"type\": \"email\"}", "RoutingProperties"=>"{\"task_sid\": \"WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"worker_sid\": \"WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"reservation_sid\": \"WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}"}
Response examples (201)
{
  "sid": "UTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1",
  "url": "https://flex-api.twilio.com/v1/Interactions/KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1/Participants/UTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1",
  "type": "customer",
  "channel_sid": "UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1",
  "interaction_sid": "KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "routing_properties": {
    "task_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "reservation_sid": "WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  }
}