Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v74
  • v74
  • v73
  • v72
Login
  • User API documentation
  • API interaction
  • Matching
  • Profiles
  • Databases
  • Resources
  • Segments
  • Suppression lists
    • Create suppression list
    • Update suppression list
    • Get suppression list info
    • Get the list of suppression lists
    • Delete suppression list
    • Upload suppression list data to file
    • Suppression list actions
  • Templates and fragments
  • Campaigns
  • Mailings
  • Automation scenarios
  • Loyalty Programs
  • Promo codes
  • Goals
  • Application push notifications
  • Market
  • Analytic reports
  • SendersDev
  • External datatables queries
  • Objects
  • Miscellaneous
  • Importing the API collection in Postman
  • List of API endpoints
  • SDK
  • Suppression lists
  • Upload suppression list data to file
Documentation for version v74

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​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 1,
"type": "emails"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<id>3</id>
<type>emails</type>
</xml>

Response example​

  • JSON
  • XML
{
"data": {
"task_id": "c110f0-06d0-4695-9aee-a9bab742d"
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<task_id>c110f0-06d0-4695-9aee-a9bab742d</task_id>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>

Response parameters​

ParameterTypeDescription
task_idstringExport task ID
errorintError code
error_textstringError text

Step 2 - checking export status and getting link​

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​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"task_id": "c110f0-06d0-4695-9aee-a9bab742d"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<task_id>c110f0-06d0-4695-9aee-a9bab742d</task_id>
</xml>

Response example​

  • JSON
  • XML
{
"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"
}
<xml>
<data>
<status>completed</status>
<progress>100</progress>
<xml>
<hashed_file>suppress/b5bb73d7-530d-4a64-89d4-8ad22bad73/suppress_list_name.md5.zip</hashed_file>
<is_api>true</is_api>
<regular_file></regular_file>
<suppress_id>1</suppress_id>
<total>32</total>
</xml>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>

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.

Last updated on Jun 4, 2024
Previous
Delete suppression list
Next
Suppression list actions
  • Description
  • Step 1 - creating profiles export task
    • Request URL
    • Request parameters
    • Request example
    • Response example
    • Response parameters
  • Step 2 - checking export status and getting link
    • Request URL
    • Request parameters
    • Request example
    • Response example
    • Response parameters
  • Step 3 - downloading result file
© 2015 - 2025 Altcraft, LLC. All rights reserved.