Update a conversation
/v1/amb/conversations/{conversation_id}const result = await bird.amb.conversations.update(
"acv_01krdgeqcxet5s7t44vh8rt9mg",
{ assigned_to: null, labels: [], inbox_status: "resolved" },
);
console.log(result);result = client.amb.conversations.update('acv_01krdgeqcxet5s7t44vh8rt9mg', assigned_to=None, labels=[], inbox_status="resolved")
print(result)result, err := client.Amb.Conversations.Update(ctx, "acv_01krdgeqcxet5s7t44vh8rt9mg", bird.AmbConversationsUpdateParams{AssignedTo: bird.Null[string](), Labels: []string{}, InboxStatus: bird.Ptr(bird.ConversationInboxStatus("resolved"))})
if err != nil {
log.Fatal(err)
}
fmt.Println(result)$bird->amb->conversations->update('acv_01krdgeqcxet5s7t44vh8rt9mg', (new Model\AMBConversationUpdate())->setAssignedTo(null)->setLabels([])->setInboxStatus('resolved'));bird amb conversations update <conversation-id> --body-file - <<'JSON'
{
"assigned_to": "me",
"inbox_status": "open",
"labels": [
"billing",
"vip"
],
"queue": "billing",
"routing_change": {
"action": "dismiss",
"message_id": "amb_01krdgeqcxet5s7t44vh8rt9mg"
}
}
JSONcurl -X PATCH "https://us1.platform.bird.com/v1/amb/conversations/{conversation_id}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"assigned_to": "me",
"inbox_status": "open",
"labels": [
"billing",
"vip"
],
"queue": "billing",
"routing_change": {
"action": "dismiss",
"message_id": "amb_01krdgeqcxet5s7t44vh8rt9mg"
}
}'{
"inbox_status": "open",
"routing": {
"entry_point": "support",
"queue": "support"
},
"routing_change": {
"entry_point": "billing",
"queue": "billing",
"message_id": "amb_01krdgeqcxet5s7t44vh8rt9mg"
},
"last_message": {
"id": "amb_01krdgeqcxet5s7t44vh8rt9mg",
"direction": "outbound"
},
"id": "acv_01krdgeqcxet5s7t44vh8rt9mg",
"business_account_id": "abz_01krdgeqcxet5s7t44vh8rt9mg",
"status": "open",
"origin": "entry_point",
"device_capabilities": [
"QUICK",
"LIST",
"TIME"
],
"supported_content_kinds": [
"text"
],
"locale": "en-US",
"assigned_to": "usr_01krdgeqcxet5s7t44vh8rt9mg",
"labels": [
"billing",
"vip"
],
"closed_reason": "user_close"
}
Updates assignment, labels, inbox status, queue, or shared workspace read state, or settles a pending routing_change. A routing decision names the change's message_id and fails with 409 when a newer change replaced it. Moving the queue does not run routing rules. Resolving inbox work preserves the conversation and its Apple channel state. A new inbound message reopens the inbox work. To acknowledge messages, pass read with a date-time cutoff for their created_at. Only inbound messages already received at or before that cutoff are marked read. Messages sharing the timestamp are included together; later arrivals remain unread. Use assigned_to: me to assign yourself, a workspace member ID to assign a teammate, or null to unassign. An API key cannot use me.
Paramètres
conversation_idstringConversation identifier. Starts with acv_.
Corps de la requête
assigned_toUser to assign this conversation to. Pass a workspace member's user ID, me for the signed-in user, or null to unassign it. An API key cannot use me and receives a 422 response.
inbox_statusWhether the conversation needs attention in the workspace inbox. Set it to resolved when the work is finished. A new inbound message reopens the same conversation. Changing inbox status preserves message history and does not change the channel's permission to send messages or mark messages read.
Possible values: open, resolved
labelsLabels chosen by your workspace. On update, this replaces the full set; pass an empty array to clear every label. Labels do not change read state or inbox status.
Each label must contain 1 to 64 characters, with no commas, control characters, or leading or trailing whitespace. Duplicate labels are rejected. The names all, archived, assigned, closed, deleted, draft, drafts, flagged, important, inbox, junk, muted, none, open, pinned, read, snoozed, spam, starred, trash, and unread are reserved in every casing.
readMark received inbound messages with created_at at or before this timestamp as read in the shared workspace inbox. Messages sharing the timestamp are included together. Later arrivals remain unread until another read update. This does not send a read receipt to the customer or change inbox status. Omit to leave read state unchanged.
queueQueue to move the conversation to, or null to leave it unrouted. Routing rules do not run, and the conversation keeps its group and intent. Moving the queue clears any pending routing_change, and cannot be combined with an apply decision.
routing_changeSettles the conversation's pending routing_change. message_id names the change you reviewed: the request fails with 409 when the pending change has a different message ID, because a newer customer message replaced it or a teammate already settled it. Either action clears routing_change.
Afficher les paramètres enfants
routing_change.actionapply adopts the pending change's group, intent, entry point and queue. dismiss discards it and leaves group, intent and entry point unchanged.
Possible values: apply, dismiss
routing_change.message_idContenu de la réponse
inbox_statusWhether the conversation needs attention in the workspace inbox. Set it to resolved when the work is finished. A new inbound message reopens the same conversation. Changing inbox status preserves message history and does not change the channel's permission to send messages or mark messages read.
Possible values: open, resolved
recipientThe customer on the other side of this Apple Messages for Business conversation.
routingRouting context the conversation is filed under. Routing rules set it when the conversation opens or reopens, or when the customer writes after it was resolved. A teammate can move the queue or apply a pending routing_change.
routing_changeRouting from a later customer message that differs from routing, waiting for a teammate to apply or dismiss it. Null when there is none. Only recorded while the inbox status is open; resolving the conversation or moving its queue clears it.
last_messageMost recent message, or null when its identity has not been recorded.
idConversation ID.
business_account_idBusiness this conversation belongs to.
statusApple's native conversation state, which determines whether replies can be sent. A customer close or an Apple 410 response closes it; a newer inbound message reopens it. This API has no native close operation. Use inbox_status to resolve workspace inbox work independently.
Possible values: open, closed
originHow the conversation started. entry_point means the customer opened it from one of your configured Apple Messages for Business entry points. invitation means the customer accepted an invitation and sent a message. This is set once when the conversation is created and never changes.
Possible values: entry_point, invitation
device_capabilitiesThe capability tokens the customer's device advertised on its most recent message, replaced by each inbound rather than accumulated, so this describes the device in use now. An empty list means the device's capabilities are unknown. Implemented message types may still be sent, but device rendering support has not been confirmed. Authentication requires an explicitly advertised AUTH2 capability.
supported_content_kindsImplemented baseline types plus interactive types confirmed by device_capabilities. An empty capability list yields text, attachments and rich links; it does not establish support for other types. Unadvertised quick replies, list pickers, time pickers and forms are refused when capabilities are known. Custom apps and opaque interactive references are not included because their device support cannot be inferred from these tokens. Unsupported roadmap types cannot be sent.
localeThe customer's locale from the most recent inbound message, or your business's default locale before any inbound arrives. Preserved in Apple's locale format, for example en_US@rg=nlzzzz.
unread_countNumber of inbound messages the workspace has not acknowledged. Shared across the workspace. Pass read with a date-time to acknowledge received inbound messages through that timestamp. Sending a reply does not change this count.
assigned_toThe user this conversation is assigned to, or null when unassigned. Assignment is not rechecked against workspace membership on read, so it can still name a user whose access was removed.
labelsWorkspace labels on this conversation. Labels do not change read state or inbox status.
closed_atWhen the native Apple conversation was closed. Null while its native status is open; independent of inbox status.
closed_reasonWhy the native Apple conversation was closed. Null while its native status is open; independent of inbox status.
created_atWhen this conversation was created.
updated_atWhen this conversation last changed.
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet.