Documentation
Sign inGet started

Send your first email

Create an API key, send through Bird's shared onboarding domain, and check the result. You do not need to verify a sending domain or publish DNS records for this guide. Verify your own domain before sending to customers.

1. Create an API key

In the dashboard, go to Developers > API keys and create a key. Keys are scoped to a region and look like bk_us1_... or bk_eu1_...; the region in the prefix tells you which API host to call: https://us1.platform.bird.com or https://eu1.platform.bird.com.
The API Keys page in the Bird dashboard, listing keys with their masked prefix, scopes, and last-used time
The full key is shown once, at creation time. Copy it somewhere safe, then export it so the step 2 snippets can read it:
Code example
export BIRD_API_KEY="bk_us1_..."

2. Send an email

Send from onboarding@messagebird.dev, Bird's shared onboarding domain, available to every workspace with no setup. Address it to delivered@messagebird.dev, a sandbox recipient that always delivers, so the result is deterministic without a real mailbox.
The cURL call names the US host. If your key starts with bk_eu1_, call https://eu1.platform.bird.com instead. The SDK reads the region from your key and selects the host. The TypeScript tab requires npm install @messagebird/sdk.
import { BirdClient } from "@messagebird/sdk";

const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });

const msg = await bird.email.send({
  from: { email: "onboarding@messagebird.dev", name: "Bird" },
  to: ["delivered@messagebird.dev"],
  subject: "Hello from Bird",
  html: "<p>My first Bird email.</p>",
});

console.log(msg.id, msg.status);
For complete installation and run steps in each language or framework, use the SDK quickstarts.

3. See the result

The API responds with 202: Bird has accepted the email and delivers it asynchronously. The *_count fields track recipients through the delivery states. In the initial response, one recipient is accepted and none are delivered.
Code example
{
  "id": "em_01ky7ma8y2es1s2akzk53tmjn0",
  "status": "accepted",
  "category": "marketing",
  "from": { "email": "onboarding@messagebird.dev" },
  "to": [{ "email": "delivered@messagebird.dev" }],
  "subject": "Hello from Bird",
  "accepted_count": 1,
  "processed_count": 0,
  "delivered_count": 0,
  "deferred_count": 0,
  "bounced_count": 0,
  "complained_count": 0,
  "rejected_count": 0,
  "open_count": 0,
  "click_count": 0,
  "track_opens": true,
  "track_clicks": true,
  "created_at": "2026-07-23T13:58:20.866Z"
}
Fetch the message by its em_ ID to see its current state. A message moves from accepted through processed to delivered. Poll until the sandbox message reaches delivered:
const msg = await bird.email.get("em_abc123");
msg.status; // "accepted" | "processed" | "delivered" | "bounced" | …
msg.delivered_count;
msg.bounced_count;
In the cURL tab, replace {region} and {message_id}, and use $BIRD_API_KEY in place of $TOKEN.
The read now shows status: "delivered", delivered_count: 1, and a delivered_at timestamp.
Because you sent to delivered@messagebird.dev, the outcome is guaranteed: the message flows through Bird's real delivery pipeline, including production event and webhook shapes, but never touches a real mailbox. To test a bounce, send to bounce@messagebird.dev. The testing sandbox guide lists every sandbox address and its simulated outcome.

About the onboarding domain

The shared onboarding@messagebird.dev sender is available for onboarding and has these limits:
  • Apart from the @messagebird.dev sandbox addresses, it only delivers to verified members of your workspace; any other recipient is rejected with a 422.
  • Sends are capped at 50 recipients per organization per UTC day, counting every to, cc, and bcc address, sandbox recipients included. Past the cap the API returns a 429.
When you're ready to email real customers, verify your own sending domain and put your own address in from; everything else in the request stays the same.

Next steps