Sign inGet started

Update conversation

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

Examples

代码示例
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"
  }
}'