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, or when the download has not been prepared yet. The body is a JSON error response whose error_code identifies the problem.

Media type application/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.

string
error
required

Title of the error.

string
help

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

string
Examples
Example downloadNotPrepared

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 type text/html
string
Examples
Example redirect

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.