Skip to content

Introduction

ToSend is an email sending API that makes it easy to send transactional emails at scale. Built on AWS SES infrastructure, ToSend provides reliable email delivery with 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. API keys can be restricted to specific domains for added security.

Response Format

All responses are returned in JSON format.

Success Response

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

Error Response

{
"status_code": 422,
"error_type": "validation_error",
"message": "Subject and either html or text content are required.",
"errors": {
"subject": {
"required": "Subject is required."
}
}
}

Error Response Fields

FieldTypeDescription
status_codeintegerHTTP status code
error_typestringMachine-readable error category
messagestringHuman-readable error message
errorsobjectField-specific validation errors (optional)

Error Types

Error TypeDescription
bad_requestMalformed request (400)
unauthorizedMissing API key (401)
forbiddenInvalid API key or insufficient permissions (403)
not_foundEndpoint or resource not found (404)
validation_errorRequest validation failed (422)
rate_limit_exceededToo many requests (429)
internal_errorServer error (500)

Rate Limits

Per-second send rate is enforced by SES and varies per account. The GET /v2/info endpoint returns the current limit_per_second value.

Per-Request Limits

LimitValue
Recipients per email (to, cc, bcc)50 each
Subject length998 characters
Total attachment size per email10 MB
Emails per batch request100

HTTP Status Codes

CodeDescription
200Success — all emails accepted
207Multi-Status — partial success on batch (some entries failed validation or were all-disposable)
401API key missing
403Invalid API key, insufficient credits, all recipients disposable, or domain not allowed
422Validation error
500Server error

Response Headers

Successful send/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