Add participant to conversation
POST
/workspaces/{workspaceId}/conversations/{conversationId}/participants
Add a participant to the conversation if it hasn't already been added
Payload della richiesta
Create a participant of the user or flow type.
id
string
obbligatorio
ID of the flow or user.
type
string
obbligatorio
Participant type.
Possible values: user, flow
status
string
Participant status in the conversation. Defaults to active.
Possible values: pending, invited, active
Create a participant based on an existing contact. It is optional to set the platformAddressSelector for a given contact to select the attribute for communication.
id
string
obbligatorio
Contact ID.
type
string
obbligatorio
Participant type.
Possible values: contact
status
string
Participant status in the conversation. Defaults to active.
Possible values: pending, invited, active
Create a participant with an identifier value. The contact will be found, or otherwise created, based on the identifier value.
contact
object
obbligatorio
Contact identifier information. For more information on identifier keys and values, please refer to the "Conversation Participants" page.
Mostra parametri secondari
contact.identifierKey
string
Identifier key of the contact depending on which channel is being used.
contact.identifierValue
string
obbligatorio
Identifier of the contact, such as a phone number or email address.
contact.platformAddressSelector
string
An expression to determine the contact's platform address (such as email or phone number) dynamically when sending messages in advanced use cases.
type
string
obbligatorio
Participant type.
Possible values: contact
status
string
Participant status in the conversation. Defaults to active.
Possible values: pending, invited, active
Payload della risposta
avatarUrl
string
contact
object
Mostra attributi secondari
contact.identifierKey
string
obbligatorio
contact.identifierValue
string
obbligatorio
contact.platformAddress
string
contact.platformAddressSelector
string
conversationId
string
createdAt
string
displayName
string
id
string
obbligatorio
resourceUri
string
status
string
Possible values: invited, pending, active, inactive
type
string
obbligatorio
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
updatedAt
string
Esempio di codice
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/conversations/{conversationId}/participants' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'Examples
Esempio di codice
curl -X POST "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/conversations/c9c60caa-eaf5-4628-9687-91de4d452bfa/participants" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
"type": "contact",
"contact": {
"identifierKey": "emailaddress",
"identifierValue": "john.doe@bird.com"
}
}'Esempio di codice
{
"id": "3954d22c-96f7-4bc3-817b-67b4d903ed90",
"type": "contact",
"status": "active",
"displayName": "",
"avatarUrl": "",
"contact": {
"identifierKey": "emailaddress",
"identifierValue": "john.doe@bird.com",
"platformAddress": "john.doe@bird.com"
}
}