Update a message in a thread
PATCH
/v1/email/threads/{thread_id}/messages/{message_id}
curl -X PATCH "https://us1.platform.bird.com/v1/email/threads/{thread_id}/messages/{message_id}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Applies read-state, label, and contact changes to a message in a conversation. Omitted fields are left unchanged. The read flag is only valid on received messages.
Cuerpo de la solicitud
read
boolean
Mark the message read (true) or unread (false). Only valid on received messages.
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.
Mostrar parámetros secundarios
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 message to, or null to unlink the current contact.
trashed
boolean
Set to false to restore a trashed message within its 30-day trash window (clears trashed_at and restores the original retention). To trash a message use DELETE; true is rejected.
Carga de respuesta
id
string
obligatorio
Message ID. Received messages carry a rem_ ID, sent messages an em_ ID — the same IDs used by the received-message and sent-message logs.
direction
string
obligatorio
Direction of the message — inbound for a received message, outbound for a sent one.
channel
string
obligatorio
Channel this message was carried on. Always email.
thread_id
string
obligatorio
Conversation this message belongs to.
from
string
obligatorio
Sender address.
to
array of string
obligatorio
Recipient addresses on the To line.
cc
array of string
obligatorio
Recipient addresses on the Cc line. Empty when the message had none.
delivered_to
nullable string
obligatorio
Address the message was actually delivered to, when it differs from the mailbox address (for example mail routed in from another address). Null for sent messages and for mail addressed directly to the mailbox.
subject
nullable string
obligatorio
Message subject. Null when the message had no subject.
preview
nullable string
obligatorio
Short plain-text preview of the message body.
extracted_text
nullable string
Plain-text content of the message with quoted history stripped — readable for the mailbox's full retention period, both directions. Always present when fetching a single message; on list endpoints it is included only when the request sets include=extracted_text. Null when no text could be extracted.
read
nullable boolean
obligatorio
Whether the message has been marked read. Null for sent messages.
disposition
nullable string
obligatorio
Where the message landed: inbox for accepted mail, blocked (receive policy or rules), or unauthenticated (failed sender authentication). Null for sent messages. Trash state is carried separately in trashed_at.
status
nullable string
obligatorio
Folded delivery status of a sent message: accepted, sent (provider handoff), delivered (all attempted recipients delivered), or failed (terminal failure). Null for received messages.
recipients
nullable array
obligatorio
Terminal per-recipient delivery outcomes of a sent message, folded in as they become known — part of the message's durable memory. Null for received messages and before any recipient reaches a terminal state. Per-recipient event detail lives on the sent-message log (source) for 30 days.
spf_pass
nullable boolean
obligatorio
Whether SPF passed for the sender of a received message. Null for sent messages and when no verdict was computable. Part of the message's durable memory — readable for the mailbox's full retention period, so the verdict survives after the 30-day inbound log has expired.
dkim_pass
nullable boolean
obligatorio
Whether DKIM passed for the sender of a received message. Null for sent messages and when no verdict was computable. Durable for the mailbox's retention period.
dmarc_pass
nullable boolean
obligatorio
Whether DMARC passed for the sender of a received message. Null for sent messages and when no verdict was computable. Durable for the mailbox's retention period.
trashed_at
nullable string
obligatorio
When the message was moved to the trash, or null when it is not trashed. Trashed messages are purged 30 days after trashing; restore it with PATCH {"trashed": false} before then.
rank
number
Relevance rank of this result. Present only on search results, higher is more relevant.
attachment_count
integer
obligatorio
Number of attachments on the message.
attachment_manifest
array of object
obligatorio
Attachment metadata (filename, content type, size). Remains readable for the mailbox's retention period even after the attachment bytes themselves have expired.
Mostrar atributos secundarios
attachment_manifest.id
string
obligatorio
Attachment ID, used to download the attachment bytes.
attachment_manifest.filename
nullable string
obligatorio
Original filename, or null when the attachment had none.
attachment_manifest.content_type
nullable string
obligatorio
MIME content type, or null when it could not be determined.
attachment_manifest.size
integer
obligatorio
Attachment size in bytes.
reference_ids
array of string
obligatorio
RFC 5322 References header entries used to thread the conversation.
labels
array of string
obligatorio
Labels applied to this message. A message carries at most 20 labels.
contact_id
nullable string
obligatorio
Contact linked to this message, or null when none is linked.
source
object
obligatorio
Link to the message's entry in the received-message or sent-message log, which carries delivery analytics such as per-recipient events. Log entries expire 30 days after the message occurred.
Mostrar atributos secundarios
source.resource
string
obligatorio
API path of the log entry for this message.
source.available_until
string
obligatorio
When the log entry (and the message's original rendered source) expires.
occurred_at
string
obligatorio
When the message was received or accepted for sending.