Base URL
https://api.adsmedia.live/v1
๐ Quick Navigation
Authentication
All API requests require authentication using your API key. You can authenticate using one of these methods:
Authentication Methods
Option 1: Bearer Token (Recommended)
Option 2: X-API-Key Header
Option 3: Query Parameter
Test API connectivity and authentication.
Example Request
Response:
Send Email
Send emails directly via API. Two modes available:
- Single send โ Synchronous, for transactional emails (no tracking/statistics)
- Batch send โ Asynchronous, for marketing emails (full tracking, personalization, statistics)
Send a single transactional email synchronously. Note: No open/click tracking or statistics. Use for password resets, order confirmations, notifications, etc.
Request Body (JSON)
| Parameter | Type | Description |
|---|---|---|
to | string | Required Recipient email address |
to_name | string | Optional Recipient name |
subject | string | Required Email subject line |
html | string | Required HTML content (required unless text-only) |
text | string | Auto/Required Plain text version. Auto-generated from HTML if not provided |
type | integer | Optional 1=HTML+text (default), 2=HTML only, 3=text only |
from_name | string | Optional Sender display name (default: ADSMedia) |
reply_to | string | Optional Reply-to email address |
server_id | integer | Optional Specific server ID (random available if not specified) |
unsubscribe_url | string | Optional URL for List-Unsubscribe header |
Example Request
Response
Send up to 1000 marketing emails in a batch. Creates a task that processes asynchronously with full tracking (opens, clicks, unsubscribes).
Request Body (JSON)
| Parameter | Type | Description |
|---|---|---|
recipients | array | Required Array of recipients (max 1000) |
recipients[].email | string | Required Recipient email |
recipients[].name | string | Optional Recipient name (for %%First Name%% personalization) |
subject | string | Required Email subject line |
html | string | Required HTML content (auto-wrapped if no <body> tag) |
text | string | Optional Plain text version (auto-generated from HTML if not provided) |
preheader | string | Optional Email preheader (preview text) |
from_name | string | Optional Sender display name |
server_id | integer | Optional Specific server ID (random if not specified) |
Personalization Placeholders
Use these placeholders in subject and HTML โ they will be replaced per recipient:
| Placeholder | Type | Description |
|---|---|---|
%%First Name%% | string | Recipient's first name (from recipients[].name) |
%%Last Name%% | string | Recipient's last name |
%%emailaddress%% | string | Recipient's email address |
%%Sender Name%% | string | Your sender name (from_name) |
%%unsubscribelink%% | URL | Unsubscribe link (auto-added if missing) |
%%webversion%% | URL | View in browser link |
๐ก Auto-formatting
Simple HTML without <body> tag is automatically wrapped in a proper HTML structure. If no %%unsubscribelink%% is provided, an unsubscribe footer is automatically added for compliance.
Example Request
Response
๐ Statistics
Use the returned task_id with /v1/stats/campaign?id={task_id} to get opens, clicks, bounces, and other statistics after sending completes.
Get the status of a sent email by message ID or send ID.
| Parameter | Type | Description |
|---|---|---|
message_id | string | Optional* Message ID returned from /send |
id | integer | Optional* Send ID returned from /send |
* Either message_id or id is required
Example Request
Campaigns
Campaigns are email templates containing HTML content, subject lines, and preheaders.
List all campaigns.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Optional Max results (default: 50) |
Example Request
Get a specific campaign by ID.
| Parameter | Type | Description |
|---|---|---|
id | integer | Required Campaign ID |
Create a new campaign.
Request Body (JSON)
| Parameter | Type | Description |
|---|---|---|
name | string | Required Campaign name |
subject | string | Required Email subject line |
type | integer | Optional 1=HTML+text (default), 2=HTML only, 3=text only |
html | string | Required HTML content (required for type 1 and 2) |
text | string | Auto/Required Plain text version. Auto-generated from HTML for type 1/2. Required for type 3 |
preheader | string | Optional Preheader text |
Example Request
Response
Update an existing campaign. Only provided fields will be updated.
Request Body (JSON)
| Parameter | Type | Description |
|---|---|---|
name | string | Optional Campaign name |
subject | string | Optional Email subject line |
type | integer | Optional 1=HTML+text, 2=HTML only, 3=text only |
html | string | Optional HTML content |
text | string | Optional Plain text version |
preheader | string | Optional Preheader text |
Example Request
Delete a campaign (soft delete).
Lists & Contacts
List all subscriber lists with hierarchical structure. Child lists are nested inside their parent's children array.
Response
Note: children array is only included if the list has child lists.
Get detailed information about a specific list, including sample contacts and child lists if any.
| Parameter | Type | Description |
|---|---|---|
id | integer | Required List ID |
Response
Note: children array is only included if the list has child lists. sample_contacts returns up to 10 contacts.
Create a new list.
Request Body (JSON)
| Parameter | Type | Description |
|---|---|---|
name | string | Required List name |
type | integer | Optional 1=email (default), 3=phone |
Example Request
Response
Get contacts from a list.
| Parameter | Type | Description |
|---|---|---|
id | integer | Required List ID |
limit | integer | Optional Max results (default: 100, max: 1000) |
offset | integer | Optional Pagination offset |
Add contacts to a list (max 1000 per request).
Request Body (JSON)
| Parameter | Type | Description |
|---|---|---|
contacts | array | Required Array of contact objects |
contacts[].email | string | Required Email address |
contacts[].firstName | string | Optional First name |
contacts[].lastName | string | Optional Last name |
contacts[].custom1 | string | Optional Custom field 1 |
contacts[].custom2 | string | Optional Custom field 2 |
Example Request
Response
Remove contacts from a list.
Request Body (JSON)
| Parameter | Type | Description |
|---|---|---|
emails | array | Required Array of email addresses to remove |
Example Request
Response
Split a large list into smaller segments. Required for lists over 150,000 contacts before sending.
Request Body (JSON)
| Parameter | Type | Description |
|---|---|---|
count | integer | Optional Number of splits. If not provided, auto-calculated based on 35k per split. |
๐ก Split Size Limits
- Minimum: 15,000 contacts per split
- Maximum: 35,000 contacts per split
If count is omitted, the system auto-calculates optimal splits (~35k each). If your count results in splits outside these limits, you'll get an error with the valid range.
Example Request (auto)
Response
Note: Split lists appear as children in the parent list. Send to individual splits, not the parent. Re-splitting a list deletes existing splits first.
Schedules (Sending Tasks)
Schedules are sending tasks that combine a campaign, list, and server to execute email delivery.
List all schedules/tasks.
| Parameter | Type | Description |
|---|---|---|
status | string | Optional Filter by status (queue, prep, sending, done, paused) |
Create a new sending task.
Request Body (JSON)
| Parameter | Type | Description |
|---|---|---|
campaign_id | integer | Required Campaign ID |
list_id | integer | Required List ID |
server_id | integer | Required Server ID |
sender_name | string | Optional Sender display name |
schedule | string | Optional Schedule datetime (YYYY-MM-DD HH:MM:SS) |
โ ๏ธ List Restrictions
- Parent lists with splits: Cannot send to a list that has child lists (splits). Use individual split lists instead.
- Maximum 150,000 contacts: Lists larger than 150k contacts must be split before sending.
Example Request
Response
Update schedule sender name or datetime. Cannot edit if status is sending or done.
Request Body (JSON)
| Parameter | Type | Description |
|---|---|---|
sender_name | string | Optional New sender display name |
schedule | string | Optional New datetime (YYYY-MM-DD HH:MM:SS) |
Example Request
Response
Pause an active schedule.
Resume a paused schedule.
Stop and delete a schedule permanently.
Servers
List all sending servers with status, limits, and warmup progress.
Response includes:
- Server status and IP address
- Daily sending limit and sent count
- Warmup status and progress
- Blacklist status
- Health score
Get detailed information about a specific server.
Domain Verification
Comprehensive DNS verification for a server's domain. Checks SPF, DKIM, DMARC, MX, PTR, DNSSEC (DS), and TLSA (DANE) with certificate validation.
Example Request
Response:
Statistics
Get overall sending statistics across all campaigns.
Get statistics for a specific campaign/task.
Get hourly breakdown of opens/clicks for a task.
Get daily breakdown of opens/clicks for a task.
Get geographic distribution of opens/clicks.
Get bounce details grouped by reason.
Get statistics by email provider (Gmail, Outlook, etc.).
Events
Get detailed events (opens, clicks, bounces, unsubscribes) for a task.
| Parameter | Type | Description |
|---|---|---|
id | integer | Required Task/Schedule ID |
type | string | Optional Filter: open, click, bounce, unsubscribe, sent |
email | string | Optional Filter by specific email |
limit | integer | Optional Max results (default: 100, max: 1000) |
offset | integer | Optional Pagination offset |
Example Request
Suppression Check
Check if a specific email is suppressed (bounced, unsubscribed, or blocked).
Example Request
Response:
Account
Get account information.
Get usage statistics and limits.
Response includes:
- Server count and daily limits
- Lists and subscriber counts
- Active schedules
- This month's sending stats
Get your current API key.
Generate a new API key. Warning: This invalidates your current key immediately.
Rate Limiting
API requests are rate-limited to ensure fair usage:
- 100 requests per minute per API key
- Rate limit headers are included in responses
- Exceeding the limit returns HTTP 429 (Too Many Requests)
Error Handling
All errors return a consistent JSON structure:
| HTTP Code | Error Code | Description |
|---|---|---|
| 400 | missing_* | Required parameter missing |
| 401 | unauthorized | Invalid or missing API key |
| 404 | not_found | Resource not found |
| 405 | method_not_allowed | Wrong HTTP method |
| 429 | rate_limit | Too many requests |
| 500 | internal_error | Server error |