Sending

Connect Mailjet

Mailjet uses a key pair (API key + API secret) for authentication. Both values are required.

Overview

Mailjet authenticates using HTTP Basic Auth with an API key as the username and an API secret as the password. Both are required — unlike providers that only have one token. Mailjet is based in France and stores data in Europe (GDPR-compliant).

Get your credentials

  1. Log in to app.mailjet.com
  2. Go to your profile menu (top right) → Account Settings
  3. Click REST API → Master API key & Sub API key management
  4. Copy the API Key and the API Secret (click the eye icon to reveal the secret)
  5. Verify your from address or domain: Account Settings → Sender addresses & domains

TWO CREDENTIALS REQUIRED

Mailjet requires both api_key and api_secret. Missing either one causes authentication to fail. The secret is separate from the key — it is not the same value.

Add the provider in Nudgel

  1. Go to Settings → Providers
  2. Click Add a provider
  3. Pick Mailjet
  4. Fill in the fields:
FieldRequiredNotes
from_emailYesA verified sender address or address within a verified domain
from_nameYesDisplay name shown to recipients
api_keyYesMailjet API key (used as Basic Auth username). Encrypted at rest.
api_secretYesMailjet API secret (used as Basic Auth password). Encrypted at rest.

Test the connection

curl
curl -X POST https://api-raven-cloud.autotribes.app/v1/messages \
  -H "X-Raven-Key: rk_live_a3f7b2c1_..." \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "email",
    "to": "you@example.com",
    "from": "noreply@mail.acme.co.ke",
    "subject": "Nudgel test — Mailjet",
    "bodyHtml": "<p>If you can read this, Mailjet is wired up.</p>",
    "bodyText": "If you can read this, Mailjet is wired up."
  }'

Confirm in Mailjet → Transactional → History — the send should appear within seconds.

Set up webhooks

Mailjet calls these Event API callbacks. Configure them under Account Settings → Event notifications & callbacks (webhooks).

Set the URL for each event type to:

text
https://api-raven-cloud.autotribes.app/v1/webhooks/email/mailjet/{YOUR_TENANT_ID}

Enable: sent, bounce, spam, unsub. Hard bounces and spam reports auto-add to your suppression list. See the webhooks guide.

Verify your sending domain at Mailjet

To send from your own domain (e.g. mail.example.co.ke) through Mailjet, publish DKIM records Mailjet generates for you. Nudgel orchestrates this from one dashboard.

  1. In Nudgel dashboard, go to Settings → Sending domains → Add domain, enter your domain.
  2. On the next screen, select Mailjet. Nudgel calls Mailjet's domain registration API using your credentials and shows you the DNS records to publish.
  3. Publish the records at your DNS host (Cloudflare, Route 53, etc.).
  4. Nudgel polls every 30 seconds for the first 10 minutes, then hourly. Verification surfaces in the dashboard automatically.

Add this to your SPF record

Append include:spf.mailjet.com to your existing SPF record (or create a new v=spf1 include:spf.mailjet.com -allif you don't have one).

Mailjet-specific notes

  • Mailjet verification requires both a DKIM TXT record and an SPF TXT record to be present at your domain. Having only one is not sufficient.

Full setup walkthrough: Sending domains setup

Troubleshooting

SymptomMost likely cause
failed — 401 UnauthorizedAPI key or secret is wrong. Re-copy both from Mailjet account settings.
failed — "Sender address is not active"The from address is not verified in Mailjet. Go to Account Settings → Sender addresses & domains.
failed — "Daily sending limit reached"You are on the free plan (200 emails/day). Upgrade in Mailjet.
Emails land in spamSet up SPF and DKIM in Mailjet for your domain. See sending domains.