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

TIP

You can also send the API key in the request body as api_key. Header authentication is recommended.

json
{
  "api_key": "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

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

Error Response

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

Rate limits depend on your plan type. Check your account dashboard for current limits.

HTTP Status Codes

CodeDescription
200Success
401API key missing
403Invalid API key, insufficient credits, or domain not allowed
422Validation error
500Server error

Released under the MIT License.