List a thread message's attachments
GET
/v1/email/threads/{thread_id}/messages/{message_id}/attachments
const atts = await bird.email.threads.messages.attachments("thr_01abc", "rem_01xyz");
console.log(atts.data.map((a) => a.filename));result = client.email.threads.messages.attachments(
"thr_01krdgeqcxet5s7t44vh8rt9mg", "rem_01krdgeqcxet5s7t44vh8rt9mg",
)
for attachment in result.data:
print(attachment.filename, attachment.size)result, err := client.Email.Threads.Messages.Attachments(context.Background(), "thr_123", "rem_456")
if err != nil {
log.Fatal(err)
}
for _, a := range result.Data {
fmt.Println(a.Filename, a.Size)
}$attachments = $bird->email->threads->messages->attachments(
'thr_01krdgeqcxet5s7t44vh8rt9mg',
'rem_01krdgeqcxet5s7t44vh8rt9mg',
);
foreach ($attachments->getData() ?? [] as $attachment) {
echo $attachment->getFilename(), "\n";
}bird email threads messages attachments <thread-id> <message-id>curl -X GET "https://us1.platform.bird.com/v1/email/threads/{thread_id}/messages/{message_id}/attachments" \
-H "Authorization: Bearer $TOKEN"Risposta200
{
"data": [
{
"id": "rea_01krdgeqcxet5s7t44vh8rt9mg",
"filename": "invoice.pdf",
"content_type": "application/pdf"
}
]
}
Returns the attachments on a message in a conversation. Attachment bytes are downloadable for the mailbox's retention tier after the message occurred. Later requests return 410 Gone, while the attachment metadata stays readable on the message's attachment_manifest.
Parametri
thread_id
string
Thread identifier. Starts with thr_.
message_id
string
Message ID (rem_ for a received message, em_ for a sent one).
Payload di risposta
data
array of object
obbligatorio
Mostra attributi secondari
data.id
string
obbligatorio
Attachment ID, used to download the attachment bytes.
data.filename
nullable string
obbligatorio
Original filename, or null when the attachment had none.
data.content_type
nullable string
obbligatorio
MIME content type, or null when it could not be determined.
data.size
integer
obbligatorio
Attachment size in bytes.
Risorse correlate
Prosegui con la documentazione, le guide e gli esempi per questo argomento. Le risorse sono in inglese.
Guarda la guidaGetting started with emailEsplora la funzionalitàEmailSegui il percorso di apprendimentoBuild your first integrationGuida all'implementazioneSend your first email
Prova l'esercitazione e ottieni un brief di implementazione