Documentation menu

Sending emails

Send emails from your domain through your system, delivered by Nevox.

Your system sends emails (order confirmations, receipts, notices) from your domain through Nevox. You write the content; Nevox handles delivery, bounces and people who asked not to receive them.

Email sending is enabled per account by the Nevox team. Before the first send:

  1. Ask the team to enable email sending on your account.
  2. The team registers your domain and gives you the DNS records to create (all of them point to Nevox).
  3. Once the domain is verified, generate a key with the emails:send scope (and emails:read to look emails up) in Panel → Developers. Keys created before that don't have these scopes.

Send

POST /v1/emails · scope emails:send

bash
curl -X POST https://api.nevox.ai/v1/emails \
  -H "Authorization: Bearer $NEVOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "orders@yourstore.com",
    "from_name": "Your Store",
    "to": ["mary@example.com"],
    "subject": "Your order is out for delivery",
    "text": "Hi Mary! Your order 1042 is out for delivery.",
    "html": "<p>Hi Mary! Your order <b>1042</b> is out for delivery.</p>",
    "reply_to": "support@yourstore.com"
  }'
FieldRequiredWhat it is
fromyesSender, from a verified domain of your account
from_namenoName the recipient sees
toyesOne email or a list of up to 50. Each recipient gets an email of their own
subjectyesSubject, up to 300 characters
textyes, without htmlPlain-text version
htmlnoHTML version
reply_tonoWhere replies go

Response: one item per recipient.

json
{
  "data": [
    { "object": "email", "id": "eml_4f1c9a", "to": "mary@example.com", "status": "sent", "error_code": null }
  ]
}

status is sent (handed to Nevox for delivery), suppressed (the address no longer receives from your account: bounce, complaint or unsubscribe) or failed, with the reason in error_code:

CodeWhat to do
domain_not_verifiedfrom isn't from a verified domain of your account
recipient_suppressedThe address no longer receives; remove it from your list
invalid_messageCheck the content and the addresses
rate_limitedSend again in a few minutes
service_unavailable / send_failedDelivery failed; try again later

With the test key, Nevox checks everything and sends nothing (status: "test").

Without email sending enabled on the account, the response is 403 with the code module_required.

Look up an email

GET /v1/emails/{id} · scope emails:read

bash
curl https://api.nevox.ai/v1/emails/eml_4f1c9a \
  -H "Authorization: Bearer $NEVOX_API_KEY"

Returns from, to, subject, status (including delivered, bounced and complained, once they arrive), error_code, opened_at, clicked_at, created_at and updated_at. The email content isn't stored.