NevarMail

Verify a “from” address

Set up the addresses you send from, get them verified, and understand why an unverified sender cannot send.

Sender identities represent the "from" addresses used when sending email. Each sender must be verified before it can be used to send messages.

POST /api/senders below requires a signed-in browser session -- API keys get a 403 SESSION_ONLY error. To create a sender with an API key, use POST /api/v1/senders instead (same fields, standard {data, requestId} v1 envelope).

Create a sender

POST /api/senders
{
  "name": "Marketing",
  "fromEmail": "marketing@yourdomain.com",
  "fromName": "Marketing Team",
  "replyToEmail": "reply@yourdomain.com",
  "provider": "sendgrid",
  "priority": 0,
  "isDefault": true
}

Sender fields

FieldTypeRequiredDescription
namestringYesSender identity name
fromEmailstringYesFrom email address
fromNamestringNoDisplay name shown to recipients
replyToEmailstringNoReply-to email address
providerstringNoAssociated provider name
prioritynumberNoPriority for automatic selection (lower = higher priority)
isDefaultbooleanNoWhether this is the default sender

Verification

A sender is verified by your provider, never by NevarMail. Creating one here records it as pending; it becomes verified when the provider says so. On SendGrid that means completing Single Sender Verification for the address (SendGrid emails a confirmation link) or authenticating the address's domain, then importing the result: POST /api/v1/senders/import pulls every verified sender from your account and links it to the pending row. The verificationStatus field tracks progress:

StatusDescription
pendingVerification initiated, waiting for confirmation
verifiedSender is verified and ready to use

Only verified senders can be used to send email.

List senders

GET /api/senders

Returns all sender identities with their verification status.

Update a sender

PUT /api/senders/:id
{
  "fromName": "Updated Marketing Team",
  "priority": 1
}

All fields are optional. Only provided fields are updated.

Delete a sender

DELETE /api/senders/:id

Returns { "deleted": true } on success.

Automatic sender selection

NevarMail can automatically select the best sender for each email based on configurable strategies.

This is a browser-session-only endpoint with no API equivalent -- it cannot be called with an API key, and there is no v1 equivalent of the select route.

POST /api/senders/select
{
  "recipientDomain": "example.com",
  "strategy": "priority"
}

Selection strategies

StrategyDescription
prioritySelect the sender with the lowest priority number
round-robinRotate between available senders
(default)Prefer the sender marked as isDefault

Response

{
  "sender": {
    "id": "...",
    "name": "Marketing",
    "fromEmail": "marketing@yourdomain.com"
  },
  "strategy": "priority",
  "reason": "Selected highest priority sender for example.com"
}

If no suitable sender is found, sender will be null.

On this page