Emails
Use this endpoint to manipulate and obtain details on Mautic’s Emails.
Using the Mautic API library
You can interact with this API using the Mautic API Library as below, or the various HTTP endpoints described in this document.
<?php
use Mautic\MauticApi;
use Mautic\Auth\ApiAuth;
// ...
$initAuth = new ApiAuth();
$auth = $initAuth->newAuth($settings);
$apiUrl = "https://example.com";
$api = new MauticApi();
$emailApi = $api->newApi("emails", $auth, $apiUrl);
Get Email
Retrieves an individual Email.
<?php
//...
$email = $emailApi->get($id);
HTTP request
GET /emails/ID
Response
Returns
200 OKwhen the request successfully retrieves the Email.
{
"email": {
"isPublished": true,
"dateAdded": "2026-02-19T04:17:46+00:00",
"dateModified": "2026-02-19T14:49:06+00:00",
"createdBy": 1,
"createdByUser": "Admin Mautic",
"modifiedBy": 1,
"modifiedByUser": "Admin Mautic",
"id": 1,
"name": "Acme General Conference Success",
"subject": "Acme General Conference Success",
"language": "en",
"category": null,
"fromAddress": "john.doe@acme.com",
"fromName": "John Doe",
"replyToAddress": null,
"bccAddress": null,
"useOwnerAsMailer": false,
"utmTags": {
"utmSource": null,
"utmMedium": null,
"utmCampaign": null,
"utmContent": null
},
"preheaderText": null,
"customHtml": "",
"plainText": null,
"template": "_make-announcement",
"emailType": "template",
"publishUp": null,
"publishDown": null,
"publicPreview": false,
"readCount": 0,
"sentCount": 0,
"revision": 2,
"assetAttachments": [],
"variantStartDate": null,
"variantSentCount": 0,
"variantReadCount": 0,
"variantParent": null,
"variantChildren": [],
"translationParent": null,
"translationChildren": [],
"unsubscribeForm": null,
"dynamicContent": [
{
"tokenName": "Dynamic Content 1",
"content": "Default Dynamic Content",
"filters": [
{
"content": null,
"filters": []
}
]
}
],
"lists": [],
"headers": [],
"grapesjsbuilder": {
"customMjml": "<mjml>\r\n <mj-head>\r\n\t<!-- CSS-STYLE -->\r\n\t<mj-style inline=\"inline\"> p, li {margin:0 !important; padding:0; line-height:1.4em;}\r\n\t</mj-style>\r\n </mj-head>\r\n <!-- BODY -->\r\n <mj-body background-color=\"#f4f4f4\">\r\n\t<mj-section padding-top=\"40px\" background-color=\"#ffffff\">\r\n\t <mj-column>\r\n\t\t<mj-text font-size=\"11px\" align=\"center\">\r\n\t\t <p>\r\n\t\t\t<span data-fr-verified=\"true\"><span data-fr-verified=\"true\" class=\"atwho-inserted\">{webview_text}</span></span>\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-spacer>\r\n\t\t</mj-spacer>\r\n\t\t<mj-image src=\"/app/assets/images/placeholder-logo.png?v5214f417\" width=\"70px\" padding-bottom=\"0px\" padding-top=\"0px\">\r\n\t\t</mj-image>\r\n\t </mj-column>\r\n\t</mj-section>\r\n\t<mj-section background-color=\"#ffffff\">\r\n\t <mj-column width=\"550px\">\r\n\t\t<mj-text font-size=\"16px\" align=\"center\" font-style=\"italic\" color=\"#525252\">\r\n\t\t <p>Ok, let's make an announcement\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-spacer height=\"40px\">\r\n\t\t</mj-spacer>\r\n\t\t<mj-text font-size=\"24px\" align=\"center\" font-weight=\"700\">\r\n\t\t <p>Start customizing your email\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t </mj-column>\r\n\t</mj-section>\r\n\t<mj-section background-color=\"#ffffff\" padding-top=\"0px\">\r\n\t <mj-column padding-top=\"0px\">\r\n\t\t<mj-image src=\"/app/assets/images/placeholder-image.png?v5214f417\" padding-right=\"0px\" padding-left=\"0px\" padding-bottom=\"0px\" padding-top=\"0px\">\r\n\t\t</mj-image>\r\n\t </mj-column>\r\n\t</mj-section>\r\n\t<mj-section background-color=\"#ffffff\" padding-top=\"0px\">\r\n\t <mj-column padding-top=\"0px\">\r\n\t\t<mj-image src=\"/app/assets/images/placeholder-image.png?v5214f417\" padding-top=\"0px\">\r\n\t\t</mj-image>\r\n\t </mj-column>\r\n\t <mj-column padding-top=\"0px\">\r\n\t\t<mj-image src=\"/app/assets/images/placeholder-image.png?v5214f417\" padding-top=\"0px\">\r\n\t\t</mj-image>\r\n\t </mj-column>\r\n\t</mj-section>\r\n\t<mj-section background-color=\"#ffffff\">\r\n\t <mj-column width=\"550px\">\r\n\t\t<mj-text font-size=\"16px\" align=\"center\">\r\n\t\t <p>Make your announcements pop with an eye-catching visual, then provide the crucial details for engagement.\r\n\t\t </p>\r\n\t\t <p>\r\n\t\t\t<br/>Customize this section by inserting your own images or choosing a striking solid color backdrop.\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-spacer height=\"30px\">\r\n\t\t</mj-spacer>\r\n\t\t<mj-divider border-width=\"2px\" border-color=\"#d0d0d0\">\r\n\t\t</mj-divider>\r\n\t\t<mj-spacer height=\"30px\">\r\n\t\t</mj-spacer>\r\n\t\t<mj-text font-size=\"22px\" font-weight=\"700\">\r\n\t\t <p>Lead with an eye-catching title\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-text font-size=\"16px\">\r\n\t\t <p>Present your news in a brief paragraph. For crucial points, use a bulleted list:\r\n\t\t </p>\r\n\t\t <ul>\r\n\t\t\t<li>\r\n\t\t\t <span class=\"ck-list-bogus-paragraph\"><span class=\"ck-list-bogus-paragraph\">What's on offer</span></span>\r\n\t\t\t</li>\r\n\t\t\t<li>\r\n\t\t\t <span class=\"ck-list-bogus-paragraph\"><span class=\"ck-list-bogus-paragraph\">Where to find us</span></span>\r\n\t\t\t</li>\r\n\t\t\t<li>\r\n\t\t\t <span class=\"ck-list-bogus-paragraph\"><span class=\"ck-list-bogus-paragraph\">Timing specifics</span></span>\r\n\t\t\t</li>\r\n\t\t </ul>\r\n\t\t <p>Be concise to motivate readers to explore your website for the full story.\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-button href=\"https://\" background-color=\"#000000\" inner-padding=\"16px 32px\" border-radius=\"0px 0px 0px 0px\" font-size=\"16px\" align=\"left\">Button\r\n\t\t</mj-button>\r\n\t\t<mj-spacer align=\"center\">\r\n\t\t</mj-spacer>\r\n\t </mj-column>\r\n\t</mj-section>\r\n\t<mj-section padding-top=\"0\" padding-bottom=\"20px\" background-color=\"#000000\">\r\n\t <mj-column>\r\n\t\t<mj-spacer height=\"40px\">\r\n\t\t</mj-spacer>\r\n\t\t<mj-image src=\"/app/assets/images/placeholder-logo-inverse.png?v5214f417\" width=\"70px\" padding-bottom=\"0px\">\r\n\t\t</mj-image>\r\n\t\t<mj-spacer>\r\n\t\t</mj-spacer>\r\n\t\t<mj-text font-family=\"Ubuntu, Helvetica, Arial, sans-serif\" line-height=\"1.5\" align=\"center\" padding-top=\"0px\" padding-bottom=\"0px\" font-size=\"12px\" color=\"white\">\r\n\t\t <p>Amazing Company\r\n\t\t\t<br/>11111 Beautiful City, 1212 Nice Street\r\n\t\t\t<br/>Brazil\r\n\t\t\t<br/>\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-spacer>\r\n\t\t</mj-spacer>\r\n\t\t<mj-text font-size=\"11px\" align=\"center\" color=\"#a1a1a1\">\r\n\t\t <p>Fancy seeing you down here. You’re getting this email because you gave us your email address.\r\n\t\t </p>\r\n\t\t <p>Want to change how you receive these emails?\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-text font-size=\"11px\" align=\"center\" color=\"#a1a1a1\">\r\n\t\t <p>\r\n\t\t\t<span data-fr-verified=\"true\"><span data-fr-verified=\"true\" class=\"atwho-inserted\">{unsubscribe_text}</span></span>\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-spacer>\r\n\t\t</mj-spacer>\r\n\t </mj-column>\r\n\t</mj-section>\r\n </mj-body>\r\n</mjml>\r\n"
}
}
}
Email properties
Name |
Type |
Description |
|---|---|---|
|
boolean |
Email publication status |
|
datetime |
Email record creation date and time |
|
datetime |
Email record last modification date and time |
|
integer |
ID of the User who created the Email |
|
string |
Name of the User who created the Email |
|
integer |
ID of the User who last modified the Email |
|
string |
Name of the User who last modified the Email |
|
integer |
ID of the Email |
|
string |
Email name |
|
string |
Subject of the Email |
|
string |
The language code for the Email, such as |
|
object |
The Category for the Email |
|
string |
From Email address |
|
string |
From name |
|
string |
Reply-to Email address |
|
string |
BCC Email address |
|
boolean |
Contact owner mailer status - set to |
|
associative array |
Associative array of Email UTM tags |
|
string |
Summary text that appears after the subject line |
|
string |
Custom HTML content of the Email |
|
string |
Plain text version of the Email |
|
string |
Theme used to style the Email |
|
string |
Type of the Email - |
|
datetime |
Activation date and time for the Email |
|
datetime |
Deactivation date and time for the Email |
|
boolean |
Public preview status |
|
integer |
Number of times Users read the Email |
|
integer |
Number of times the system sent the Email |
|
integer |
Revision number of the Email |
|
array |
Array of Assets attached to the Email |
|
datetime |
Activation date and time for the Email A/B test |
|
integer |
Number of times the system sent Email variants |
|
integer |
Number of times Users read Email variants |
|
integer |
ID of the parent Email for the variant |
|
array |
Array of child Email variant IDs |
|
integer |
ID of the parent translation Email |
|
array |
Array of Email IDs that translate the parent Email |
|
object |
The Unsubscribe Form for the Email |
|
array |
Array of Dynamic Content variants |
|
array |
Array of Segments that receive the Email |
|
array |
Array of custom headers |
|
associative array |
Associative array of Email builder configuration |
List Emails
Retrieves a list of Emails.
<?php
// ...
$emails = $emailApi->getList($searchFilter, $start, $limit, $orderBy, $orderByDir, $publishedOnly, $minimal);
HTTP request
GET /emails
Query parameters
Name |
Type |
Description |
|---|---|---|
|
string |
String or search command to filter entities |
|
integer |
Starting row for the returned entities - defaults to 0 |
|
integer |
Maximum number of entities to return - defaults to 30 |
|
string |
Column to sort by. Any column in the response is valid. Note: convert |
|
string |
Order direction - |
|
boolean |
Returns only currently published entities |
|
boolean |
Returns only a simple mapped object of entities without additional lists in it |
Response
Returns
200 OKwhen the request successfully retrieves the Emails list.
{
"total": 2,
"emails": {
"1": {
"isPublished": true,
"dateAdded": "2026-02-19T04:17:46+00:00",
"dateModified": "2026-02-19T15:14:49+00:00",
"createdBy": 1,
"createdByUser": "Admin Mautic",
"modifiedBy": 1,
"modifiedByUser": "Admin Mautic",
"id": 1,
"name": "Acme General Conference Success",
"subject": "Acme General Conference Success",
"language": "en",
"category": null,
"fromAddress": "john.doe@acme.com",
"fromName": "John Doe",
"replyToAddress": null,
"bccAddress": null,
"useOwnerAsMailer": false,
"utmTags": {
"utmSource": null,
"utmMedium": null,
"utmCampaign": null,
"utmContent": null
},
"preheaderText": null,
"customHtml": "",
"plainText": null,
"template": "mautic_code_mode",
"emailType": "template",
"publishUp": null,
"publishDown": null,
"publicPreview": false,
"readCount": 0,
"sentCount": 0,
"revision": 4,
"assetAttachments": [],
"variantStartDate": null,
"variantSentCount": 0,
"variantReadCount": 0,
"variantParent": null,
"variantChildren": [],
"translationParent": null,
"translationChildren": [],
"unsubscribeForm": null,
"dynamicContent": [
{
"tokenName": "Dynamic Content 1",
"content": "Default Dynamic Content",
"filters": [
{
"content": "Variation 1",
"filters": [
{
"glue": "and",
"field": "email",
"object": "lead",
"type": "email",
"filter": null,
"display": null,
"operator": "="
}
]
}
]
}
],
"lists": [],
"headers": [],
"grapesjsbuilder": {
"customMjml": "<mjml>\r\n <mj-head>\r\n\t<!-- CSS-STYLE -->\r\n\t<mj-style inline=\"inline\"> p, li {margin:0 !important; padding:0; line-height:1.4em;}\r\n\t</mj-style>\r\n </mj-head>\r\n <!-- BODY -->\r\n <mj-body background-color=\"#f4f4f4\">\r\n\t<mj-section padding-top=\"40px\" background-color=\"#ffffff\">\r\n\t <mj-column>\r\n\t\t<mj-text font-size=\"11px\" align=\"center\">\r\n\t\t <p>\r\n\t\t\t<span data-fr-verified=\"true\"><span data-fr-verified=\"true\" class=\"atwho-inserted\">{webview_text}</span></span>\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-spacer>\r\n\t\t</mj-spacer>\r\n\t\t<mj-image src=\"/app/assets/images/placeholder-logo.png?v5214f417\" width=\"70px\" padding-bottom=\"0px\" padding-top=\"0px\">\r\n\t\t</mj-image>\r\n\t </mj-column>\r\n\t</mj-section>\r\n\t<mj-section background-color=\"#ffffff\">\r\n\t <mj-column width=\"550px\">\r\n\t\t<mj-text font-size=\"16px\" align=\"center\" font-style=\"italic\" color=\"#525252\">\r\n\t\t <p>Ok, let's make an announcement\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-spacer height=\"40px\">\r\n\t\t</mj-spacer>\r\n\t\t<mj-text font-size=\"24px\" align=\"center\" font-weight=\"700\">\r\n\t\t <p>Start customizing your email\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t </mj-column>\r\n\t</mj-section>\r\n\t<mj-section background-color=\"#ffffff\" padding-top=\"0px\">\r\n\t <mj-column padding-top=\"0px\">\r\n\t\t<mj-image src=\"/app/assets/images/placeholder-image.png?v5214f417\" padding-right=\"0px\" padding-left=\"0px\" padding-bottom=\"0px\" padding-top=\"0px\">\r\n\t\t</mj-image>\r\n\t </mj-column>\r\n\t</mj-section>\r\n\t<mj-section background-color=\"#ffffff\" padding-top=\"0px\">\r\n\t <mj-column padding-top=\"0px\">\r\n\t\t<mj-image src=\"/app/assets/images/placeholder-image.png?v5214f417\" padding-top=\"0px\">\r\n\t\t</mj-image>\r\n\t </mj-column>\r\n\t <mj-column padding-top=\"0px\">\r\n\t\t<mj-image src=\"/app/assets/images/placeholder-image.png?v5214f417\" padding-top=\"0px\">\r\n\t\t</mj-image>\r\n\t </mj-column>\r\n\t</mj-section>\r\n\t<mj-section background-color=\"#ffffff\">\r\n\t <mj-column width=\"550px\">\r\n\t\t<mj-text font-size=\"16px\" align=\"center\">\r\n\t\t <p>Make your announcements pop with an eye-catching visual, then provide the crucial details for engagement.\r\n\t\t </p>\r\n\t\t <p>\r\n\t\t\t<br/>Customize this section by inserting your own images or choosing a striking solid color backdrop.\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-spacer height=\"30px\">\r\n\t\t</mj-spacer>\r\n\t\t<mj-divider border-width=\"2px\" border-color=\"#d0d0d0\">\r\n\t\t</mj-divider>\r\n\t\t<mj-spacer height=\"30px\">\r\n\t\t</mj-spacer>\r\n\t\t<mj-text font-size=\"22px\" font-weight=\"700\">\r\n\t\t <p>Lead with an eye-catching title\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-text font-size=\"16px\">\r\n\t\t <p>Present your news in a brief paragraph. For crucial points, use a bulleted list:\r\n\t\t </p>\r\n\t\t <ul>\r\n\t\t\t<li>\r\n\t\t\t <span class=\"ck-list-bogus-paragraph\"><span class=\"ck-list-bogus-paragraph\">What's on offer</span></span>\r\n\t\t\t</li>\r\n\t\t\t<li>\r\n\t\t\t <span class=\"ck-list-bogus-paragraph\"><span class=\"ck-list-bogus-paragraph\">Where to find us</span></span>\r\n\t\t\t</li>\r\n\t\t\t<li>\r\n\t\t\t <span class=\"ck-list-bogus-paragraph\"><span class=\"ck-list-bogus-paragraph\">Timing specifics</span></span>\r\n\t\t\t</li>\r\n\t\t </ul>\r\n\t\t <p>Be concise to motivate readers to explore your website for the full story.\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-button href=\"https://\" background-color=\"#000000\" inner-padding=\"16px 32px\" border-radius=\"0px 0px 0px 0px\" font-size=\"16px\" align=\"left\">Button\r\n\t\t</mj-button>\r\n\t\t<mj-spacer align=\"center\">\r\n\t\t</mj-spacer>\r\n\t </mj-column>\r\n\t</mj-section>\r\n\t<mj-section padding-top=\"0\" padding-bottom=\"20px\" background-color=\"#000000\">\r\n\t <mj-column>\r\n\t\t<mj-spacer height=\"40px\">\r\n\t\t</mj-spacer>\r\n\t\t<mj-image src=\"/app/assets/images/placeholder-logo-inverse.png?v5214f417\" width=\"70px\" padding-bottom=\"0px\">\r\n\t\t</mj-image>\r\n\t\t<mj-spacer>\r\n\t\t</mj-spacer>\r\n\t\t<mj-text font-family=\"Ubuntu, Helvetica, Arial, sans-serif\" line-height=\"1.5\" align=\"center\" padding-top=\"0px\" padding-bottom=\"0px\" font-size=\"12px\" color=\"white\">\r\n\t\t <p>Amazing Company\r\n\t\t\t<br/>11111 Beautiful City, 1212 Nice Street\r\n\t\t\t<br/>Brazil\r\n\t\t\t<br/>\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-spacer>\r\n\t\t</mj-spacer>\r\n\t\t<mj-text font-size=\"11px\" align=\"center\" color=\"#a1a1a1\">\r\n\t\t <p>Fancy seeing you down here. You’re getting this email because you gave us your email address.\r\n\t\t </p>\r\n\t\t <p>Want to change how you receive these emails?\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-text font-size=\"11px\" align=\"center\" color=\"#a1a1a1\">\r\n\t\t <p>\r\n\t\t\t<span data-fr-verified=\"true\"><span data-fr-verified=\"true\" class=\"atwho-inserted\">{unsubscribe_text}</span></span>\r\n\t\t </p>\r\n\t\t</mj-text>\r\n\t\t<mj-spacer>\r\n\t\t</mj-spacer>\r\n\t </mj-column>\r\n\t</mj-section>\r\n </mj-body>\r\n</mjml>\r\n"
}
},
// ...
}
}
Properties
Name |
Type |
Description |
|---|---|---|
|
integer |
Total count of Emails |
|
array |
A mapped collection of Emails indexed by their ID |
For the rest of the properties, refer to Email properties.
Create Email
Creates a new Email.
<?php
$data = array(
'name' => 'Email created via API', // Required
'subject' => 'Hello World!', // Required
'language' => 'en', // Required
'lists' => array(1, 2), // Required
'emailType' => 'list',
'isPublished' => true,
'customHtml' => '<h1>Hello from API!</h1>',
'preheaderText' => 'Check out our latest update',
'assetAttachments' => array(5),
);
$email = $emailApi->create($data);
HTTP request
POST /emails/new
POST parameters
Name |
Type |
Description |
|---|---|---|
|
string |
Required. Name of the Email |
|
string |
Required. Subject of the Email |
|
string |
Required. The language code for the Email, such as |
|
array |
Required. Array of Segments that receive the Email |
|
boolean |
Email publication status |
|
integer |
ID of the Category for the Email |
|
string |
From Email address |
|
string |
From name |
|
string |
Reply-to Email address |
|
string |
BCC Email address |
|
boolean |
Contact owner mailer status - set to |
|
associative array |
Associative array of Email UTM tags |
|
string |
Summary text that appears after the subject line |
|
string |
Custom HTML content of the Email |
|
string |
Plain text version of the Email |
|
string |
Theme used to style the Email |
|
string |
Type of the Email - |
|
datetime |
Activation date and time for the Email |
|
datetime |
Deactivation date and time for the Email |
|
boolean |
Public preview status |
|
array |
Array of Asset IDs attached to the Email |
|
integer |
ID of the Unsubscribe Form for the Email |
|
array |
Array of Dynamic Content variants |
|
array |
Array of custom headers |
Response
Returns
201 Createdwhen the request successfully creates an Email.
The response is a JSON object similar to Get Email.
Properties
Refer to Email properties.
Edit Email
Edits an Email.
This operation supports PUT or PATCH depending on the desired behavior:
PUT: full replacement. The request creates a new Email if the ID is missing. If the ID exists, the request clears all existing data and replaces it with the provided values.PATCH: partial update. The request only updates field values based on the request data. The request fails when the Email ID doesn’t exist.
<?php
$id = 1;
$data = array(
'name' => 'New email name',
'subject' => 'New subject line',
);
// Create a new Email if ID 1 isn't found
$createIfNotFound = true;
$email = $emailApi->edit($id, $data, $createIfNotFound);
HTTP request
PUT /emails/ID/edit: updates an existing Email or creates a new one when the ID doesn’t exist.PATCH /emails/ID/edit: updates an existing Email. The request fails when the ID doesn’t exist.
POST parameters
Accepts the same parameters as those described in Create Email. All parameters are optional.
Response
PUT: returns200 OKwhen the request successfully updates the Email or201 Createdwhen the request creates an Email.PATCH: returns200 OKwhen the request successfully updates the Email or404 Not Founderror when the Email ID doesn’t exist.
The response is a JSON object similar to Get Email.
Properties
Refer to Email properties.
Delete Email
Deletes an Email.
<?php
$email = $emailApi->delete($id);
HTTP request
DELETE /emails/ID/delete
Response
Returns
200 OKwhen the request successfully deletes the Email.
The response is a JSON object containing the data of the deleted Email, similar to Get Email.
Properties
Refer to Email properties.
Send Email to Contact
Sends an Email to a specific Contact.
<?php
$response = $emailApi->sendToContact($emailId, $contactId, $options);
Tokens
You can send custom tokens to the Email via the tokens parameter. Use the format {token_name} for tokens within the Email content.
<?php
$tokens = array(
'{first_name}' => 'John',
'{last_name}' => 'Doe',
'{custom_token}' => 'Custom Value'
);
$response = $emailApi->sendToContact($emailId, $contactId, array('tokens' => $tokens));
HTTP request
POST /emails/ID/contact/CONTACT_ID/send
Parameters
Name |
Type |
Description |
|---|---|---|
|
associative array |
Associative array of tokens to replace in the Email content |
Response
Returns
200 OKwhen the request successfully delivers the Email to the Contact.
{
"success": true
}
Send Email to Segment
Sends an Email to the Contacts in the Email’s assigned Segments or to specific Segment IDs.
<?php
// Send to all Contacts in the Email's assigned Segments
$response = $emailApi->send($id);
// Sends to specific Segment(s)
$response = $emailApi->sendToLists($id, $listIds);
HTTP request
POST /emails/ID/send
Parameters
Name |
Type |
Description |
|---|---|---|
|
array |
Array of Segment IDs to target. This parameter overrides the Email’s assigned Segments |
Response
Returns
200 OKwhen the request successfully delivers the Email to the Segments.
{
"success": 1,
"sentCount": 1,
"failedRecipients": 0
}
Properties
Name |
Type |
Description |
|---|---|---|
|
boolean |
Delivery success status - |
|
integer |
Total number of successfully sent Emails |
|
integer |
Total number of Emails that failed to deliver |
Create Email reply
Creates a reply to an Email using the tracking hash from the Email statistics.
<?php
$response = $emailApi->reply($trackingHash);
HTTP request
POST /emails/reply/TRACKING_HASH
Parameters
Name |
Type |
Description |
|---|---|---|
|
string |
Unique hash used to track Email statistics |
Response
Returns
201 Createdwhen the request successfully creates the reply.
{
"success": true
}