Skip to main content
In about ten minutes once your domain is verified, you’ll have a working API key, a sent email and its delivery status. This quickstart crosses two APIs on two hosts, with two different secrets. You’ll collect both: Both secrets are bk_live_ followed by 64 hex characters, so you can’t tell them apart by looking. Keep them in BRUDCAST_API_KEY and BRUDCAST_SENDING_KEY, the names used throughout this page. See Authentication.
Before you start, you need a terminal with curl, or Node.js, Python or PHP.

Step 0: verify your sending domain

Every step below needs a sending domain of your own, added and verified. Verification waits on a DNS change, which can take a few hours to spread, so start it before anything else.
  1. Add a sending domain. Brudcast generates five DNS records.
  2. Publish them with your DNS provider. See DNS records and DNS by provider.
  3. Verify your domain. It shows Verified once the records resolve.
The Brudcast trial address has no sending keys and no SMTP credentials, so it can’t be used with the send API or SMTP. See Email overview.
1

Create an API key

  1. Go to Developers > API Keys and select Create API Key.
  2. Enter a Key Name, for example Quickstart.
  3. Under Permissions, set Sending Domains to Read Sending Domains and Messages to Read Message Log. Leave everything else at No access.
  4. Select Create.
  5. Copy the Secret Key. It starts with bk_live_ and is shown only once.
Store the key in an environment variable rather than in your code:
2

Make your first platform API call

List your sending domains. This proves the key works and gives you the domain to send from.
Each domain in data has more fields than shown here, and the response also carries meta with pagination details:
Find a domain whose status is verified. You’ll send from an address on it.
3

Create a sending key

The email send API uses its own credential, bound to one domain.
  1. Go to Channels > Email and open the Domains tab.
  2. Select your domain, then open its Sending Keys tab.
  3. Select Add Sending Key, enter a Description and select Create Key.
  4. Copy the API Secret Key. It’s shown only once.
A new key shows provisioning in the Status column for a moment while the send API receives it. Wait until it shows active.
4

Send an email

Change the from address to one on your verified domain and the to address to an inbox you can check.
A 202 Accepted response means Brudcast queued the message:
Keep the jobId. It identifies this message everywhere else. Take the value from your own response, not from the example above, and put it in an environment variable. The next step reads it:
5

Check the message status

Look the message up in the message log with your API key from step 1.
Once the receiving mail server has answered, each delivery attempt shows up with its outcome:
A 404 right after sending is normal. The message enters the log only once the receiving server has responded, so wait a few seconds and try again. A 404 that never clears usually means BRUDCAST_JOB_ID holds something other than the jobId your own send returned. See Message status for every field.

What’s next

Instead of polling the message log, have Brudcast call you when something happens. Create a webhook endpoint and subscribe to email.delivered, email.bounced and the other email events.
Why: The key is missing, mistyped, revoked or expired, or your server’s IP address isn’t on the key’s IP allowlist.Fix: Send the full key in X-API-Key, including the bk_live_ prefix. Check the key’s status and IP allowlist in Developers > API Keys.
Why: The key was created without the permission this endpoint needs.Fix: Open the key in Developers > API Keys and edit its Permissions.
Why: The send API reads only the Authorization header. The key is missing, isn’t prefixed with Bearer , or was deleted or regenerated.Fix: Send Authorization: Bearer followed by the sending key. If you just created or regenerated the key, wait until its status is active.
Why: A sending key can only send from the domain it was created on.Fix: Use a from address on that domain, or create a sending key on the other domain.

Email send API

Attachments, Cc and Bcc, custom headers and every error.

Sending keys

The credential the send API needs, and how it differs from an API key.

Webhooks

Get delivery, bounce and engagement events pushed to you.

API keys

Scopes, expiry, IP allowlists and request logs.

Authentication

Which credential works on which surface.