Send an action-based email — here a booking confirmation — using POST /v1/messages. You need an API key and an email channel with a verified sending domain. The first send goes to your own address, so you see exactly what your customers will get. New to the API? Ready in three steps gets you to a first call with the same key and sender — this page builds on it.
The first 50 emails are free. Every organisation starts with 50 free emails — through the API too. While they last, a send holds nothing and costs nothing (billing.hold_amount: 0); after that, sends draw on prepaid credit. See Free starter units.

Prerequisites

  • API key — create one in the dashboard under Settings → API & webhooks with the ready-made set Send messages (messages:send, messages:read, campaigns:read). Step 4 also needs webhooks:manage — add it under Individual permissions, or use a second key. All permissions: Authentication → Permissions.
  • Email channel ID — a ch_ ID (e.g. ch_550e8400e29b41d4a716446655440000); step 1 says where to find it.
  • Sending domain verified with SPF, DKIM, and DMARC records. Until it is, the channel is not approved and sends answer 403 (see If it doesn’t work).
The examples read the key and your own address from the environment:

Steps

1

Find your channel ID

Permission: none in the dashboard; campaigns:read through the API.In the dashboard, open Channels, click your email channel and switch to Settings. At the end of the page, Channel ID for the API shows the ch_… ID with a copy button (people with the role Manage see it — the same people who create API keys). You’ll pass it as channel_id in every send request.Or list the workspace’s channels through the API:
2

Pick the idempotency key: the booking number

Every send carries an Idempotency-Key. Use one key per logical operation — for a booking confirmation, that is the booking: booking-confirmation-BK-10427.
  • A retry after a timeout or a 5xx uses the same key — it finds the message of the first attempt and never sends or charges twice.
  • A different email about the same booking (a reminder, a cancellation) is a different operation and gets its own key: booking-reminder-BK-10427.
  • Don’t generate a fresh random key per attempt ($(uuidgen) inside a retry loop): every attempt then looks new, and a timeout can turn into two emails.
  • The same key with a different body answers 409 conflict. Keys are printable ASCII without spaces, up to 255 characters, and are remembered for 24 hours. More in Conventions → Idempotency.
3

Send it to yourself

Permission: messages:send.A booking confirmation is a transactional MESSAGE: it needs no marketing consent. to is your own address for this first try — the recipient becomes a contact of the workspace like anyone else.
A successful response returns status: queued and a billing snapshot — what this message costs and where the organisation stands on email volume tiers. While the free emails last, the message costs nothing:
Check your inbox. Once it looks right, send the same request to your customer — with that booking’s own number in the key.The organisation’s balance (billing.balance) is part of the answer only for a key with billing:read created by an owner or admin of the organisation — see Send response.
4

Track delivery via webhook

Permission: webhooks:manage (to register the endpoint).Email delivery events use the email.* prefix. Subscribe to them when registering your endpoint:
When the mail server accepts the message you receive:
Email uses email.delivered and email.bounced — not message.delivered. Subscribing to the wrong event name means you will not receive email delivery updates.

If it doesn’t work

A 4xx answer changed nothing: fix the cause and retry with the same Idempotency-Key. All codes: Error codes.

Learn more