Skip to content

Email Sending

REST API

Send emails via the REST API using an API key:

bash
curl -X POST https://api-dispatch.techtranslab.com/api/v1/emails \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "[email protected]",
    "to": ["[email protected]"],
    "subject": "Welcome!",
    "html": "<h1>Hello World</h1>"
  }'

Batch Sending

Send to multiple recipients in one request:

bash
curl -X POST https://api-dispatch.techtranslab.com/api/v1/emails/batch \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "[email protected]",
    "emails": [
      { "to": "[email protected]", "subject": "Hi Alice", "html": "..." },
      { "to": "[email protected]", "subject": "Hi Bob", "html": "..." }
    ]
  }'

Using Templates

Reference a saved template by ID:

bash
curl -X POST https://api-dispatch.techtranslab.com/api/v1/emails \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "[email protected]",
    "to": ["[email protected]"],
    "template_id": "tmpl_abc123",
    "variables": {
      "name": "Alice",
      "action_url": "https://example.com/confirm"
    }
  }'

Message Status

Each message goes through these status transitions:

queued → sending → sent → delivered
                      ↘ bounced
              → failed

Track status via the Messages API or configure Webhooks for real-time notifications.

Rate Limits

EndpointLimit
POST /api/v1/emailsPer API key quota
POST /api/v1/emails/batchPer API key quota
SMS endpoints3 requests/hour

Domain warmup enforces additional daily sending limits to protect sender reputation.

TechTrans Lab