Build cold email workflows, automate campaigns, check deliverability, and manage your TuruMail account programmatically with our clean, JSON-first REST API.
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.
# Include in every request Authorization: Bearer tm_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Content-Type: application/json
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.
| Plan | Requests/minute | Sends/hour | Batch size |
|---|---|---|---|
| Starter | 60 | 1,000 | 100 |
| Pro | 300 | 10,000 | 1,000 |
| Enterprise | 1,000 | 100,000 | 10,000 |
Rate limit headers are returned with every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.
Get API token using email and password
| Parameter | Type | Description |
|---|---|---|
| email Required | string | User's email |
| password Required | string | User's password |
curl -X POST -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/user/login \
-d email=user@example.com \
-d password=yourpassword
Generate one time login token
curl -X POST -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/login-token \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
New list
| Parameter | Type | Description |
|---|---|---|
| name Required | string | List's name |
| from_email Required | string | Default From email address |
| from_name Required | string | Default From name |
| divider Required | string | Contact information |
| contact[company] Required | string | Name |
| contact[state] Required | string | State / Province / Region |
| contact[address_1] Required | string | Address 1 |
| contact[address_2] Required | string | Address 2 |
| contact[city] Required | string | City |
| contact[zip] Required | string | Zip / Postal code |
| contact[phone] Required | string | Phone |
| contact[country_id] Required | string | Country id |
| contact[email] Required | string | |
| contact[url] Optional | string | Home page |
| subscribe_confirmation Required | string | Send subscription confirmation email (Double Opt-In) |
| send_welcome_email Required | string | Send a final welcome email |
| unsubscribe_notification Required | string | Send unsubscribe notification to subscribers |
| send_welcome_email Required | string | Send a final welcome email |
curl -X POST -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/lists \
-d api_token=tm_live_xxxxxxxxxxxxxxxx \
-d name=List+1 \
-d from_email=admin@abccorp.org \
-d from_name=ABC+Corp. \
-d contact[company]=ABC+Corp. \
-d contact[state]=Armagh \
-d contact[address_1]=14+Tottenham+Court+Road+London+England \
-d contact[address_2]=44-46+Morningside+Road+Edinburgh+Scotland+EH10+4BF \
-d contact[city]=Noname \
-d contact[zip]=80000 \
-d contact[phone]=123+456+889 \
-d contact[country_id]=1 \
-d contact[email]=info@abccorp.org \
-d contact[url]=http://www.abccorp.org \
-d subscribe_confirmation=1 \
-d send_welcome_email=1 \
-d unsubscribe_notification=1
Get information about all lists
curl -X GET -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/lists \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Get information about a specific list
curl -X GET -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/lists/{uid} \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Add custom field to list
| Parameter | Type | Description |
|---|---|---|
| type Required | string | Choose one of these types: text, number, datetime. |
| label Required | string | Field' label |
| tag Required | string | The tag name may have alpha-numeric characters, as well as dashes and underscores. |
| default_value Optional | string | Default value of the field |
curl -X POST -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/lists/{uid}/add-field \
-d api_token=tm_live_xxxxxxxxxxxxxxxx \
-d type=text \
-d label=Custom \
-d tag=CUSTOM_FIELD_1 \
-d default_value=test
Delete a list
| Parameter | Type | Description |
|---|---|---|
| uid Required | string | List's uid |
curl -X DELETE -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/lists/{uid} \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Get information about all campaigns
| Parameter | Type | Description |
|---|---|---|
| per_page Optional | string | Number of subscribers per page |
| page Required | string | Page number |
curl -X GET -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/campaigns \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Add new campaign
| Parameter | Type | Description |
|---|---|---|
| list_uid Required | string | List's uid |
| name Required | string | New campaign name |
| subject Required | string | Email subject |
| from_email Required | string | From email |
| from_name Required | string | From name |
| reply_to Required | string | Reply-to email |
| track_open Optional | string | Track open (true|false) |
| track_click Optional | string | Track click (true|false) |
| sign_dkim Optional | string | Sign dkim (true|false) |
| skip_failed_messages Optional | string | Track open (true|false) |
| html Optional | string | Campaign HTML content |
curl -X POST -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/campaigns \
-d api_token=tm_live_xxxxxxxxxxxxxxxx \
-d mail_list_uid={list_uid} \
-d name=MyCampaign \
-d subject=HelloWorld \
-d from_email=noreply@gmail.com \
-d from_name=NoReply \
-d reply_to=noreply@gmail.com \
-d track_open=true \
-d track_click=true \
-d sign_dkim=false \
-d skip_failed_messages=false \
-d html='<p>Hello!</p>'
Get information about a specific campaign
curl -X GET -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/campaigns/{uid} \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Update campaign
| Parameter | Type | Description |
|---|---|---|
| list_uid Required | string | List's uid |
| name Required | string | Campaign name |
| subject Required | string | Email subject |
| from_email Required | string | From email |
| from_name Required | string | From name |
| reply_to Required | string | Reply-to email |
| track_open Optional | string | Track open (true|false) |
| track_click Optional | string | Track click (true|false) |
| sign_dkim Optional | string | Sign dkim (true|false) |
| skip_failed_messages Optional | string | Track open (true|false) |
curl -X PATCH -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/campaigns/{uid} \
-d api_token=tm_live_xxxxxxxxxxxxxxxx \
-d name=MyCampaign2 \
-d subject=HelloWorld2 \
-d sign_dkim=true
Run a specific campaign
curl -X POST -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/campaigns/{uid}/run \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Pause a specific campaign
curl -X POST -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/campaigns/{uid}/pause \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Resume a specific campaign
curl -X POST -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/campaigns/{uid}/resume \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Delete a campaign
| Parameter | Type | Description |
|---|---|---|
| uid Required | string | Campaign's uid |
curl -X DELETE -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/campaigns/{uid} \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Download campaign tracking log
| Parameter | Type | Description |
|---|---|---|
| format Required | string | Log format (default: CSV) |
curl -X GET -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/campaigns/{uid}/tracking-log/download \
-d type=csv \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Download campaign open log
| Parameter | Type | Description |
|---|---|---|
| format Required | string | Log format (default: CSV) |
curl -X GET -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/campaigns/{uid}/open-log/download \
-d type=csv \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Download campaign click log
| Parameter | Type | Description |
|---|---|---|
| format Required | string | Log format (default: CSV) |
curl -X GET -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/campaigns/{uid}/click-log/download \
-d type=csv \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Download campaign bounce log
| Parameter | Type | Description |
|---|---|---|
| format Required | string | Log format (default: CSV) |
curl -X GET -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/campaigns/{uid}/bounce-log/download \
-d type=csv \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Download campaign feedback log
| Parameter | Type | Description |
|---|---|---|
| format Required | string | Log format (default: CSV) |
curl -X GET -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/campaigns/{uid}/feedback-log/download \
-d type=csv \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Download campaign unsubscribe log
| Parameter | Type | Description |
|---|---|---|
| format Required | string | Log format (default: CSV) |
curl -X GET -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/campaigns/{uid}/unsubscribe-log/download \
-d type=csv \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Display list's subscribers
| Parameter | Type | Description |
|---|---|---|
| list_uid Required | string | List's uid |
| open Optional | string | yes - opened some campaigns no - not opened any campaign |
| click Optional | string | yes - clicked some campaigns no - not clicked any campaign |
| per_page Optional | string | Number of subscribers per page |
| page Required | string | Page number |
curl -X GET -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/subscribers \
-d api_token=tm_live_xxxxxxxxxxxxxxxx \
-d list_uid={list_uid} \
-d per_page=20 \
-d page=1
Create subscriber for a mail list
| Parameter | Type | Description |
|---|---|---|
| list_uid Required | string | List's uid |
| EMAIL Required | string | Subscriber's email |
| tag Optional | string | Subscriber's tags, seperated by a comma (,). |
| status Optional | string | Subscriber's status: subscribed | unsubscribed | unconfirmed |
| [OTHER_FIELDS...] Optional | string | All subscriber's other fields: FIRST_NAME (?), LAST_NAME (?),... (depending on the list fields configuration) |
curl -X POST -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/subscribers \
-d api_token=tm_live_xxxxxxxxxxxxxxxx \
-d list_uid={list_uid} \
-d EMAIL=test@gmail.com \
-d tag=foo,bar,tag+with+space, \
-d FIRST_NAME=Marine \
-d LAST_NAME=Joze \
-d status=subscribed
Get information about a specific subscriber
| Parameter | Type | Description |
|---|---|---|
| id Required | string | Subsciber's id or email |
curl -X GET -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/subscribers/{id} \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Update subscriber for a mail list
| Parameter | Type | Description |
|---|---|---|
| uid Required | string | Subscriber's uid |
| EMAIL Required | string | Subscriber's email |
| tag Optional | string | Subscriber's tags, seperated by a comma (,). |
| [OTHER_FIELDS...] Optional | string | All subscriber's other fields: FIRST_NAME (?), LAST_NAME (?),... (depending on the list fields configuration) |
curl -X PATCH -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/subscribers/{id} \
-d api_token=tm_live_xxxxxxxxxxxxxxxx \
-d EMAIL=test@gmail.com \
-d tag=foo,bar,tag+with+space, \
-d FIRST_NAME=Marine \
-d LAST_NAME=Joze \
-d status=unsubscribed
Add tag(s) to subscriber
| Parameter | Type | Description |
|---|---|---|
| tag Optional | string | Subscriber's tags, seperated by a comma (,). |
curl -X POST -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/subscribers/-ID-/add-tag \
-d api_token=tm_live_xxxxxxxxxxxxxxxx \
-d tag=foo,bar,tag+with+space
Remove tag(s) to subscriber
| Parameter | Type | Description |
|---|---|---|
| tag Optional | string | Subscriber's tags, seperated by a comma (,). |
curl -X POST -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/subscribers/-ID-/remove-tag \
-d api_token=tm_live_xxxxxxxxxxxxxxxx \
-d tag=foo,bar,tag+with+space
Find subscribers with email
| Parameter | Type | Description |
|---|---|---|
| email Required | string | Subsciber's email |
curl -X GET -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/subscribers/email/{email} \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Subscribe a subscriber
| Parameter | Type | Description |
|---|---|---|
| list_uid Required | string | List's uid |
| id Required | string | Subsciber's id |
curl -X PATCH -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/lists/{list_uid}/subscribers/{id}/subscribe \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Unsubscribe a subscriber
| Parameter | Type | Description |
|---|---|---|
| list_uid Required | string | List's uid |
| id Required | string | Subsciber's id |
curl -X PATCH -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/lists/{list_uid}/subscribers/{id}/unsubscribe \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Unsubscribe a subscriber by email
| Parameter | Type | Description |
|---|---|---|
| list_uid Required | string | List's uid |
| email Required | string | Subsciber's email |
curl -X PATCH -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/lists/{list_uid}/subscribers/email/{email}/unsubscribe \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Delete a subscriber
| Parameter | Type | Description |
|---|---|---|
| list_uid Required | string | List's uid |
| id Required | string | Subsciber's id |
curl -X DELETE -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/subscribers/{id} \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Bulk import subscribers (synchronous โ applied inline, returns per-row results)
| Parameter | Type | Description |
|---|---|---|
| list_uid Required | string | List's uid |
| subscribers Required | string | Array of subscriber objects, each with EMAIL (required) and any custom field tags (FIRST_NAME, LAST_NAME, ...). Each row may also include $tags (array of tag names) and $status (subscribed | unsubscribed | unconfirmed) |
| mode Optional | string | Duplicate-handling strategy: overwrite | skip |
| overwrite_status Optional | string | When mode=overwrite, also overwrite existing subscriber's status |
| overwrite_tags Optional | string | When mode=overwrite, replace existing tags instead of merging |
curl -X POST \
-H "accept:application/json" \
-H "Content-Type: application/json" \
"https://mailer.turumail.com/api/v1/lists/{list_uid}/subscribers/bulk?api_token=tm_live_xxxxxxxxxxxxxxxx" \
-d '{
"mode": "overwrite",
"overwrite_status": false,
"overwrite_tags": false,
"subscribers": [
{"EMAIL": "alice@example.com", "FIRST_NAME": "Alice", "tags": ["vip","newsletter"]},
{"EMAIL": "bob@example.com", "FIRST_NAME": "Bob", "status": "subscribed"}
]
}'
Bulk import subscribers (asynchronous โ queued; poll status via /api/v1/import-jobs/{job_uid}). Accepts either a JSON payload (same shape as the sync endpoint) or a multipart CSV upload.
| Parameter | Type | Description |
|---|---|---|
| list_uid Required | string | List's uid |
| subscribers Optional | string | JSON variant: array of subscriber objects (same shape as the sync endpoint) |
| file Optional | string | Multipart variant: CSV file upload |
| mapping Optional | string | Multipart variant: JSON object mapping CSV header โ field tag (e.g. {"Email":"EMAIL","First":"FIRST_NAME"}). Numeric field ids also accepted. |
| mode Optional | string | Duplicate-handling strategy: overwrite | skip |
| overwrite_status Optional | string | When mode=overwrite, also overwrite existing subscriber's status |
| overwrite_tags Optional | string | When mode=overwrite, replace existing tags instead of merging |
# JSON variant
curl -X POST \
-H "accept:application/json" \
-H "Content-Type: application/json" \
"https://mailer.turumail.com/api/v1/lists/{list_uid}/subscribers/bulk/async?api_token=tm_live_xxxxxxxxxxxxxxxx" \
-d '{"mode":"overwrite","subscribers":[{"EMAIL":"alice@example.com"},{"EMAIL":"bob@example.com"}]}'
# CSV multipart variant
curl -X POST \
-H "accept:application/json" \
"https://mailer.turumail.com/api/v1/lists/{list_uid}/subscribers/bulk/async?api_token=tm_live_xxxxxxxxxxxxxxxx" \
-F "file=@/path/to/subscribers.csv" \
-F 'mapping={"Email":"EMAIL","First Name":"FIRST_NAME"}' \
-F "mode=overwrite"
List recent bulk-import jobs for a list
| Parameter | Type | Description |
|---|---|---|
| list_uid Required | string | List's uid |
| limit Optional | string | Max number of jobs to return |
curl -X GET -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/lists/{list_uid}/import-jobs \
-d api_token=tm_live_xxxxxxxxxxxxxxxx \
-d limit=20
Poll a bulk-import job โ status, progress, counts
| Parameter | Type | Description |
|---|---|---|
| job_uid Required | string | Job uid returned by the async endpoint |
curl -X GET -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/import-jobs/{job_uid} \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Cancel a queued or running bulk-import job (soft cancel โ job_uid stays queryable, status becomes "cancelled")
| Parameter | Type | Description |
|---|---|---|
| job_uid Required | string | Job uid returned by the async endpoint |
curl -X DELETE -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/import-jobs/{job_uid} \
-d api_token=tm_live_xxxxxxxxxxxxxxxx
Send a HARD bounce to the application. Notice that it is not needed to inform the application of SOFT bounces
| Parameter | Type | Description |
|---|---|---|
| message_id Required | string | Message's id |
| description Required | string | Notification message |
curl -X POST -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/notification/bounce \
-d api_token=tm_live_xxxxxxxxxxxxxxxx \
-d message_id=201637442604422402.6199642caf7f3@example.com
Send a bounce or abuse report to the application. It could be a success / bounce / feedback or abuse report
| Parameter | Type | Description |
|---|---|---|
| message_id Required | string | Message's id |
| type Required | string | Poassible values include: spam | abuse |
| description Required | string | Notification message |
curl -X POST -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/notification/feedback \
-d api_token=tm_live_xxxxxxxxxxxxxxxx \
-d message_id=201637442604422402.6199642caf7f3@example.com \
-d type=abuse
Upload file(s) to customer's storage
| Parameter | Type | Description |
|---|---|---|
| file_url Required | string | File url |
| subdirectory Optional | string | Custom subdirectory |
curl -X POST -H "accept:application/json" -G \
https://mailer.turumail.com/api/v1/file/upload \
-d api_token=tm_live_xxxxxxxxxxxxxxxx \
-d files='[{"url":"http://example.com/images/logo_big.svg","subdirectory":"path/to/file"},{"url":"http://example.com/images/logo_big.svg","subdirectory":"path/to/file2"}]'
TuruMail can send real-time webhook notifications to your endpoint for these events:
email.delivered โ Email successfully delivered to the recipient's mail serveremail.opened โ Recipient opened the email (pixel tracking)email.clicked โ Recipient clicked a tracked linkemail.replied โ Recipient replied to your emailemail.bounced โ Email bounced (includes hard/soft bounce type)email.spam_complaint โ Recipient reported email as spamemail.unsubscribed โ Recipient clicked the unsubscribe linkblacklist.detected โ Your sending IP was detected on a blacklistwarmup.limit_reached โ Daily warmup volume limit reached for an IPAll webhooks are signed with an HMAC-SHA256 signature in the X-TuruMail-Signature header for verification.
Start with 1,000 free API calls. Upgrade as you grow. Full documentation and SDKs included.