Skip to main content
A sending key is the credential the email send API requires. You send it to POST https://mailing-service.prod.brudcast.com/api/v1/send as Authorization: Bearer <key>. It does nothing on the platform API.
Before you start, you need your own verified sending domain. The Brudcast trial address has no sending keys and no SMTP credentials. See Add a sending domain and Verify your domain.

What a sending key is

A sending key carries one permission, messages:send, and it can’t be changed. It can’t read your contacts, change a domain or reach billing. That’s the reason to prefer it over a platform API key in an application that only sends mail.
A sending key and a platform API key have the same shape: bk_live_ followed by 64 hex characters. You can’t tell them apart by looking at them. Keep the sending key in BRUDCAST_SENDING_KEY and the platform API key in BRUDCAST_API_KEY, and never reuse one name for both. See Authentication.

One key, one domain

A domain sending key sends only from the domain it was created on. A from address on any other domain fails:
If one application sends from several of your domains, either hold one key per domain, or create a platform API key with Messages set to Full access, which carries messages:send and can send from any sending domain your organization owns.

Create a sending key

1

Open the domain's Sending Keys tab

Go to Channels > Email, open the Domains tab, select your domain, then select the Sending Keys tab.
2

Add the key

Select Add Sending Key, enter a Description naming the application that will hold it, then select Create Key.
3

Copy the secret

The Sending Key Created dialog shows the API Key ID and the API Secret Key. The secret is shown once and Brudcast stores only a hash of it, so copy it into your secret store before you close the dialog.
The dashboard walkthrough, with screenshots, is in Sending keys in the Guides tab.

Wait for active

A new or regenerated key isn’t usable straight away. It appears as Provisioning while the send API receives it, then turns Active. A send with a key that’s still provisioning fails the same way as a wrong key, so check the Status column before you debug anything else.

Use it

Node.js, Python and PHP versions of the same call are in the email send API reference.

Regenerate a key

Open the key’s menu on the Sending Keys tab and select Regenerate Secret Key. The new secret is shown once, the old one stops working immediately, and the key goes back to provisioning until the send API has it.
For a rotation with no failed sends, create a second key, deploy it everywhere, then delete the first.

Delete a key

Open the key’s menu and select Delete. Anything still using it fails on its next request with 401 Unauthorized. Delete a key as soon as you suspect it has leaked, then create a new one.

How it differs from a platform API key

Sending a sending key to the platform API fails with 401 and Unauthorized access, because the platform API doesn’t know the key. See Using the wrong credential on the wrong host.

Email send API

Every field, attachments, headers and errors.

Authentication

Which credential works on which surface, and how to send it.

Sending keys in the dashboard

The walkthrough, with screenshots.

API keys

Platform API keys, scopes and organization-wide sending.