Skip to content

Retrieve the prepared suppression file

GET
/accesskey/getfile/{mailer_access_key}
curl --request GET \
--url 'https://mailer-api.optizmo.net/accesskey/getfile/m-a12-a92b82cd3848ef7810d9ef0e?dcma=<dcma>&token=<token>'

Use the download_link returned by Prepare a suppression list download to download the suppression list ZIP file. That link already has the token and dcma query parameters embedded — make a GET to it as-is rather than constructing the request yourself.

Note: Requests must handle and follow 3XX responses. For example curl requests should use the -L, --location flag.

mailer_access_key
required
string

The Mailer Access Key (MAK) from the download_link. Use the value provided in the prepare-download response rather than constructing it yourself.

dcma
required
string

Opaque download token supplied in the download_link. Use the value from that link as-is.

Returned when the file cannot be retrieved — for example an invalid token or dcma, when the download has not been prepared yet, when a campaign move replaced the Mailer Access Key since the download was prepared (access_key_replaced: get the new key from the tracking platform that issued the old one; it answers before any refusal except an invalid token), when the key’s campaign is on a linked list but no move replaced the key (input_error with key_replaced_by_move: false: no new key was sent, so ask the network or advertiser that gave you the campaign), or when the campaign has moved to another opt-out list since the download was prepared (download_list_moved: prepare the download again, then fetch the new download_link). The body is a JSON error response whose error_code identifies the problem.

Media typeapplication/json

Error response returned when a request fails.

object
result
required

Always error for a failed response.

string
Allowed value: error
error_code
required

Error code. access_key_replaced: a campaign move replaced the Mailer Access Key you sent, so get the new key from the tracking platform that issued the old one. download_list_moved: the campaign moved to another opt-out list since the download was prepared, so the prepared file is for the list it has left; prepare the download again. input_error with key_replaced_by_move: false: the key’s campaign is on a linked list but no move replaced the key, so no new key was sent.

string
key_replaced_by_move

Present, and false, only on an input_error answer for a key whose campaign is on a linked list that no move replaced. Absent from every other error response.

boolean
error
required

Title of the error.

string
help

Detailed description of error with help on how to resolve it.

string
Examples

File requested before it was prepared

{
"result": "error",
"error_code": "download_not_prepared",
"error": "This list has not been prepared for download.",
"help": "Prepare the file first by calling GET /accesskey/download/{mailer_access_key}?token=YOUR_TOKEN, then request the download_link returned in that response (a /accesskey/getfile URL that includes a 'dcma' token)."
}

The suppression file is ready. The response redirects (via the Location header) to a signed URL where the ZIP file can be downloaded. Requests must handle and follow 3XX responses. For example curl requests should use the -L, --location flag.

Media typetext/html
string
Examples
Exampleredirect

A redirect to the prepared file

You should be redirected to the download file at https://...
Location
string format: uri

Signed URL the suppression list ZIP can be downloaded from.