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.

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

3 - downloading result file

Request URL

Method: GET

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

The download link is retrieved from the second response.

It is necessary to pass an API token in request parameters.