Skip to content

Outbound Email

GET /domains/{name}/outbound

Returns outbound sending configuration and metrics for a domain.

FieldTypeDescription
namestringDomain name
outbound_tierstringshared or dedicated
outbound_statusstringactive or suspended
outbound_daily_limitintegerMax emails/day (0 = unlimited)
outbound_monthly_limitintegerMax emails/month (0 = unlimited)
outbound_sent_todayintegerEmails sent today
outbound_sent_monthintegerEmails sent this month
outbound_enforcementstringsoft (allow + bill) or hard (reject)
bounce_countintegerBounces this period
complaint_countintegerComplaints this period
bounce_ratefloatBounce rate (%)
complaint_ratefloatComplaint rate (%)
ses_verifiedbooleanWhether domain is verified with SES
Terminal window
curl https://mail.emboux.com/domains/example.com/outbound \
-H "Authorization: Bearer {API_KEY}"

PUT /domains/{name}/outbound

Update outbound limits, tier, enforcement, or status for a domain.

All fields are optional — only include the fields you want to change.

FieldTypeDescription
outbound_daily_limitintegerMax emails/day
outbound_monthly_limitintegerMax emails/month
outbound_tierstringshared or dedicated
outbound_enforcementstringsoft or hard
outbound_statusstringactive or suspended
Terminal window
curl -X PUT https://mail.emboux.com/domains/example.com/outbound \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-d '{"outbound_daily_limit": 500, "outbound_monthly_limit": 10000}'

POST /domains/{name}/outbound/increment

Check quotas and increment the outbound counter by 1. Called by the Policy Daemon for each outgoing email.

Returns allowed: true if the email can be sent. If a soft cap is exceeded, still returns allowed: true with a reason field indicating the exceeded limit.

FieldTypeDescription
namestringDomain name
outbound_sent_todayintegerUpdated daily counter
outbound_sent_monthintegerUpdated monthly counter
allowedbooleanWhether the email is allowed
reasonstring?Reason if blocked or soft-exceeded

Possible reasons:

  • outbound_suspended — domain outbound is suspended (hard cap)
  • outbound_suspended_soft — suspended but allowed (soft cap)
  • daily_limit_exceeded — daily limit hit (hard cap)
  • daily_limit_exceeded_soft — daily limit hit but allowed (soft cap)
  • monthly_limit_exceeded — monthly limit hit (hard cap)
  • monthly_limit_exceeded_soft — monthly limit hit but allowed (soft cap)

POST /domains/{name}/ses-verify

Calls AWS SES VerifyDomainIdentity and VerifyDomainDkim for the domain. Returns the DNS records the customer must configure.

Outbound email is blocked until the domain is verified.

FieldTypeDescription
namestringDomain name
ses_verification_tokenstringTXT record value for _amazonses.{domain}
ses_dkim_tokensstring[]3 DKIM tokens for CNAME records
ses_verifiedbooleanAlways false after initiation
dns_recordsobject[]Pre-formatted DNS records to configure

Each dns_records entry:

FieldTypeDescription
typestringTXT or CNAME
namestringDNS record name
valuestringDNS record value
Terminal window
curl -X POST https://mail.emboux.com/domains/example.com/ses-verify \
-H "Authorization: Bearer {API_KEY}"
{
"name": "example.com",
"ses_verification_token": "abc123...",
"ses_dkim_tokens": ["token1", "token2", "token3"],
"ses_verified": false,
"dns_records": [
{"type": "TXT", "name": "_amazonses.example.com", "value": "abc123..."},
{"type": "CNAME", "name": "token1._domainkey.example.com", "value": "token1.dkim.amazonses.com"},
{"type": "CNAME", "name": "token2._domainkey.example.com", "value": "token2.dkim.amazonses.com"},
{"type": "CNAME", "name": "token3._domainkey.example.com", "value": "token3.dkim.amazonses.com"}
]
}
GET /domains/{name}/ses-status

Checks the current SES verification status. If both domain identity and DKIM are verified, automatically updates ses_verified = true in the database.

FieldTypeDescription
namestringDomain name
ses_verifiedbooleanOverall verification status
verification_statusstringSES identity status: Pending, Success, Failed, TemporaryFailure, NotStarted
dkim_statusstringSES DKIM status: Pending, Success, Failed, TemporaryFailure, NotStarted

POST /webhooks/ses

Receives SNS notifications from Amazon SES for bounces and complaints. No authentication required (SNS cannot send Bearer tokens).

Handles:

  • SubscriptionConfirmation — auto-confirms the SNS subscription
  • Bounce — increments bounce_count, recalculates bounce_rate
  • Complaint — increments complaint_count, recalculates complaint_rate

Guillotine: If bounce_rate > 3%, the domain’s outbound is automatically suspended.


POST /outbound/reset-daily

Resets outbound_sent_today to 0 for all domains. Called by the midnight UTC cron job. Requires master token.

FieldTypeDescription
reset_countintegerNumber of domains reset
POST /outbound/reset-monthly

Freezes current monthly counters (for billing), then resets all monthly counters to 0. Requires master token.

FieldTypeDescription
frozenobject[]Per-domain frozen values before reset
reset_countintegerNumber of domains reset

Each frozen entry contains: name, partner_ref, outbound_sent_month, outbound_monthly_limit, bounce_count, complaint_count, bounce_rate, complaint_rate.