Authentication

Create a key on your account page and send it with every request:

curl https://dodgeinbox.email/api/v1/account \
  -H "Authorization: Bearer dk_your_key"

HTTP Basic with username api and the key as password also works. Limit: 300 requests per minute. Every response has "success": true|false; errors include "error".

Endpoints

GET/api/v1/accountPlan, limits, emails sent today
GET/api/v1/domainsList domains with DNS status and required records
POST/api/v1/domains{"domain":"example.com","forward":"me@gmail.com"}
GET/api/v1/domains/{domain}One domain with its aliases
POST/api/v1/domains/{domain}/checkRe-check DNS and activate when ready
DELETE/api/v1/domains/{domain}Delete domain
GET/api/v1/domains/{domain}/aliasesList aliases
POST/api/v1/domains/{domain}/aliases{"alias":"sales","forward":"a@x.com,b@y.com","regex":false}
PATCH/api/v1/domains/{domain}/aliases/{id}{"forward":"…"} and/or {"enabled":false}
DELETE/api/v1/domains/{domain}/aliases/{id}Delete alias
GET/POST/api/v1/domains/{domain}/credentialsList / create SMTP credentials {"username":"hello"}
DELETE/api/v1/domains/{domain}/credentials/{id}Delete SMTP credentials
GET/api/v1/logs?domain=&q=&limit=&before=Delivery logs, newest first
POST/api/v1/sendSend an email (paid plans)

Send API

curl https://dodgeinbox.email/api/v1/send \
  -H "Authorization: Bearer dk_your_key" -H "Content-Type: application/json" \
  -d '{
    "sender": "Acme <hello@acme.com>",
    "to": ["customer@gmail.com"],
    "subject": "Your order shipped",
    "text": "Hi! Your order is on its way.",
    "html": "<p>Hi! Your order is on its way.</p>",
    "reply_to": "support@acme.com"
  }'

Optional: cc, bcc, headers. The sender must be on one of your active domains. Messages are DKIM-signed with your domain's key.

Webhook payload

An alias with destination webhook:https://your.app/inbound POSTs each email as JSON:

{
  "envelope": {"sender": "alice@gmail.com", "recipient": "inbound@acme.com"},
  "from": {"name": "Alice", "email": "alice@gmail.com"},
  "to": [{"name": "", "email": "inbound@acme.com"}],
  "cc": [], "subject": "Hello", "message-id": "<…>", "date": "…",
  "headers": {"Subject": "Hello", "…": "…"},
  "text": "plain text body", "html": "<p>html body</p>",
  "attachments": [{"name": "a.pdf", "type": "application/pdf", "content": "base64…", "encoding": "base64"}],
  "inlines": [], "raw": "base64 of the full message"
}

Reply 2xx to accept. 5xx, 408, 429 or a timeout (20s) are retried for up to 5 days; other 4xx bounce the email.