Mailjet webhooks

Mailjet Event API posts delivery events to Outreach, which updates the Delivery log. Applies when this instance runs EMAIL_CHANNEL_PROVIDER=mailjet: all email then goes through Mailjet.

1. Callback URL
Built in your browser only. Use the same login and password in the env below.
https://mailjet:<password>@<ingestion-host>/v1/webhooks/mailjet
2. Mailjet settings
Account settings → Event notifications (webhooks).

Paste the URL above for every event: sent, bounce, blocked, spam, open, click, unsub.

Keep «Group events» off: one event per call, so a deferred event never makes Mailjet resend its neighbours. Open and click events arrive only with open/click tracking enabled in the account.

3. How events map
Matched by Message_GUID, then by CustomID (our idempotency key; keys over 64 chars are sent as their SHA-256 and match by GUID only).
sent (accepted by recipient MX) → delivered
bounce, hard_bounce=true        → bounced
bounce, soft                    → failed
blocked                         → failed
spam (complaint)                → delivered, complaint kept in log
open                            → notification read (campaign «opened»)
click / unsub                   → logged, no status change

Stale or redelivered events never downgrade: bounced / failed
stay, delivered never goes back to sent, read is kept.
4. Responses
Mailjet retries anything but 200 every 30s for up to 24h.
200  accepted (unknown messages are logged as not_found)
401  wrong login or password
503  event arrived before the send was audited → Mailjet redelivers
503  webhook login/password not set on ingestion-api
5. Env
ingestion-api and temporal-worker-email. Start with sandbox on: Mailjet validates the send but delivers nothing.
EMAIL_CHANNEL_PROVIDER=mailjet
MAILJET_API_KEY=
MAILJET_SECRET_KEY=
MAILJET_FROM_EMAIL=
MAILJET_FROM_NAME=Limex
MAILJET_WEBHOOK_BASIC_USER=
MAILJET_WEBHOOK_BASIC_PASSWORD=
MAILJET_SANDBOX_MODE=true
MAILJET_TEMPLATE_ERROR_REPORTING=   # optional: internal mailbox for template render errors