Introduction

Menu

toSend is an email sending API that makes it easy to send transactional emails at scale, with reliable delivery and comprehensive tracking.

Base URL

https://api.tosend.com

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header:

Authorization: Bearer your_api_key_here

You can generate API keys from your toSend dashboard. An API key can be restricted to a single sending domain for added security.

An Admin API key (tsend_admin_...) that holds the emails:send scope can also send, but only in the Authorization header; the api_key body field is refused for admin keys.

Response Format

All responses are returned in JSON format.

Success Response

{
  "message_id": "abc123def456..."
}

Error Response

{
  "status_code": 422,
  "message": "Validation failed",
  "errors": {
    "subject": "\"subject\" is required and must be a non-empty string",
    "body": "At least one of \"html\" or \"text\" must be provided"
  }
}

Error Response Fields

FieldTypeDescription
status_codeintegerHTTP status code
messagestringHuman-readable error message
errorsobjectField-specific errors, keyed by field name (for example to[0] or headers.X-Foo), each value a message string (optional)

Branch on the HTTP status code (or status_code); see HTTP Status Codes below. Only the per-item results of a batch send carry an error_type field.

Rate Limits

Requests are rate limited per team: up to 100 requests per second on POST /v2/emails and 10 requests per second on POST /v2/emails/batch, measured over a 10-second window. Over the limit, the API returns 429 with a Retry-After header (in seconds). The limit_per_second value in GET /v2/info is informational and is not enforced.

Per-Request Limits

LimitValue
Recipients per email (to, cc, bcc)50 each, and 50 in total across all three
Subject length998 characters
Total attachment size per email10 MB
Emails per batch request100

HTTP Status Codes

CodeDescription
200Success: all emails accepted
207Multi-Status: batch where at least one entry failed validation or was all-disposable
400Malformed JSON body
401API key missing, invalid, or disabled
403Account not active, insufficient credits, all recipients disposable, or an admin key without the emails:send scope
422Validation error, or the sender domain is not found, not verified, or not allowed for this API key
429Rate limit exceeded
500Server error

Response Headers

Successful send and batch responses include diagnostic headers you can log for support tickets:

HeaderDescription
X-Tenant-IdNumeric ID of the account that sent the request
X-Recipient-CountTotal recipients accepted for dispatch (after disposable filtering)
X-Step-Auth, X-Step-ValidateServer-side timings in milliseconds (single send only)