Get a message in a thread
GET
/v1/email/threads/{thread_id}/messages/{message_id}
const msg = await bird.email.threads.messages.get("thr_01abc", "rem_01xyz");
console.log(msg.direction); // "inbound"message = client.email.threads.messages.get(
"thr_01krdgeqcxet5s7t44vh8rt9mg", "rem_01krdgeqcxet5s7t44vh8rt9mg",
)
print(message.subject)msg, err := client.Email.Threads.Messages.Get(context.Background(), "thr_123", "rem_456")
if err != nil {
log.Fatal(err)
}
fmt.Println(msg.Id, msg.Direction)$message = $bird->email->threads->messages->get(
'thr_01krdgeqcxet5s7t44vh8rt9mg',
'rem_01krdgeqcxet5s7t44vh8rt9mg',
);
echo $message->getFrom(), ' ', $message->getSubject();bird email threads messages get <thread-id> <message-id>curl -X GET "https://us1.platform.bird.com/v1/email/threads/{thread_id}/messages/{message_id}" \
-H "Authorization: Bearer $TOKEN"Returns a single message in a conversation, including its extracted plain text. Metadata and extracted text stay readable for the mailbox's retention tier. A message that has aged past its retention tier returns 410 Gone. A message that exists but does not belong to this thread returns 404.
Response Payload
id
string
required
Message ID. Received messages have a rem_ ID, sent messages an em_ ID: the same IDs used by the received-message and sent-message logs.
direction
string
required
Which way the message went. inbound means you received it, outbound means you sent it.
Possible values: inbound, outbound
channel
string
required
Channel this message lives on. Always email.
thread_id
string
required
Conversation this message belongs to.
from
string
required
Sender address.
to
array of string
required
Recipient addresses on the To line.
cc
array of string
required
Recipient addresses on the Cc line. Empty when the message had none.
delivered_to
nullable string
required
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
required
Message subject. Null when the message had no subject.
preview
nullable string
required
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 tier, in 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.
labels
array of string
required
Labels on this message. A received message always has exactly one placement label:
- inbox: Accepted mail.
- archive: The message's conversation was filed away.
- spam: The message failed sender authentication.
- blocked: The message was rejected by the mailbox's receive policy or rules.
A received message also has unread until it is read. trash marks a message in the trash, in either direction. Custom labels share the same list, and a message has at most 20 labels in total.
status
nullable string
required
Aggregate delivery status of a sent message:
- accepted: Accepted for sending.
- sent: Handed off to the provider.
- delivered: All attempted recipients delivered.
- failed: Terminal failure.
Null for received messages.
recipients
nullable array
required
Terminal per-recipient delivery outcomes of a sent message, filled in as each one becomes known and kept for the mailbox's full retention tier. 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.
authentication
nullable string
required
Whether the sender of a received message was authenticated.
- pass: the sender's identity was verified.
- fail: it was checked and did not verify.
- unknown: no verdict could be determined, so do not treat the sender as verified.
Null for sent messages. This field is readable for the mailbox's full
retention tier, so the verdict is still available after the 30-day
received-message log has expired.
Possible values: pass, fail, unknown, null
spf_pass
nullable boolean
required
Whether SPF passed for the sender of a received message. Null for sent messages and when no verdict is available. This field is kept for the mailbox's retention tier.
dkim_pass
nullable boolean
required
Whether DKIM passed for the sender of a received message. Null for sent messages and when no verdict is available. This field is kept for the mailbox's retention tier.
dmarc_pass
nullable boolean
required
Whether DMARC passed for the sender of a received message. Null for sent messages and when no verdict is available. This field is kept for the mailbox's retention tier.
purge_at
string
required
Scheduled permanent-deletion time. This is the end of the mailbox's retention tier, moved to no more than 30 days in the future while the message is in the trash. Restore a trashed message before then with PATCH {"labels": {"remove": ["trash"]}}.
attachment_count
integer
required
Number of attachments on the message.
attachment_manifest
array of object
required
Attachment metadata (filename, content type, size). Stays readable for the mailbox's retention tier even after the attachment bytes themselves have expired.
Show child attributes
attachment_manifest.id
string
required
Attachment ID, used to download the attachment bytes.
attachment_manifest.filename
nullable string
required
Original filename, or null when the attachment had none.
attachment_manifest.content_type
nullable string
required
MIME content type, or null when it could not be determined.
attachment_manifest.size
integer
required
Attachment size in bytes.
reference_ids
array of string
required
RFC 5322 References header entries used to thread the conversation.
contact_id
nullable string
required
Contact linked to this message, or null when none is linked.
source
object
required
Link to the message's entry in the received-message or sent-message log, which has delivery analytics such as per-recipient events. Log entries expire 30 days after the message occurred.
Show child attributes
source.resource
string
required
API path of the log entry for this message.
source.available_until
string
required
When the log entry (and the message's original rendered source) expires.
occurred_at
string
required
When the message was received or accepted for sending.