POST / blacklist-contacts/import
Base URL: https://backend.easify.app/api/v3
The endpoint allows users to add numbers to the blacklist.
To prevent abuse, there is a rate limit of 15 requests per minute per user. If you exceed this limit, you will receive a 429 Too Many Requests status with a message indicating when you can try again.
The import process will run in the background. You can check its status using the blacklist-contacts/import/details API.
Authentication
The Easify API token used for authentication is passed in the header as a Bearer token, which can be obtained from the Easify app under Settings > API Settings.
Headers
Authorization string required Bearer << YOUR_EASIFY_API_TOKEN_HERE >>
Query Parameters
file file |
CSV File containing numbers to be blacklisted (Max Size: 2MB) Download Sample File |
Required |
Success Response:
{
"status": true,
"message": "Blacklist Contact import on progress",
"data": {
"id": 1,
"file_name": "blacklist-contacts.csv",
"status": "In Progress",
"progress_percentage": 0,
"total_count": 10000,
"skipped_count": 0,
"stored_count": 0,
"created_at": "07-22-2025 04:48:11 AM"
}
}
Api Response Status
Case | Status Code | Response |
---|---|---|
If the user provides an invalid Easify API token or does not pass the Easify API token in the header. | 401 |
{
"status":false,
"message":"Unauthenticated",
"errors":[]
}
|
If the user exceeds the allowed rate limit for requests | 429 |
{
"status":false,
"message":"Too many requests. Try again in 59 seconds",
"errors":[]
}
|
If the user's subscription has ended | 402 |
{
"status":false,"message":"You need to recharge your account to proceed","errors":[]
}
|
If the uploaded file not a valid CSV file | 422 |
{
"message": "The file field must be a file of type: text/csv, text/plain",
"errors": {
"file": [
"The file field must be a file of type: text/csv, text/plain."
]
}
}
|
If the uploaded file size exceeds 2MB | 422 |
{
"message": "The file field must not be greater than 2048 kilobytes.",
"errors": {
"file": [
"The file field must not be greater than 2048 kilobytes."
]
}
}
|
If the uploaded file doesn't follow the structure of the sample file. | 400 |
{
"status": false,
"message": "Failed to import Blacklist contacts. Please check the CSV file and try again.",
"errors": []
}
|
PHP-cURL
php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://backend.easify.app/api/v3/blacklist-contacts/import',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('file'=> new CURLFILE('/blacklist-contacts.csv')),
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Bearer '
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;