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

text
https://api.send16.com

The 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:

sk_live_…

Secret key. Server-side use only. Full scope set unless restricted when minted in the dashboard.

pk_live_…

Publishable key. Safe for browser/mobile, limited to events, contact upsert, and form submission. CORS-restricted per origin.

bash
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

MethodEndpointDescription
POST/api/inboxesGive an agent its own email address.
GET/api/inboxes/:id/threadsList or search an inbox's threads.
POST/api/inboxes/:id/threads/:thread_id/replyReply in a thread, subject to the inbox's send policy.
POST/api/inboxes/:id/sendStart new mail, subject to the inbox's send policy.

Emails

MethodEndpointDescription
POST/api/transactional/api/sendSend a single transactional email.
POST/api/transactional/api/send-batchSend up to 100 emails in a single request.
GET/api/transactional/api/emails/:idRetrieve the status of a previously sent email.
DELETE/api/transactional/api/scheduled/:idCancel a scheduled send while still status='scheduled'.

Templates

MethodEndpointDescription
GET/api/transactional/dashboard/templatesList transactional templates in the workspace.
POST/api/transactional/dashboard/templatesCreate a new template.
PATCH/api/transactional/dashboard/templates/:idUpdate an existing template.
DELETE/api/transactional/dashboard/templates/:idDelete a template.

Contacts

MethodEndpointDescription
GET/api/contactsList contacts with pagination. Filter with ?source=form.
POST/api/contactsCreate 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/upsertUpsert a contact by email (publishable-key safe). With a publishable key, a disposable, mistyped or undeliverable address is refused.
POST/api/contacts/importImport 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/:idRetrieve a single contact.
PATCH/api/contacts/:idUpdate a contact.
DELETE/api/contacts/:idDelete a contact.

Events

MethodEndpointDescription
POST/api/transactional/api/eventsFire an event to trigger any matching Action.

Suppressions

MethodEndpointDescription
GET/api/suppressionsList suppressed addresses. Each has a scope (all, marketing or transactional) and an expiresAt (null means permanent). Filter by reason or scope.
POST/api/suppressionsSuppress 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/:emailRemove a suppression.

Domains

MethodEndpointDescription
GET/api/domainsList sending domains.
POST/api/domainsAdd a sending domain. Returns DNS records to publish.
POST/api/domains/:id/verifyRun DKIM/SPF/DMARC verification.

Rate limits

  • Sending: per-workspace, varies by plan tier. The response includes X-RateLimit-Remaining and X-RateLimit-Reset headers.
  • Batch: max 100 messages per /send-batch call.
  • 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:

json
{
  "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.