API reference
REST endpoints, JSON request/response bodies, bearer-token auth. The Node.js SDK at send16-mail wraps every endpoint with idiomatic TypeScript types.
Base URL
https://api.send16.comThe SDK targets this host by default. Override with new Send16(apiKey, { baseUrl: 'https://your-instance' }) if you need to point it somewhere else.
Authentication
Every request requires an Authorization: Bearer header with one of two key kinds:
Secret key. Server-side use only. Full scope set unless restricted when minted in the dashboard.
Publishable key. Safe for browser/mobile, limited to events, contact upsert, and form submission. CORS-restricted per origin.
curl https://api.send16.com/api/contacts \
-H "Authorization: Bearer sk_live_..." \
-H "X-Send16-Source: my-app"The optional X-Send16-Source header (any string) groups usage per-app in the dashboard's "Used by" panel.
Scripts must send a User-Agent header. Python's default urllib user agent gets blocked at the edge with a 403. Any name for your app will do.
Endpoints
Agent Inbox
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/inboxes | Give an agent its own email address. |
| GET | /api/inboxes/:id/threads | List or search an inbox's threads. |
| POST | /api/inboxes/:id/threads/:thread_id/reply | Reply in a thread, subject to the inbox's send policy. |
| POST | /api/inboxes/:id/send | Start new mail, subject to the inbox's send policy. |
Emails
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/transactional/api/send | Send a single transactional email. |
| POST | /api/transactional/api/send-batch | Send up to 100 emails in a single request. |
| GET | /api/transactional/api/emails/:id | Retrieve the status of a previously sent email. |
| DELETE | /api/transactional/api/scheduled/:id | Cancel a scheduled send while still status='scheduled'. |
Templates
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/transactional/dashboard/templates | List transactional templates in the workspace. |
| POST | /api/transactional/dashboard/templates | Create a new template. |
| PATCH | /api/transactional/dashboard/templates/:id | Update an existing template. |
| DELETE | /api/transactional/dashboard/templates/:id | Delete a template. |
Contacts
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/contacts | List contacts with pagination. Filter with ?source=form. |
| POST | /api/contacts | Create a contact. A risky address is still created, with a warnings array in the response. Pass source_label to note where it came from. |
| POST | /api/contacts/upsert | Upsert a contact by email (publishable-key safe). With a publishable key, a disposable, mistyped or undeliverable address is refused. |
| POST | /api/contacts/import | Import contacts in bulk. New disposable and mistyped addresses are left out and counted in skippedRisky unless allowRiskyAddresses is true, with a warning in the response. skippedExisting counts contacts that were already there. |
| GET | /api/contacts/:id | Retrieve a single contact. |
| PATCH | /api/contacts/:id | Update a contact. |
| DELETE | /api/contacts/:id | Delete a contact. |
Events
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/transactional/api/events | Fire an event to trigger any matching Action. |
Suppressions
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/suppressions | List suppressed addresses. Each has a scope (all, marketing or transactional) and an expiresAt (null means permanent). Filter by reason or scope. |
| POST | /api/suppressions | Suppress an address. Optional scope and expires_at (ISO-8601). A marketing suppression also stops API sends not marked essential. Bounces and complaints always apply to all mail and can't expire. An unsubscribe must be marketing or all. |
| DELETE | /api/suppressions/:email | Remove a suppression. |
Domains
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/domains | List sending domains. |
| POST | /api/domains | Add a sending domain. Returns DNS records to publish. |
| POST | /api/domains/:id/verify | Run DKIM/SPF/DMARC verification. |
Rate limits
- Sending: per-workspace, varies by plan tier. The response includes
X-RateLimit-RemainingandX-RateLimit-Resetheaders. - Batch: max 100 messages per
/send-batchcall. - Attachments: 10 files per email, total decoded size ≤ 10 MB live (≤ 1 MB for scheduled sends).
- HTML body: ≤ 256 KB per email (returns
413 PAYLOAD_TOO_LARGE).
Error format
Errors come back with HTTP 4xx/5xx and a JSON envelope:
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Either template, html, or text content is required"
}
}Common codes: VALIDATION_ERROR, SEND_FAILED, DUPLICATE_SLUG, PAYLOAD_TOO_LARGE, NOT_FOUND, UNAUTHORIZED, FORBIDDEN.