Update conversation
PATCH
/workspaces/{workspaceId}/conversations/{conversationId}
Update a conversation's properties
Anfrage-Payload
name
string
Name of the conversation. If it's an email channel, this will correspond to the email subject.
description
string
status
string
Possible values: deleted, active, closed, spam, archived
visibility
string
Possible values: public, private, direct, group
accessibility
string
Possible values: open, invite-only, request-to-join, private
attributes
object
A free-form object containing conversation attributes. You can use this field to store custom information along with the conversation.
resource
object
Resource reference
Untergeordnete Parameter anzeigen
resource.type
string
The type of referenced resource
Possible values: task, task-conversation, reimbursement, expense, sales-lead, sales-opportunity, sales-account, project
resource.id
string
The ID of the referenced resource.
Antwort-Payload
accessibility
string
erforderlich
Possible values: open, invite-only, request-to-join, private
activeParticipantCount
integer
erforderlich
assigneeId
string
attributes
object
category
string
channelId
string
erforderlich
createdAt
string
erforderlich
description
string
directory
string
featuredParticipants
array of object
erforderlich
Untergeordnete Attribute anzeigen
featuredParticipants.avatarUrl
string
featuredParticipants.contact
object
Untergeordnete Attribute anzeigen
featuredParticipants.contact.identifierKey
string
erforderlich
featuredParticipants.contact.identifierValue
string
erforderlich
featuredParticipants.contact.platformAddress
string
featuredParticipants.contact.platformAddressSelector
string
featuredParticipants.conversationId
string
featuredParticipants.createdAt
string
featuredParticipants.displayName
string
featuredParticipants.id
string
erforderlich
featuredParticipants.resourceUri
string
featuredParticipants.status
string
Possible values: invited, pending, active, inactive
featuredParticipants.type
string
erforderlich
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
featuredParticipants.updatedAt
string
hasDraft
boolean
id
string
erforderlich
inbox
object
Untergeordnete Attribute anzeigen
inbox.id
string
erforderlich
inbox.identifier
string
erforderlich
inbox.ownerId
string
erforderlich
inbox.ownerType
string
erforderlich
Possible values: user, group
inbox.type
string
erforderlich
Possible values: personal, shared, support
initiatingParticipant
object
Untergeordnete Attribute anzeigen
initiatingParticipant.avatarUrl
string
initiatingParticipant.contact
object
Untergeordnete Attribute anzeigen
initiatingParticipant.contact.identifierKey
string
erforderlich
initiatingParticipant.contact.identifierValue
string
erforderlich
initiatingParticipant.contact.platformAddress
string
initiatingParticipant.contact.platformAddressSelector
string
initiatingParticipant.conversationId
string
initiatingParticipant.createdAt
string
initiatingParticipant.displayName
string
initiatingParticipant.id
string
erforderlich
initiatingParticipant.resourceUri
string
initiatingParticipant.status
string
Possible values: invited, pending, active, inactive
initiatingParticipant.type
string
erforderlich
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
initiatingParticipant.updatedAt
string
lastMessage
object
Untergeordnete Attribute anzeigen
lastMessage.createdAt
string
erforderlich
lastMessage.draft
boolean
erforderlich
lastMessage.id
string
erforderlich
lastMessage.preview
object
erforderlich
Untergeordnete Attribute anzeigen
lastMessage.preview.text
string
lastMessage.recipients
array of object
Untergeordnete Attribute anzeigen
lastMessage.recipients.contactAnnotation
object
Annotations add extra information to a sender or receiver. For email messages, the name annotation overrides the display name.
Untergeordnete Attribute anzeigen
lastMessage.recipients.contactAnnotation.name
string
lastMessage.recipients.countryCode
string
lastMessage.recipients.id
string
The ID of the contact.
lastMessage.recipients.identifierKey
string
The identifier key for finding the contact (e.g. emailaddress, phonenumber). For WhatsApp channels with BSUID support, use whatsappbsuid to send to a contact by their Business-Scoped User ID.
lastMessage.recipients.identifierValue
string
The identifier value for finding the contact.
lastMessage.recipients.identifiers
array of object
Additional identifiers to augment the contact during resolution.
Untergeordnete Attribute anzeigen
lastMessage.recipients.identifiers.identifierKey
string
erforderlich
The identifier key for finding the contact (e.g. emailaddress, phonenumber).
lastMessage.recipients.identifiers.identifierValue
string
erforderlich
The identifier value for finding the contact.
lastMessage.recipients.platformAddress
string
The resolved platform address used to deliver the message (e.g. phone number or email address).
lastMessage.recipients.platformAddressSelector
string
An expression that defines how we resolve the platform address from a contact. Optional override for the default resolution logic.
lastMessage.recipients.receiverExpression
string
lastMessage.recipients.receiverValue
string
lastMessage.recipients.type
string
The type of the receiver (e.g. to, cc, bcc for email).
lastMessage.sender
object
Untergeordnete Attribute anzeigen
lastMessage.sender.email
string
lastMessage.sender.name
string
lastMessage.sender.avatarUrl
string
lastMessage.sender.contact
object
Untergeordnete Attribute anzeigen
lastMessage.sender.contact.identifierKey
string
erforderlich
lastMessage.sender.contact.identifierValue
string
erforderlich
lastMessage.sender.contact.platformAddress
string
lastMessage.sender.contact.platformAddressSelector
string
lastMessage.sender.conversationId
string
lastMessage.sender.createdAt
string
lastMessage.sender.displayName
string
lastMessage.sender.id
string
erforderlich
lastMessage.sender.resourceUri
string
lastMessage.sender.status
string
Possible values: invited, pending, active, inactive
lastMessage.sender.type
string
erforderlich
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
lastMessage.sender.updatedAt
string
lastMessage.status
string
erforderlich
Possible values: accepted, processing, sent, sending_failed, delivered, delivery_failed, deleted
lastMessage.type
string
erforderlich
Possible values: text, html, image, file, gif, location, carousel, list, section, authentication, action, comment
lastMessageIncomingAt
string
lastMessageOutgoingAt
string
name
string
erforderlich
participants
array of object
Untergeordnete Attribute anzeigen
participants.contact
object
Untergeordnete Attribute anzeigen
participants.contact.identifierKey
string
erforderlich
participants.contact.identifierValue
string
erforderlich
participants.contact.platformAddress
string
participants.contact.platformAddressSelector
string
participants.id
string
erforderlich
participants.type
string
erforderlich
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
pendingParticipantCount
integer
platformStyle
string
erforderlich
Possible values: direct, email, direct-multiple, direct-threaded, group-multiple
privateAttributes
string
read
boolean
referral
object
Untergeordnete Attribute anzeigen
referral.caption
string
referral.mediaType
string
referral.mediaUrl
string
referral.sourceId
string
erforderlich
referral.sourceType
string
referral.sourceUrl
string
referral.text
string
referral.timestamp
string
referral.title
string
referral.username
string
resource
object
Untergeordnete Attribute anzeigen
resource.id
string
erforderlich
resource.type
string
erforderlich
Possible values: task, task-conversation, reimbursement, sales-lead, sales-opportunity, sales-account, expense, project
resourceUri
string
starred
boolean
status
string
erforderlich
Possible values: deleted, active, closed, spam, archived
style
string
erforderlich
Possible values: default, directMessage, chatChannel, personalInbox, resource, groupInbox, support
summary
string
tags
array of string
updatedAt
string
erforderlich
visibility
string
erforderlich
Possible values: public, private, direct, group
Codebeispiel
curl -X PATCH 'https://api.bird.com/workspaces/{workspaceId}/conversations/{conversationId}' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'Examples
Codebeispiel
curl -X PATCH "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/conversations/907798f8-fd72-44d5-8042-fcc05c1bb570" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
"name": "new name",
"description": "description",
"visibility": "private",
"attributes": {
"my-attribute": "123"
}
}'Codebeispiel
{
"id": "907798f8-fd72-44d5-8042-fcc05c1bb570",
"name": "new name",
"description": "description",
"status": "active",
"visibility": "private",
"accessibility": "invite-only",
"featuredParticipants": [
{
"id": "8f0b5377-2edc-4116-a8e8-6a475f245a04",
"type": "contact",
"status": "active",
"displayName": "John Doe",
"avatarUrl": "",
"contact": {
"identifierKey": "emailaddress",
"identifierValue": "john.doe@bird.com",
"platformAddress": "john.doe@bird.com"
}
},
{
"id": "68b80b8d-8060-42df-bda3-73505a8fdb84",
"type": "accessKey",
"status": "active",
"displayName": "My first email key",
"avatarUrl": ""
},
{
"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"
}
}
],
"activeParticipantCount": 2,
"pendingParticipantCount": 1,
"initiatingParticipant": {
"id": "8f0b5377-2edc-4116-a8e8-6a475f245a04",
"type": "contact",
"status": "active",
"displayName": "John Doe",
"avatarUrl": "",
"contact": {
"identifierKey": "emailaddress",
"identifierValue": "john.doe@bird.com",
"platformAddress": "john.doe@bird.com"
}
},
"channelId": "cb4b1ebc-34e6-5a7a-a375-f6f2f131d88f",
"lastMessage": {
"id": "d578f436-b3b7-49e6-95c2-24b77bb4e7ce",
"type": "text",
"preview": {
"text": "Hey, listen!"
},
"recipients": [
{
"type": "to",
"id": "8f0b5377-2edc-4116-a8e8-6a475f245a04",
"identifierKey": "emailaddress",
"identifierValue": "john.doe@bird.com",
"platformAddress": "john.doe@bird.com",
"contactAnnotation": {
"name": "John Doe"
}
}
],
"status": "delivered",
"sender": {
"id": "68b80b8d-8060-42df-bda3-73505a8fdb84",
"type": "accessKey",
"status": "active",
"displayName": "My first email key",
"avatarUrl": ""
},
"createdAt": "2024-11-29T13:22:22.875Z"
},
"createdAt": "2024-11-25T19:31:47.264Z",
"updatedAt": "2024-11-29T15:37:20.534Z",
"platformStyle": "email",
"attributes": {
"my-attribute": "123"
}
}