Quickstart
Send your first email through the BlacklistGuard HTTP API in a few minutes: create an API key, then make a single request to the send endpoint.
Before you start
You'll need:
- A BlacklistGuard account. Sign in to the console (or create an account first).
- A verified sending domain. The
Fromaddress must belong to a domain you've authenticated. If you haven't done this yet, follow Set up a sending domain. It takes a few DNS records. If you can't change DNS yet, you can verify a single sender address instead.
Create an API key
In the console, open API keys (under Infrastructure) and click New key. You need to be a workspace admin to create a key. Give it a name, grant it the emails:send permission, and copy the key. It is shown only once. Store it somewhere safe like a secrets manager.
Every API request authenticates with this key in the X-API-Key header.
Send your first email
Make a POST request to the send endpoint. Replace the key and addresses with your own:
curl -X POST https://app.blacklistguard.com/api/v1/emails/send \
-H "X-API-Key: efk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"from_email": "you@yourdomain.com",
"from_name": "Your Brand",
"to": "customer@example.com",
"subject": "Hello from BlacklistGuard",
"body": "<p>Your first email is on its way.</p>"
}'
from_email must be on a sending domain you've verified (or a verified sender address). Otherwise the request is rejected with a 400 that tells you to verify the domain or the address. from_email is required: a request without it is rejected with from_email is required.Request fields
| Field | Required | Description |
|---|---|---|
from_email | Yes | Sender address. Must be on a verified sending domain, or be a verified sender. |
to | Yes | Recipient email address. One plain address per request. |
subject | Yes | Subject line. |
body | No | Message body, as HTML or plain text. A message without one is sent empty. |
from_name | No | Display name shown next to the sender address. |
bounce_email | No | Where bounce notifications are routed. |
A request without from_email, to or subject is rejected with a 400 that names the missing field, and nothing is queued. to takes one plain email address, with no display name and no list of addresses.
The full field list, including attachments, is in the Send an email reference.
Read the response
A successful request returns the standard JSON envelope. The message is accepted and queued for delivery:
{
"success": true,
"data": { "id": "1a3a56c6-4393-465e-86aa-d2c0d1200958", "status": "queued" },
"message": "Resource created successfully"
}
The data.id is the message ID. A 201 means the message is queued, not yet delivered. Track its delivery in the console under Messages. If something is wrong, the envelope returns "success": false with an error message. For example, an unverified from_email returns a 400 explaining how to verify the domain or sender.
Next steps
- Authentication & API keys: key scopes, rotation, and the
X-API-Keyheader in depth. - Set up a sending domain: add your domain so you can send as your brand.
- Verify SPF, DKIM & DMARC: the DNS records that get you to the inbox.