Add a new participant to the conversation

POST /v1/Conversations/{ConversationSid}/Participants

A Participant resource represents a member of the conversation.

Add a new participant to the conversation

Headers

  • X-Twilio-Webhook-Enabled string

    The X-Twilio-Webhook-Enabled HTTP request header

    Values are true or false.

Path parameters

  • ConversationSid string Required

    The unique ID of the Conversation for this participant.

application/x-www-form-urlencoded

Body

  • Identity string

    A unique string identifier for the conversation participant as Conversation User. This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.

  • MessagingBinding.Address string

    The address of the participant's device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from an SDK endpoint (see the 'identity' field).

  • MessagingBinding.ProxyAddress string

    The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field).

  • DateCreated string(date-time)

    The date that this resource was created.

  • DateUpdated string(date-time)

    The date that this resource was last updated.

  • Attributes string

    An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned.

  • MessagingBinding.ProjectedAddress string

    The address of the Twilio phone number that is used in Group MMS. Communication mask for the Conversation participant with Identity.

  • RoleSid string

    The SID of a conversation-level Role to assign to the participant.

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

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
    • account_sid string | null

      The unique ID of the Account responsible for this participant.

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

    • conversation_sid string | null

      The unique ID of the Conversation for this participant.

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

    • sid string | null

      A 34 character string that uniquely identifies this resource.

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

    • identity string | null

      A unique string identifier for the conversation participant as Conversation User. This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.

    • attributes string | null

      An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned.

    • messaging_binding

      Information about how this participant exchanges messages with the conversation. A JSON parameter consisting of type and address fields of the participant.

    • role_sid string | null

      The SID of a conversation-level Role to assign to the participant.

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

    • date_created string(date-time) | null

      The date that this resource was created.

    • date_updated string(date-time) | null

      The date that this resource was last updated.

    • url string(uri) | null

      An absolute API resource URL for this participant.

    • last_read_message_index integer | null

      Index of last “read” message in the Conversation for the Participant.

    • last_read_timestamp string | null

      Timestamp of last “read” message in the Conversation for the Participant.

POST /v1/Conversations/{ConversationSid}/Participants
curl \
 --request POST 'https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Participants' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --header "X-Twilio-Webhook-Enabled: true" \
 --data 'RoleSid=RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Attributes=%7B+%22role%22%3A+%22driver%22+%7D&DateCreated=2015-12-16T22%3A18%3A37Z&DateUpdated=2015-12-16T22%3A18%3A38Z&MessagingBinding.Address=%2B15558675310&MessagingBinding.ProxyAddress=%2B15017122661'
{"RoleSid"=>"RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Attributes"=>"{ \"role\": \"driver\" }", "DateCreated"=>"2015-12-16T22:18:37Z", "DateUpdated"=>"2015-12-16T22:18:38Z", "MessagingBinding.Address"=>"+15558675310", "MessagingBinding.ProxyAddress"=>"+15017122661"}
{"RoleSid"=>"RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Identity"=>"IDENTITY", "Attributes"=>"{ \"role\": \"driver\" }", "DateCreated"=>"2015-12-16T22:18:37Z", "DateUpdated"=>"2015-12-16T22:18:38Z"}
{"RoleSid"=>"RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Identity"=>"IDENTITY", "Attributes"=>"{ \"role\": \"driver\" }", "DateCreated"=>"2015-12-16T22:18:37Z", "DateUpdated"=>"2015-12-16T22:18:38Z", "MessagingBinding.ProjectedAddress"=>"+15017122661"}
{"RoleSid"=>"RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Identity"=>"IDENTITY", "DateCreated"=>"2020-07-01T22:18:37Z", "DateUpdated"=>"2020-07-01T22:18:37Z", "MessagingBinding.ProjectedAddress"=>"+15017122661"}
{"DateCreated"=>"2020-07-01T22:18:37Z", "DateUpdated"=>"2020-07-01T22:18:37Z", "MessagingBinding.Address"=>"+15017122661"}
{"RoleSid"=>"RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Attributes"=>"{ \"role\": \"driver\" }", "DateCreated"=>"2015-12-16T22:18:37Z", "DateUpdated"=>"2015-12-16T22:18:38Z", "MessagingBinding.Address"=>"rcs:+15558675310", "MessagingBinding.ProxyAddress"=>"rcs:+15017122661"}
{"RoleSid"=>"RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Attributes"=>"{ \"role\": \"driver\" }", "DateCreated"=>"2015-12-16T22:18:37Z", "DateUpdated"=>"2015-12-16T22:18:38Z", "MessagingBinding.Address"=>"rcs:+15558675311", "MessagingBinding.ProxyAddress"=>"rcs:+15017122661", "MessagingBinding.ProxyAddressFallback"=>"+12025552661"}
{
  "sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "identity": null,
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "attributes": "{ \"role\": \"driver\" }",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2015-12-16T22:18:37Z",
  "date_updated": "2015-12-16T22:18:38Z",
  "conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "messaging_binding": {
    "type": "sms",
    "address": "+15558675310",
    "proxy_address": "+15017122661"
  },
  "last_read_timestamp": null,
  "last_read_message_index": null
}
{
  "sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "identity": "IDENTITY",
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "attributes": "{ \"role\": \"driver\" }",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2015-12-16T22:18:37Z",
  "date_updated": "2015-12-16T22:18:38Z",
  "conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "messaging_binding": null,
  "last_read_timestamp": null,
  "last_read_message_index": null
}
{
  "sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "identity": "IDENTITY",
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "attributes": "{ \"role\": \"driver\" }",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2015-12-16T22:18:37Z",
  "date_updated": "2015-12-16T22:18:38Z",
  "conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "messaging_binding": {
    "type": "sms",
    "projected_address": "+15017122661"
  },
  "last_read_timestamp": null,
  "last_read_message_index": null
}
{
  "sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "identity": "IDENTITY",
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "attributes": "{}",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2020-07-01T22:18:37Z",
  "date_updated": "2020-07-01T22:18:37Z",
  "conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "messaging_binding": {
    "type": "sms",
    "projected_address": "+15017122661"
  },
  "last_read_timestamp": null,
  "last_read_message_index": null
}
{
  "sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "identity": null,
  "role_sid": null,
  "attributes": "{}",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2020-07-01T22:18:37Z",
  "date_updated": "2020-07-01T22:18:37Z",
  "conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "messaging_binding": {
    "type": "sms",
    "address": "+15017122661"
  },
  "last_read_timestamp": null,
  "last_read_message_index": null
}
{
  "sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "identity": null,
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "attributes": "{ \"role\": \"driver\" }",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2015-12-16T22:18:37Z",
  "date_updated": "2015-12-16T22:18:38Z",
  "conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "messaging_binding": {
    "type": "rcs",
    "address": "rcs:+15558675310",
    "proxy_address": "rcs:+15017122661"
  },
  "last_read_timestamp": null,
  "last_read_message_index": null
}
{
  "sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "identity": null,
  "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "attributes": "{ \"role\": \"driver\" }",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2015-12-16T22:18:37Z",
  "date_updated": "2015-12-16T22:18:38Z",
  "conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "messaging_binding": {
    "type": "sms",
    "address": "+15558675311",
    "proxy_address": "+12025552661"
  },
  "last_read_timestamp": null,
  "last_read_message_index": null
}