Documentation
Sign inGet started

bird email mailboxes compose

Usage

Exemple de code
bird email mailboxes compose <mailbox-id> [flags]

Description

Send a new message from a mailbox
Sends from the mailbox's own address and starts a new conversation. Replies thread back into it automatically. To reply within an existing conversation, use bird email threads messages reply instead.
Build the request from flags, a JSON EmailMailboxComposeRequest 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

Exemple de code
# print the body shape (no credentials needed)
bird email mailboxes compose --example

# the body it prints:
Exemple de code
{
  "subject": "Your quote",
  "text": "Hi, here is the quote you asked for.",
  "to": ["delivered@messagebird.dev"]
}
Exemple de code
# preview the resolved request without sending
bird email mailboxes compose <mailbox-id> --to alice@example.com --subject "Hi" --text "Hello" --dry-run

Options

Recipients

NameDescription
--to <v1,v2,…>Recipient address; repeatable. Accepts bare addresses or RFC 5322 "Name <addr>" form
--cc <v1,v2,…>CC recipient; repeatable. Accepts bare addresses or RFC 5322 "Name <addr>" form
--bcc <v1,v2,…>BCC recipient; repeatable. Accepts bare addresses or RFC 5322 "Name <addr>" form
--reply-to <v1,v2,…>Reply-To address; repeatable. Defaults to the mailbox's own default-reply-to

Content

NameDescription
--subjectSubject line
--htmlHTML body
--textPlain-text body

Labels & metadata

NameDescription
--tag <key=value>Tag as name=value; repeatable
--metadataArbitrary JSON metadata object

Delivery

NameDescription
--categorySuppression policy: marketing or transactional; defaults to transactional

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 mailboxes createCreate a mailbox
bird email mailboxes deleteDelete a mailbox
bird email mailboxes getGet a mailbox
bird email mailboxes labelsList a mailbox's labels
bird email mailboxes listList mailboxes
bird email mailboxes restoreRestore a deleted mailbox
bird email mailboxes resumeResume a suspended mailbox
bird email mailboxes statsMailbox email statistics
bird email mailboxes updateUpdate a mailbox