Update a thread
PATCH
/v1/email/threads/{thread_id}
curl -X PATCH "https://us1.platform.bird.com/v1/email/threads/{thread_id}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Applies label changes to a conversation and links or unlinks a contact. Omitted fields are left unchanged.
Treść żądania
labels
object
Label changes to apply. Labels in add are applied and labels in remove are taken off; other labels are left untouched. Adding a label that is already present, or removing one that is not, has no effect.
Pokaż parametry podrzędne
labels.add
array of string
Labels to apply.
labels.remove
array of string
Labels to take off.
contact_id
nullable string
Contact to link this conversation to, or null to unlink the current contact.
Treść odpowiedzi
id
string
wymagane
Thread ID.
mailbox_id
string
wymagane
Mailbox this conversation belongs to.
channel
string
wymagane
Channel this conversation lives on. Always email.
contact_id
nullable string
wymagane
Contact linked to this conversation, or null when none is linked.
subject
nullable string
wymagane
Subject of the conversation, taken from its first message. Null when that message had no subject.
participants
array of string
wymagane
Addresses that appear on the retained messages in this conversation, including the mailbox's own address.
message_count
integer
wymagane
Number of retained messages in this conversation, both directions.
unread_count
integer
wymagane
Number of retained received messages in the inbox that are still unread.
last_message_at
string
wymagane
When the most recent retained message in this conversation was received or sent.
last_direction
string
wymagane
Direction of the most recent message — inbound for a received message, outbound for a sent one.
labels
array of string
wymagane
Labels applied to this conversation. A thread carries at most 20 labels.
created_at
string
wymagane
When the thread was created.
updated_at
string
wymagane
When the thread last changed.