NEXORELAY — DEVELOPER PLATFORM

API reference

One API · transactional + marketing email · onboard in 60 seconds

Authentication

Send your key on every request. Create keys in the console — the plaintext is shown exactly once.

curl https://api.nexorelay.com/v1/emails \ -H "Authorization: Bearer nxr_live_xxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ ... }'
Get an API key in the console →

Send an email

POST /v1/emails — from-domain and params are validated synchronously; a queued send returns 202 with an email id, and later status flows back via events and webhooks.

POST https://api.nexorelay.com/v1/emails { "from": "Acme <[email protected]>", "to": ["[email protected]"], "subject": "Hello", "html": "<strong>Hi</strong>", "tags": { "order_id": "123" } }

Response 202

{ "id": "email_abc123" }

Send with a template

Pass template_id and variables (mutually exclusive with subject/html/text). Variables use Handlebars syntax.

{ "from": "Acme <[email protected]>", "to": ["[email protected]"], "template_id": "tpl_123", "variables": { "name": "Tom" } }

Batch send

POST /v1/emails/batch — up to 100 emails per request, each with its own content.

POST https://api.nexorelay.com/v1/emails/batch { "emails": [ { "from": "...", "to": ["..."], "subject": "..." } ] } → 202 { "ids": ["email_1", "email_2", ...] }

Retrieve an email

GET https://api.nexorelay.com/v1/emails/email_abc123 → 200 { "id": "email_abc123", "status": "DELIVERED", ... }

Webhook events

Register an endpoint in the console — events arrive HMAC-signed: email.sent / delivered / bounced / complained / opened / clicked.

POST https://api.acme.com/hooks/nexorelay X-Nexorelay-Signature: sha256=... { "type": "email.delivered", "data": { "id": "email_abc123" } }

Error format

One error envelope — type marks the category, code is the machine-readable cause.

{ "error": { "type": "invalid_request_error", "code": "domain_not_verified", "message": "The sending domain \"mail.example.com\" is not verified." } }
typeHTTP
invalid_request_error400 / 404 / 409 / 422
authentication_error401
permission_error403
rate_limit_error429
api_error500
service_unavailable_error503

Idempotency & limits

Send an Idempotency-Key header — same key + body within 24h returns the first response, same key + different body returns 409. Default limit: 10 req/s per key.

Idempotency-Key: order-8742
API reference · NexoRelay · NexoRelay