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