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.- Add a sending domain. Brudcast generates five DNS records.
- Publish them with your DNS provider. See DNS records and DNS by provider.
- Verify your domain. It shows Verified once the records resolve.
Watch the walkthrough
Watch the walkthrough
1
Create an API key
- Go to Developers > API Keys and select Create API Key.
- Enter a Key Name, for example
Quickstart. - Under Permissions, set Sending Domains to Read Sending Domains and Messages to Read Message Log. Leave everything else at No access.
- Select Create.
- Copy the Secret Key. It starts with
bk_live_and is shown only once.
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 Find a domain whose
data has more fields than shown here, and the response also carries meta
with pagination details: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.
- Go to Channels > Email and open the Domains tab.
- Select your domain, then open its Sending Keys tab.
- Select Add Sending Key, enter a Description and select Create Key.
- 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 A Keep the
from address to one on your verified domain and the to address to an inbox you
can check.202 Accepted response means Brudcast queued the message: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 toemail.delivered, email.bounced and the other email events.
“This API key is missing the domains:read scope required by this endpoint…”
“This API key is missing the domains:read scope required by this endpoint…”
Why: The key was created without the permission this endpoint needs.Fix: Open the key in Developers > API Keys and edit its Permissions.
“From address domain 'x' does not match sending key domain 'y'”
“From address domain 'x' does not match sending key domain 'y'”
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.Related
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.