Quickstart

1. Get a key

Ask your Inklura administrator for a key (see API keys). It looks like a Brevo key (xkeysib-…) and is shown only once.

export BREVO_API_KEY="xkeysib-…"
export BREVO_BASE="https://<your-site-domain>/api/brevo/v3"

2. Check the key

curl -s "$BREVO_BASE/account" -H "api-key: $BREVO_API_KEY" | jq

The response describes the account: site name, SMTP relay in use, sending plan. An unknown or revoked key returns 401 {"code":"unauthorized","message":"Key not found"}.

3. Register a sender

curl -s -X POST "$BREVO_BASE/senders" -H "api-key: $BREVO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"My Shop","email":"contact@my-shop.com"}'

201 response: {"id": 1, "spfError": true, "dkimError": true}. spfError and dkimError become false once the address's domain is authenticated. Registering an address that already exists just returns its id.

This step is optional: sending accepts any valid address in sender. When a request has no sender (and no template sets one), the site's default sending address is used.

4. Send an email

curl -s -X POST "$BREVO_BASE/smtp/email" -H "api-key: $BREVO_API_KEY" \
  -H "content-type: application/json" -d '{
    "sender": { "name": "My Shop", "email": "contact@my-shop.com" },
    "to": [{ "email": "customer@example.com", "name": "Jane Martin" }],
    "subject": "Order {{ params.orderId }} confirmed",
    "htmlContent": "<p>Hello {{ params.firstName }}, thanks for your order!</p>",
    "params": { "firstName": "Jane", "orderId": 1042 }
  }'

201 response:

{ "messageId": "<202609241426.12345678901@smtp-relay.mailin.fr>" }

{{ params.… }} variables are replaced in the subject and the content. Without a templateId, a subject and htmlContent or textContent are required (a template supplies its own subject and content); otherwise the response is 400 {"code":"missing_parameter",…}. to takes at most 99 recipients.

5. Track it

curl -s -G "$BREVO_BASE/smtp/statistics/events" -H "api-key: $BREVO_API_KEY" \
  --data-urlencode "messageId=<202609241426.12345678901@smtp-relay.mailin.fr>" | jq

The messageId contains <, > and @: it must be URL-encoded (--data-urlencode does it). The response lists the message's events, newest first, over the last 30 days by default:

{
  "events": [
    { "email": "customer@example.com", "date": "2026-09-24T14:26:03.000+00:00",
      "messageId": "<202609241426.12345678901@smtp-relay.mailin.fr>",
      "event": "requests", "subject": "Order 1042 confirmed", "from": "contact@my-shop.com" }
  ]
}

You will see requests, then delivered, opened, clicks… as they happen. To be told in real time, create a webhook.

With the official SDK

import { BrevoClient } from "@getbrevo/brevo";

const brevo = new BrevoClient({
  apiKey: process.env.BREVO_API_KEY!,
  baseUrl: "https://<your-site-domain>/api/brevo/v3",
});

await brevo.transactionalEmails.sendTransacEmail({
  sender: { email: "contact@my-shop.com" },
  to: [{ email: "customer@example.com" }],
  subject: "Welcome",
  htmlContent: "<p>Hello!</p>",
});