Update participant by identifier key and value

Update conversation participant by contact

Update a participant's status in the conversation by specifying their identifier key and value. For more information on identifier keys and values, please refer to the "Conversation Participants" page.

PATCHhttps://api.bird.com/workspaces/{workspaceId}/conversations/{conversationId}/participants/{identifierKey}/{identifierValue}
Path parameters
workspaceId*string (uuid)

The workspace ID

Example: "b4e02c85-c6d2-4b15-8885-e09671799c61"
conversationId*string (uuid)

The conversation ID

Example: "67e4d358-ca94-421e-98b7-448860df9d33"
identifierKey*string

The identifier type of the channel, such as emailaddress or phonenumber

Example: "emailaddress"
identifierValue*string

A value that uniquely identifies a recipient in the channel, such as an email address or a phone number

Example: "example@bird.com"
Body
statusnullable enum

Participant status in the conversation.

pendinginvitedactive
Response

Participant was updated

Body
id*string

Participant ID, the meaning of this field depends on type. If type is user then it's a user ID, if type is contact then it's a contact ID, if type is accessKey then it's the access key ID, and so on.

Example: "cb22b001-6226-4d7c-acdd-7414b2bcdbaf"
displayNamestring

The participant's name.

Example: "John Doe"
avatarUrlstring

An URL to the participant's avatar.

Example: "https://example.bird.com/avatar-url"
contactConversations_ParticipantContact (object)

The participant's contact information. For more information on identifier keys and values, please refer to the "Conversation Participants" page.

type*Conversations_ParticipantType (enum)

Participant type. The main ones are user, contact, and agent. user is a user belonging to your Bird workspace, contact is one of your customers, agent is a customer service agent, and the remaining types represent system participants.

usercontactagentflowbotaccessKeychannelconnectorcollaborationAutomation
statusenum

Participant status in the conversation. pending means it's pending approval, invited means it's pending acceptance from the participant, and active means the participant can send and receive messages.

pendinginvitedactive
Request
const response = await fetch('https://api.bird.com/workspaces/{workspaceId}/conversations/{conversationId}/participants/{identifierKey}/{identifierValue}', {
    method: 'PATCH',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": "cb22b001-6226-4d7c-acdd-7414b2bcdbaf",
  "displayName": "John Doe",
  "avatarUrl": "https://example.bird.com/avatar-url",
  "contact": {
    "identifierKey": "emailaddress",
    "identifierValue": "example@bird.com",
    "platformAddress": "example@bird.com",
    "platformAddressSelector": "attributes.workEmail"
  },
  "type": "user",
  "status": "pending"
}

Examples

curl -X PATCH "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/conversations/c9c60caa-eaf5-4628-9687-91de4d452bfa/participants/emailaddress/john.doe@bird.com" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
  "status": "active"
}'

Last updated