Prepare a suppression list download
const url = 'https://mailer-api.optizmo.net/accesskey/download/m-a12-a92b82cd3848ef7810d9ef0e?format=md5&deltas=1&delta_timestamp=1546300800&token=<token>';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://mailer-api.optizmo.net/accesskey/download/m-a12-a92b82cd3848ef7810d9ef0e?format=md5&deltas=1&delta_timestamp=1546300800&token=<token>'Prepares the campaign’s suppression list as a ZIP file (including domain
suppression where applicable) and returns a download_link.
Retrieve the file by making a GET request to that link — see
Retrieve the prepared suppression file.
Note: Campaigns that have email creative attached will have to be manually downloaded the first time so as they need to be selected.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The Mailer Access Key (MAK) identifying the campaign whose suppression list you are downloading.
Query Parameters
Section titled “Query Parameters ”Suppression file output format.
Output format for the suppression file. Defaults to the list’s configured format when omitted.
Example
md5Set to 1 to retrieve only additions since your last download. Defaults to 0.
Example
1Used in conjuction with the deltas=1 query param, emails will be grabbed from this Unix timestamp to now.
If omitted, the timestamp for when the suppression file was last prepared will be used.
Example
1546300800Responses
Section titled “ Responses ”The request always returns HTTP 200. On success the response
contains the download_link and campaign details; on failure
(including an invalid token) it returns an error response whose
error_code identifies the problem.
Returned when a suppression download is prepared successfully.
object
Always success for a successful response.
Suppression file output format.
Name of the campaign the suppression list belongs to.
URL for retrieving the suppression ZIP file. The token and dcma
query parameters are already embedded — issue a GET to this link
as-is.
Public opt-out URL for the campaign.
Unix timestamp marking the point this download was prepared from.
Pass it as the delta_timestamp query parameter on a subsequent
request to fetch only additions collected since.
Human-readable guidance on what to do next.
Error response returned when a request fails.
object
Always error for a failed response.
Error code.
Title of the error.
Detailed description of error with help on how to resolve it.
Examples
A prepared download
{ "result": "success", "format": "plain", "campaign_name": "Example Campaign", "download_link": "https://mailer-api.optizmo.net/accesskey/getfile/m-crlc-e51-abef0eb8a275f3?token=<token>&dcma=<dcma>", "optout_link": "http://www.optout-crlc.net/o-crlc-e51-490cb3212b3f17b35d990627d4a79", "delta_timestamp": 1546300800, "help": "Use the download_link to grab the suppression file."}Invalid access key
{ "result": "error", "error_code": "internal_error", "error": "Invalid access key."}