List messages
/v1/email/messagesfor await (const message of bird.email.list({ status: "bounced" })) {
console.log(message.id);
}for message in client.email.list(status="delivered"):
print(message.id)for msg, err := range client.Email.List(context.Background(), bird.EmailListParams{Status: bird.EmailStatusBounced}) {
if err != nil {
log.Fatal(err)
}
fmt.Println(msg.Id)
}foreach ($bird->email->list(['status' => 'delivered']) as $message) {
echo $message->getId(), "\n";
}bird email listcurl -X GET "https://us1.platform.bird.com/v1/email/messages" \
-H "Authorization: Bearer $TOKEN" \
--url-query "limit=25"{
"data": [
{
"id": "em_01krdgeqcxet5s7t44vh8rt9mg",
"from": {
"email": "onboarding@messagebird.dev",
"name": "Bird"
},
"to": [
{
"email": "delivered@messagebird.dev"
}
],
"subject": "Hello from Bird",
"category": "marketing",
"status": "accepted",
"broadcast_id": "eb_01krdgeqcxet5s7t44vh8rt9mg",
"accepted_count": 1,
"processed_count": 0,
"delivered_count": 0,
"bounced_count": 0,
"complained_count": 0,
"deferred_count": 0,
"rejected_count": 0,
"open_count": 0,
"click_count": 0,
"track_opens": false,
"track_clicks": false,
"created_at": "2026-07-01T12:00:00Z"
}
],
"next_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9",
"prev_cursor": null,
"refresh_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"
}
Returns the workspace's sent and scheduled messages, newest first, as a cursor page. Each item has the aggregate delivery status and per-state recipient counts. Message bodies are omitted.
Combine filters to narrow the page:
- Delivery status.
- Category.
- Tag.
- The broadcast that sent the messages.
- An exact
toorfromaddress. - A
created_afterorcreated_beforetime window.
Paramètres de requête
limitintegerMaximum number of items to return per page.
starting_afterstringCursor from the next_cursor field of a previous list response. Returns items immediately after the cursor position in the current sort order.
ending_beforestringCursor from the prev_cursor or refresh_cursor field of a previous list response. Returns items immediately before the cursor position in the current sort order. prev_cursor returns the preceding page. refresh_cursor anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
created_afterstringLimits the response to resources created at or after this timestamp. Combine it with created_before to select a time window. Use an RFC 3339 timestamp with a timezone offset.
created_beforestringLimits the response to resources created before this timestamp. Combine it with created_after to select a time window. Use an RFC 3339 timestamp with a timezone offset.
broadcast_idstringFilter messages by broadcast ID.
statusstringFilter by aggregate delivery status.
Possible values: scheduled, accepted, processed, deferred, delivered, partial_failure, bounced, complained, rejected, canceled
tagarrayFilter by tag. Accepts name to match any record carrying that tag name, or name:value to match a specific tag pair (for example category:welcome). Repeat the parameter to add more tags. A record must match every tag listed to be returned.
categorystringFilter by category.
Possible values: marketing, transactional
tostringFilter by recipient address. Exact match against any to/cc/bcc recipient on the message. The address is normalized to lowercase before comparison.
fromstringFilter by sender address. Exact match against the message from field. The address is normalized to lowercase before comparison.
Contenu de la réponse
next_cursorCursor for the next page. Pass back as starting_after to advance forward. null when no next page exists.
prev_cursorCursor for the previous page. Pass back as ending_before to step backward. null when no previous page exists.
refresh_cursorRefresh anchor, the first row of this response. Pass back as ending_before to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-null whenever data is non-empty; null only on an empty page. Distinct from prev_cursor.
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet.