Skip to main content

Upload suppression list data to file

Description

Uploads a csv file containing md5 data from a suppression list.

Includes 3 requests.

Step 1 - creating profiles export task

Request URL

Method: POST

https://example.com/api/v1.1/suppresses/export

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
idint1YesSuppression list ID
typestring"emails"
"phones"
"domains"
"all"
NoType of contact data to export.
By default — all.

Request example

{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 1,
"type": "emails"
}

Response example

{
"data": {
"task_id": "c110f0-06d0-4695-9aee-a9bab742d"
},
"error": 0,
"error_text": "Successful operation"
}

Response parameters

ParameterTypeDescription
task_idstringExport task ID
errorintError code
error_textstringError text

Request URL

Method: POST

https://example.com/api/v1.1/tasks/status

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
task_idstring"c110f0-06d0-4695-9aee-a9bab742d"YesExport task ID

Request example

{
"token": "abcdefghijklmnqrstuvwxyz",
"task_id": "c110f0-06d0-4695-9aee-a9bab742d"
}

Response example

{
"data": {
"status": "completed",
"progress": 100,
"result": {
"hashed_file": "suppress/b5bb73d7-530d-4a64-89d4-8ad22bad73/suppress_list_name.md5.zip",
"is_api": true,
"regular_file": "",
"suppress_id": 1,
"total": 32
}
},
"error": 0,
"error_text": "Successful operation"
}

Response parameters

ParameterTypeDescription
statusstringTask status
progressintTask progress
hashed_filearrayLink to download the file with data in md5 format
is_apiboolExport via API
suppress_idintSuppression list ID
totalintNumber of lines (email addresses and domains, phones) in the suppression list
errorintError code
error_textstringError text

Step 3 - downloading result file

The link to download the file looks like following:

https://example.com/api/download/suppress/b5bb73d7-530d-4a64-89d4-8ad22bad73/suppress_list_name.md5.zip?token=abcdefghijklmnqrstuvwxyz , where:

  • https://example.com - link to the platform panel
  • api/download/suppress/b5bb73d7-530d-4a64-89d4-8ad22bad73/suppress_list_name.md5.zip - link from the urls parameter of the past request
  • ?token=abcdefghijklmnqrstuvwxyz - user's API token (after the equal sign).

To download a file with profiles you should either open this link in your browser or send an empty GET request specifying this link in the URL.