Documentation
Sign inGet started

bird email send-batch

Usage

Ejemplo de código
bird email send-batch [flags]

Description

Send a batch of email messages in one call.
The body is a JSON array of send requests (up to 100). Every message is validated before any is queued — if one fails, the whole batch is rejected. Sending is outbound and irreversible: each result reports "accepted", not "delivered" — read a message back with "bird email get" to confirm delivery.
Build the request from flags, a JSON EmailMessageBatchRequest body via --body-file ("-" reads stdin), or both — a flag overrides the matching body field. Run --example to print a ready-to-edit body, or --dry-run to print the resolved request without sending it.

Examples

Ejemplo de código
# print the body shape (no credentials needed)
bird email send-batch --example

# the body it prints:
[
  {
    "from": {
      "email": "hello@bird.com",
      "name": "Bird Support"
    },
    "subject": "Your receipt for order #1234",
    "text": "Thanks for your purchase! Your receipt is attached.",
    "to": [
      {
        "email": "jane@example.com",
        "name": "Jane Doe"
      }
    ]
  },
  {
    "from": {
      "email": "hello@bird.com",
      "name": "Bird Support"
    },
    "subject": "Your receipt for order #1235",
    "text": "Thanks for your purchase! Your receipt is attached.",
    "to": [
      {
        "email": "john@example.com",
        "name": "John Roe"
      }
    ]
  }
]

# send a batch from a JSON array of messages
bird email send-batch --body-file batch.json

# preview the resolved batch without sending
bird email send-batch --body-file batch.json --dry-run

# pipe the batch in on stdin
cat batch.json | bird email send-batch --body-file -

Options

Request

NameDescription
--body-fileRead the JSON request body from this file; "-" reads stdin
--examplePrint a complete example request body, then exit
--dry-runPrint the resolved request without sending it, then exit
--idempotency-keyDeduplication key; a retry with the same key won't act twice

Options

NameDescription
--response-schemaPrint the fields this command returns, then exit
NameDescription
bird email cancelCancel a scheduled message
bird email contentGet stored message content
bird email getGet a message
bird email listList messages
bird email recipientsList recipients of a message
bird email sendSend an email message.