Skip to contentSkip to navigationSkip to topbar

Create Participant


(information)

Legal information

Conversation Orchestrator, including the APIs, may use artificial intelligence or machine learning technologies and is subject to the terms of the Predictive and Generative AI/ML Features Addendum(link takes you to an external page). For details on AI usage and data, see the AI Nutrition Facts for Real-Time Transcription and Conversation Relay.

Conversation Orchestrator is not a HIPAA Eligible Service or PCI compliant and should not be enabled in workflows that are subject to HIPAA or PCI.

Conversations products are only available in the new Twilio Console(link takes you to an external page). If your account hasn't been migrated, you'll be redirected to the legacy Console where these products won't appear.

POST/v2/Conversations/{ConversationId}/Participants

Base url: https://conversations.twilio.com (base url)

Create a Participant.


Request

create-participant-in-conversation-request page anchor

Authentication

authentication page anchor
Property nameTypeRequiredPIIDescription
conversationIdstring
required
Not PII
Encoding type:application/json
Schema
Property nameTypeRequiredPIIDescriptionChild properties
namestring

Optional

Example: Dana

typeenum<string>

Optional

Type of Participant in the Conversation.

Possible values:
HUMAN_AGENTCUSTOMERAI_AGENTAGENTUNKNOWN

profileIdstring

Optional


addressesarray[object]
required

201400404409429500503

Created

SchemaExample
Property nameTypeRequiredPIIDescriptionChild properties
idstring

Optional

Participant ID.

Example: conv_participant_00000000000000000000000001

conversationIdstring

Optional

Conversation ID.

Example: conv_conversation_00000000000000000000000001

accountIdstring

Optional

Account ID.

Example: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

namestring

Optional

Participant display name.

Example: Dana S.

typeenum<string>

Optional

Type of Participant in the Conversation.

Example: CUSTOMERPossible values:
HUMAN_AGENTCUSTOMERAI_AGENTAGENTUNKNOWN

profileIdstring

Optional

Profile ID. Note: This field is only resolved for CUSTOMER participant types, not for HUMAN_AGENT or AI_AGENT participants.

Example: mem_profile_00000000000000000000000000

addressesarray[object]

Optional

Communication addresses for this Participant. Address format varies by channel:

  • SMS/VOICE: E.164 phone number (such as "+18005550100")
  • EMAIL: Email address (such as "user@example.com")
  • WHATSAPP: Phone number with whatsapp prefix (such as "whatsapp:+18005550100")
  • RCS: Sender ID or phone number with rcs prefix (such as "rcs:brand_acme_agent" or "rcs:+18005550100")

createdAtstring<date-time>

Optional

Timestamp when this Participant was created.

Example: 2023-07-01T12:00:00Z

updatedAtstring<date-time>

Optional

Timestamp when this Participant was last updated.

Example: 2023-07-01T12:00:00Z
Create ParticipantLink to code sample: Create Participant
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createParticipantInConversation() {
11
const participant = await client.conversations.v2
12
.participants("ConversationId")
13
.create({
14
addresses: [
15
{
16
channel: "VOICE",
17
address: "address",
18
channelId: "channelId",
19
},
20
],
21
});
22
23
console.log(participant.id);
24
}
25
26
createParticipantInConversation();

Response

Note about this response
1
{
2
"id": "conv_participant_00000000000000000000000001",
3
"conversationId": "conv_conversation_00000000000000000000000001",
4
"accountId": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"name": "Dana",
6
"type": "CUSTOMER",
7
"profileId": "mem_profile_00000000000000000000000000",
8
"addresses": [
9
{
10
"channel": "VOICE",
11
"address": "address",
12
"channelId": "channelId"
13
}
14
],
15
"createdAt": "2023-07-01T12:00:00Z",
16
"updatedAt": "2023-07-01T12:30:00Z"
17
}