POST / dnc/scrub
Base URL: https://backend.easify.app/api/v3
This endpoint scrubs US phone numbers against the Do Not Call (DNC) registry and returns the DNC status of each number.
Only US phone numbers are supported. Any number that is not a valid US number is skipped (marked as invalid) and is not charged. Credits are deducted only for valid US numbers that are scrubbed; invalid numbers are not charged.
There is a rate limit of 15 requests per minute. If you exceed this limit, you will receive a 429 Too Many Requests status, along with a message indicating when you can try again.
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 >>
Request Body
| phone string |
A single US phone number to scrub. Must be at least 10 characters (Cannot be used together with phones) |
Required
without phones
|
| phones array |
An array of US phone numbers to scrub in bulk. (A maximum of 3000 numbers are allowed in the array. Cannot be used together with phone) |
Required
without phone
|
Response Fields
Each scrubbed number returns the following fields:
| phone_number string | The phone number exactly as it was supplied in the request. |
| status string |
The DNC status of the number. One of:
|
| number_type string | The line type of the number (e.g., mobile, landline) |
| reason string | null | The reason for the status. |
| source string | Indicates where the result came from — api for numbers checked against the registry, or validation for numbers rejected during validation. |
Sample Request and Success Response (Single):
Request
{
"phone": "+1773638****"
}
Success Response:
{
"status": true,
"message": "DNC scrub result",
"data": {
"phone_number": "+1773638****",
"status": "clean",
"number_type": "mobile",
"reason": null,
"source": "api"
}
}
Sample Request and Success Response (Bulk):
Request
{
"phones": ["8943435***", "1234567***", "+1773628****"]
}
Success Response:
{
"status": true,
"message": "DNC scrub results",
"data": {
"total_requested": 3,
"valid_processed": 1,
"invalid_skipped": 2,
"results": [
{
"phone_number": "8943435***",
"status": "invalid",
"number_type": "Invalid",
"reason": "Invalid US phone number",
"source": "validation"
},
{
"phone_number": "1234567***",
"status": "invalid",
"number_type": "Invalid",
"reason": "Invalid US phone number",
"source": "validation"
},
{
"phone_number": "+1773628****",
"status": "clean",
"number_type": "mobile",
"reason": null,
"source": "api"
}
]
}
}
- The total_requested field is the total number of numbers in the request, valid_processed is the count of valid US numbers that were scrubbed, and invalid_skipped is the count of numbers that were skipped as invalid.
Api Response Status
| Case | Status Code | Response |
|---|---|---|
| If the user does not provide a token in the header or provides an invalid token | 401 |
{
"status":false,
"message":"Unauthenticated",
"errors":[]
}
|
| If the user's account is inactive | 403 |
{
"status": false,
"message": "Your account is currently inactive. Please contact support.",
"errors": []
}
|
| If the user's subscription has ended | 402 |
{
"status":false,"message":"You need to recharge your account to proceed","errors":[]
}
|
| If the user does not have enough credits for DNC scrubbing | 400 |
{
"status": false,
"message": "Sorry, you do not have enough credits for DNC scrubbing. Please recharge to continue.",
"errors": []
}
|
| If neither phone nor phones is provided | 422 |
{
"message": "The phone field is required when phones is not present.",
"errors": {
"phone": ["The phone field is required when phones is not present."]
}
}
|
| If both phone and phones are provided together | 422 |
{
"message": "The phone field prohibits phones from being present.",
"errors": {
"phone": ["The phone field prohibits phones from being present."]
}
}
|
| If the phones array contains more than 3000 numbers | 422 |
{
"message": "The phones field must not have more than 3000 items.",
"errors": {
"phones": ["The phones field must not have more than 3000 items."]
}
}
|
| If too many requests are made concurrently for the same user | 429 |
{
"status": false,
"message": "Too many concurrent requests. Please try again later.",
"errors": []
}
|
| If an unexpected error occurs while processing the request (any deducted credits are refunded) | 500 |
{
"status": false,
"message": "An error occurred while processing the DNC scrub request. Please try again later.",
"errors": []
}
|
PHP-cURL
php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://backend.easify.app/api/v3/dnc/scrub',
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(
'phones[]' => '+1773638****'
),
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Bearer 1260|b9eb1d4f-8a6f-47eb-83fb-c155afc2****'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;