๐Ÿ”Œ API Documentation

TuruMail REST API
Reference

Build cold email workflows, automate campaigns, check deliverability, and manage your TuruMail account programmatically with our clean, JSON-first REST API.

๐ŸŸข v2.4 โ€” Stable  ยท  Updated June 2026
Base URL: api.turumail.com/v2 JSON responses Bearer token auth Rate limited

Authentication

TuruMail uses API key authentication with Bearer tokens. Every request must include your API key in the Authorization header.

Generate your API key from Dashboard โ†’ Settings โ†’ API Keys. Keys are prefixed with tm_live_ for production and tm_test_ for testing.

Authentication Header
# Include in every request
Authorization: Bearer tm_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/json

Base URL

Base URL https://api.turumail.com/v2

All API endpoints are relative to this base URL. We use semantic versioning โ€” breaking changes increment the major version. The current stable version is v2.

Rate Limits

PlanRequests/minuteSends/hourBatch size
Starter601,000100
Pro30010,0001,000
Enterprise1,000100,00010,000

Rate limit headers are returned with every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.

Send a Single Email

POST /emails/send Send a single transactional or cold email
ParameterTypeRequiredDescription
tostringRequiredRecipient email address
fromstringRequiredSender address (must be authenticated domain)
subjectstringRequiredEmail subject. Supports Spintax: {Hi|Hello|Hey}
body_htmlstringOptionalHTML email body
body_textstringOptionalPlain-text email body (recommended for cold email)
variablesobjectOptionalKey-value pairs for template variables e.g. {"first_name":"Alex"}
smtp_idstringOptionalSpecific SMTP server ID to send from
track_opensbooleanOptionalEnable open tracking (default: true)
track_clicksbooleanOptionalEnable click tracking (default: true)
Example Request
curl -X POST https://api.turumail.com/v2/emails/send \
  -H "Authorization: Bearer tm_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "alex@prospect.com",
    "from": "sarah@yourcompany.com",
    "subject": "{Quick question|Hi there|Hey} about {{company}}",
    "body_text": "Hi {{first_name}},\n\nI noticed that {{company}} recently expanded into {{market}}...",
    "variables": {
      "first_name": "Alex",
      "company": "Acme Corp",
      "market": "enterprise SaaS"
    },
    "track_opens": true
  }'
Response
200 OK
{
  "success": true,
  "message_id": "msg_01HXXXXXXXXXXXXXX",
  "queued_at": "2026-06-17T10:32:01Z",
  "status": "queued"
}

Send a Batch

POST /emails/batch Send personalized emails to multiple recipients

Send up to 10,000 personalized emails in a single request. Each recipient can have unique variables, subject lines, and even different sending addresses. TuruMail processes batches asynchronously and respects your IP warmup limits.

Example Request โ€” Batch Send
{
  "campaign_id": "camp_01HXXX",
  "from": "outreach@yourcompany.com",
  "subject": "{Quick question|Thoughts on} {{company}}",
  "body_text": "Hi {{first_name}}, ...",
  "recipients": [
    {
      "to": "alex@acme.com",
      "variables": {"first_name": "Alex", "company": "Acme"}
    },
    {
      "to": "sarah@globex.com",
      "variables": {"first_name": "Sarah", "company": "Globex"}
    }
  ],
  "options": {
    "respect_warmup_limits": true,
    "send_window": "business_hours",
    "timezone": "America/New_York"
  }
}

Verify Email Address

POST /contacts/verify Verify an email address before sending
Request
{ "email": "prospect@company.com" }
Response
{
  "email": "prospect@company.com",
  "valid": true,
  "result": "deliverable",
  "is_disposable": false,
  "is_catch_all": false,
  "is_role": false,
  "mx_records": true,
  "smtp_check": true,
  "score": 0.97
}

Check Spam Score

POST /deliverability/spam-score Run SpamAssassin and content analysis on your email
Response
{
  "score": 1.4,
  "threshold": 5.0,
  "verdict": "clean",
  "checks": {
    "spf": "pass",
    "dkim": "pass",
    "dmarc": "pass",
    "content": "clean",
    "links": "clean"
  },
  "flags": [
    { "rule": "SUBJ_ALL_CAPS", "score": 0.8, "description": "Subject contains uppercase words" }
  ]
}

Error Handling

All errors return a JSON body with a code and message field.

400 Bad Request 401 Unauthorized 429 Rate Limited
Error Response Format
{
  "success": false,
  "error": {
    "code": "INVALID_FROM_ADDRESS",
    "message": "The from address domain is not authenticated. Please configure SPF and DKIM.",
    "docs_url": "https://turumail.com/dkim-setup"
  }
}

Official SDKs

Official client libraries for the most popular languages. All SDKs are open source and available on GitHub.

๐ŸŸก
JavaScript / Node.js
Stable v2.4
๐Ÿ
Python
Stable v2.4
๐Ÿ”ด
Ruby
Stable v2.1
๐ŸŸฆ
PHP
Stable v2.2
โ˜•
Java
Beta v2.0
๐Ÿฆ€
Rust
Beta v1.0

Webhook Events

TuruMail can send real-time webhook notifications to your endpoint for these events:

  • email.delivered โ€” Email successfully delivered to the recipient's mail server
  • email.opened โ€” Recipient opened the email (pixel tracking)
  • email.clicked โ€” Recipient clicked a tracked link
  • email.replied โ€” Recipient replied to your email
  • email.bounced โ€” Email bounced (includes hard/soft bounce type)
  • email.spam_complaint โ€” Recipient reported email as spam
  • email.unsubscribed โ€” Recipient clicked the unsubscribe link
  • blacklist.detected โ€” Your sending IP was detected on a blacklist
  • warmup.limit_reached โ€” Daily warmup volume limit reached for an IP

All webhooks are signed with an HMAC-SHA256 signature in the X-TuruMail-Signature header for verification.

Get Your API Key

Start with 1,000 free API calls. Upgrade as you grow. Full documentation and SDKs included.

Get API Key โ†’ Browse Integrations