CLI
Send your first email straight from the terminal: install the bird CLI, log in once, and send. No code, no API key to copy around.
1. Install
Ejemplo de código
curl -fsSL https://cli.platform.bird.com/install.sh | shOn Windows, use the PowerShell installer at https://cli.platform.bird.com/install.ps1 instead.
2. Log in
Ejemplo de código
bird auth loginThis opens a browser consent page where you pick a workspace and the permissions to grant. The CLI stores a workspace-bound OAuth token in ~/.config/bird/credentials.json and refreshes it automatically on use — the API region comes from the workspace, so there's no host or key to configure. On a headless machine or over SSH, use bird auth login --device to get a code you approve on another device.
3. Send an email
Send from Bird's shared onboarding domain to the delivered@messagebird.dev sandbox address — no domain verification, no real mailbox needed:
Ejemplo de código
bird email send \
--from onboarding@messagebird.dev \
--to delivered@messagebird.dev \
--subject "Hello from Bird" \
--html "<p>My first Bird email.</p>"The CLI prints the accepted message as JSON:
Ejemplo de código
{
"id": "em_019c1930687b7bfa8a1b2c3d4e5f6789",
"status": "accepted",
"category": "transactional",
"to": [{ "email": "delivered@messagebird.dev" }],
"created_at": "2026-06-10T14:30:00Z"
}--to is repeatable for multiple recipients, --text sends a plain-text body, and --dry-run prints the resolved request without sending it.
4. Check the result
accepted means Bird took the message — read it back by its em_ ID and watch the status reach delivered:
Ejemplo de código
bird email get em_019c1930687b7bfa8a1b2c3d4e5f6789Add --format text for a human-readable card instead of JSON.
Everything you just did is script- and agent-friendly by design: every command emits JSON to stdout by default, errors are a JSON envelope on stderr, and exit codes are semantic — so a script (or an AI agent) branches on structure, never on prose. See the CLI for agents for the full contract.
Next steps
- CLI reference — every command, flag, and output shape.
- The CLI for agents — JSON output, exit codes, --dry-run, and idempotent retries.
- Send your first email — the same flow over raw HTTP and the SDKs.
- Sending domains — verify your own domain for production sending.