Update conversation
PATCH
/workspaces/{workspaceId}/conversations/{conversationId}
Update a conversation's properties
Verzoek-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
Onderliggende parameters tonen
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.
Antwoord-payload
accessibility
string
verplicht
Possible values: open, invite-only, request-to-join, private
activeParticipantCount
integer
verplicht
assigneeId
string
attributes
object
category
string
channelId
string
verplicht
createdAt
string
verplicht
description
string
directory
string
featuredParticipants
array of object
verplicht
Onderliggende attributen tonen
featuredParticipants.avatarUrl
string
featuredParticipants.contact
object
Onderliggende attributen tonen
featuredParticipants.contact.identifierKey
string
verplicht
featuredParticipants.contact.identifierValue
string
verplicht
featuredParticipants.contact.platformAddress
string
featuredParticipants.contact.platformAddressSelector
string
featuredParticipants.conversationId
string
featuredParticipants.createdAt
string
featuredParticipants.displayName
string
featuredParticipants.id
string
verplicht
featuredParticipants.resourceUri
string
featuredParticipants.status
string
Possible values: invited, pending, active, inactive
featuredParticipants.type
string
verplicht
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
featuredParticipants.updatedAt
string
hasDraft
boolean
id
string
verplicht
inbox
object
Onderliggende attributen tonen
inbox.id
string
verplicht
inbox.identifier
string
verplicht
inbox.ownerId
string
verplicht
inbox.ownerType
string
verplicht
Possible values: user, group
inbox.type
string
verplicht
Possible values: personal, shared, support
initiatingParticipant
object
Onderliggende attributen tonen
initiatingParticipant.avatarUrl
string
initiatingParticipant.contact
object
Onderliggende attributen tonen
initiatingParticipant.contact.identifierKey
string
verplicht
initiatingParticipant.contact.identifierValue
string
verplicht
initiatingParticipant.contact.platformAddress
string
initiatingParticipant.contact.platformAddressSelector
string
initiatingParticipant.conversationId
string
initiatingParticipant.createdAt
string
initiatingParticipant.displayName
string
initiatingParticipant.id
string
verplicht
initiatingParticipant.resourceUri
string
initiatingParticipant.status
string
Possible values: invited, pending, active, inactive
initiatingParticipant.type
string
verplicht
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
initiatingParticipant.updatedAt
string
lastMessage
object
Onderliggende attributen tonen
lastMessage.createdAt
string
verplicht
lastMessage.draft
boolean
verplicht
lastMessage.id
string
verplicht
lastMessage.preview
object
verplicht
Onderliggende attributen tonen
lastMessage.preview.text
string
lastMessage.recipients
array of object
Onderliggende attributen tonen
lastMessage.recipients.contactAnnotation
object
Annotations add extra information to a sender or receiver. For email messages, the name annotation overrides the display name.
Onderliggende attributen tonen
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.
Onderliggende attributen tonen
lastMessage.recipients.identifiers.identifierKey
string
verplicht
The identifier key for finding the contact (e.g. emailaddress, phonenumber).
lastMessage.recipients.identifiers.identifierValue
string
verplicht
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
Onderliggende attributen tonen
lastMessage.sender.email
string
lastMessage.sender.name
string
lastMessage.sender.avatarUrl
string
lastMessage.sender.contact
object
Onderliggende attributen tonen
lastMessage.sender.contact.identifierKey
string
verplicht
lastMessage.sender.contact.identifierValue
string
verplicht
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
verplicht
lastMessage.sender.resourceUri
string
lastMessage.sender.status
string
Possible values: invited, pending, active, inactive
lastMessage.sender.type
string
verplicht
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
lastMessage.sender.updatedAt
string
lastMessage.status
string
verplicht
Possible values: accepted, processing, sent, sending_failed, delivered, delivery_failed, deleted
lastMessage.type
string
verplicht
Possible values: text, html, image, file, gif, location, carousel, list, section, authentication, action, comment
lastMessageIncomingAt
string
lastMessageOutgoingAt
string
name
string
verplicht
participants
array of object
Onderliggende attributen tonen
participants.contact
object
Onderliggende attributen tonen
participants.contact.identifierKey
string
verplicht
participants.contact.identifierValue
string
verplicht
participants.contact.platformAddress
string
participants.contact.platformAddressSelector
string
participants.id
string
verplicht
participants.type
string
verplicht
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
pendingParticipantCount
integer
platformStyle
string
verplicht
Possible values: direct, email, direct-multiple, direct-threaded, group-multiple
privateAttributes
string
read
boolean
referral
object
Onderliggende attributen tonen
referral.caption
string
referral.mediaType
string
referral.mediaUrl
string
referral.sourceId
string
verplicht
referral.sourceType
string
referral.sourceUrl
string
referral.text
string
referral.timestamp
string
referral.title
string
referral.username
string
resource
object
Onderliggende attributen tonen
resource.id
string
verplicht
resource.type
string
verplicht
Possible values: task, task-conversation, reimbursement, sales-lead, sales-opportunity, sales-account, expense, project
resourceUri
string
starred
boolean
status
string
verplicht
Possible values: deleted, active, closed, spam, archived
style
string
verplicht
Possible values: default, directMessage, chatChannel, personalInbox, resource, groupInbox, support
summary
string
tags
array of string
updatedAt
string
verplicht
visibility
string
verplicht
Possible values: public, private, direct, group
Codevoorbeeld
curl -X PATCH 'https://api.bird.com/workspaces/{workspaceId}/conversations/{conversationId}' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'Examples
Codevoorbeeld
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"
}
}'Codevoorbeeld
{
"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"
}
}