API documentation
Documentation of the SmartMailer REST API and webhooks, guides to connecting e-shops, setting up the DNS of your sender domain and moving from other tools.
API token
Create an API token in SmartMailer under Account settings > API tokens. Choose the token Permission: read only, read and edit without campaign sending, or full access including campaign sending. The full token is shown only once, so copy it right away.
Webhooks
Signed POST requests to your URL on open, click, bounce, complaint or unsubscribe. Create a webhook with POST /api/v1/webhooks.
Default format: one event per request
Each event arrives as a separate POST with this body. This applies to every webhook that has not turned on the batch format.
{
"event": "click",
"email": "customer@example.com",
"campaignUuid": "019ed1ac-30a6-75be-9204-5a66a318922e",
"timestamp": "2026-10-14T10:34:49+02:00"
}
Batch format (optional)
One POST carries an array of up to 100 events under the events key. Each item has the same fields as the default format. The X-SmartMailer-Event header is batch.
{
"events": [
{
"event": "open",
"email": "customer@example.com",
"campaignUuid": "019ed1ac-30a6-75be-9204-5a66a318922e",
"timestamp": "2026-10-14T10:34:49+02:00"
},
{
"event": "click",
"email": "other@example.com",
"campaignUuid": "019ed1ac-30a6-75be-9204-5a66a318922e",
"timestamp": "2026-10-14T10:34:50+02:00"
}
]
}
Turn on the batch format when creating the webhook with "batch": true. Without it the webhook receives the default format. GET /api/v1/webhooks returns the setting in the batch field.
POST /api/v1/webhooks
{
"url": "https://example.com/smartmailer-webhook",
"events": ["open", "click", "unsubscribed"],
"batch": true
}
Headers and signature
X-SmartMailer-Event: the event type (open,click,bounce,hardBounce,complaint,unsubscribed), orbatchfor a batch.X-SmartMailer-Signature: hexHMAC-SHA256of the request body, keyed with the secret returned when the webhook was created.- Verify the signature over the raw request body and compare in constant time (
hash_equals,timingSafeEqual).
Delivery and endpoint outages
- We wait at most 5 seconds for a response. Reply quickly with a
2xxstatus and move heavy processing to your own queue. - After 5 failed deliveries in a row (status 4xx or 5xx, connection error, timeout) the webhook is paused for 15 minutes and events from that period are not delivered. The
suspendedUntilfield inGET /api/v1/webhooksshows when the pause ends. After the pause we try to deliver again. - Failed deliveries are not retried. Each event is sent at most once.
- Rarely the same event may arrive twice. Deduplicate by
event,emailandcampaignUuid.
Integrations
List of official integrations.
| Name | Description | Link |
|---|---|---|
| PrestaShop module Sends contacts from orders and newsletter subscribers and tracks orders from campaigns. Free, for PrestaShop 1.6, 1.7, 8.x and 9.x. | Sends contacts from orders and newsletter subscribers and tracks orders from campaigns. Free, for PrestaShop 1.6, 1.7, 8.x and 9.x. | Download PSModuly |
| WordPress and WooCommerce plugin Sends new users, customers from WooCommerce orders and form submissions. Free, for WordPress 6.2+. | Sends new users, customers from WooCommerce orders and form submissions. Free, for WordPress 6.2+. | Download |
| OpenCart plugin Full SmartMailer integration with OpenCart. Easy to use. For OpenCart 3.x and 4.x. | Full SmartMailer integration with OpenCart. Easy to use. For OpenCart 3.x and 4.x. | Download |
| Joomla plugin Full SmartMailer integration with Joomla, including VirtueMart. Easy to use. For Joomla 5.4+. | Full SmartMailer integration with Joomla, including VirtueMart. Easy to use. For Joomla 5.4+. | Download |
| Forga e-shop SmartMailer integration built into the Forga e-shop rental. No plugin to install. | SmartMailer integration built into the Forga e-shop rental. No plugin to install. | Website |
| Shoptet No direct connection yet. Move contacts by exporting to CSV and importing with column mapping. | No direct connection yet. Move contacts by exporting to CSV and importing with column mapping. | Guide |
| Switching from SmartEmailing How to export contacts and unsubscribes from SmartEmailing to CSV and import them into SmartMailer. | How to export contacts and unsubscribes from SmartEmailing to CSV and import them into SmartMailer. | Guide |
| Switching from Ecomail How to export contacts and unsubscribes from Ecomail to CSV and import them into SmartMailer. | How to export contacts and unsubscribes from Ecomail to CSV and import them into SmartMailer. | Guide |
| Switching from Mailchimp How to export contacts and unsubscribes from Mailchimp to CSV and import them into SmartMailer. | How to export contacts and unsubscribes from Mailchimp to CSV and import them into SmartMailer. | Guide |
| PHP sample code A simple example of calling the API from PHP. | A simple example of calling the API from PHP. | Download |
Sender domains and DNS
How to add the records from the domain detail at your DNS provider.
After you add a sender domain, SmartMailer gives you TXT, CNAME and MX records. The guide shows where to add them at WEDOS, Forpsi, Active24, Websupport, Cloudflare and other providers.
Open the guide