Skip to content

Authentication

All Dispatch developer API requests are authenticated with an API key.

Sending a request

Include your key in the Authorization header:

bash
curl -H "Authorization: Bearer your_api_key_here" \
  https://dispatch.techtranslab.com/api/v1/emails

Obtaining an API key

Log into the Dispatch dashboard → API KeysCreate. On creation you configure:

FieldDescription
NameHuman-readable label for the key
ScopesActions the key is allowed to perform. See Scopes. Defaults to full access (*).
Domain accessall domains (default) lets the key operate on every verified domain on your account. Choosing specific domains restricts the key to the domains you select.
ExpiryOptional. Defaults to 10 years.

The secret key value is shown only once at creation time. Store it somewhere secure. You can edit a key's scopes, domain allowlist, and active flag later from the dashboard, but the secret itself is not rotatable — delete and create a new key to rotate.

Scopes

Each API key carries a list of action scopes. A request that needs a scope the key does not have returns 403 INSUFFICIENT_SCOPE.

ScopeAllows
*Full access (default when no scopes are chosen)
email:sendPOST /emails, POST /emails/batch, POST /campaigns, cancelling a scheduled email
email:readGET /messages, GET /messages/:id, GET /messages/:id/events, GET /messages/stats
domain:readGET /domains

Domain allowlist

Keys configured with specific domains (all_domains = false) are limited to the domains you selected. Calls outside that allowlist are rejected:

EndpointBehavior for a scoped key
POST /emails, /emails/batch, /campaignsThe request's from address must resolve to an allowlisted domain, otherwise 403 DOMAIN_NOT_ALLOWED. A from is always required for scoped keys.
POST /messages/:id/cancel403 DOMAIN_NOT_ALLOWED if the target message's domain is not allowlisted (including legacy messages with no recorded domain).
GET /messages, /messages/statsReturns only rows whose domain_id is allowlisted.
GET /domainsReturns only allowlisted domains.

Keys with all_domains = true are not affected by the allowlist.

TechTrans Lab