curl --request POST \
--url https://api.agents.timepay.ai/api/v1/blacklist/bulk/add \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
--data '[
{
"number": "8249752556",
"name": "Bob Smith"
},
{
"number": "9920967932"
}
]'
{
"success": true,
"message": "Numbers have been added to blacklist"
}
{
"success": false,
"message": "Request body must be a non-empty array of objects."
}
{
"success": false,
"message": "Each item must contain a 'number' field."
}
{
"success": false,
"error": "Unauthorized",
"message": "Missing or invalid authorization header"
}
{
"success": false,
"error": "Forbidden",
"message": "You don't have the required permission to perform this action"
}
{
"success": false,
"message": "An unexpected server error occurred."
}
Blacklist
Add to Blacklist
Add multiple phone numbers to your organization’s blacklist to prevent the AI agent from contacting them.
curl --request POST \
--url https://api.agents.timepay.ai/api/v1/blacklist/bulk/add \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
--data '[
{
"number": "8249752556",
"name": "Bob Smith"
},
{
"number": "9920967932"
}
]'
{
"success": true,
"message": "Numbers have been added to blacklist"
}
{
"success": false,
"message": "Request body must be a non-empty array of objects."
}
{
"success": false,
"message": "Each item must contain a 'number' field."
}
{
"success": false,
"error": "Unauthorized",
"message": "Missing or invalid authorization header"
}
{
"success": false,
"error": "Forbidden",
"message": "You don't have the required permission to perform this action"
}
{
"success": false,
"message": "An unexpected server error occurred."
}
Headers
string
required
Bearer token for authentication (e.g.,
Bearer <your_token>).string
Optional. Use this header only when the authenticated user belongs to multiple organizations. It identifies the organization to target for this action.
Body Parameters
The request body should be a non-empty array of objects.Automatic Name Resolution: If you omit the
name field or provide an empty string, the system will automatically search your organization’s latest logs for the most recent name associated with that phone number and use it for the blacklist entry.array[]
required
curl --request POST \
--url https://api.agents.timepay.ai/api/v1/blacklist/bulk/add \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
--data '[
{
"number": "8249752556",
"name": "Bob Smith"
},
{
"number": "9920967932"
}
]'
Response
boolean
Indicates whether the request was successful.
string
A descriptive message about the result.
{
"success": true,
"message": "Numbers have been added to blacklist"
}
{
"success": false,
"message": "Request body must be a non-empty array of objects."
}
{
"success": false,
"message": "Each item must contain a 'number' field."
}
{
"success": false,
"error": "Unauthorized",
"message": "Missing or invalid authorization header"
}
{
"success": false,
"error": "Forbidden",
"message": "You don't have the required permission to perform this action"
}
{
"success": false,
"message": "An unexpected server error occurred."
}
Error Codes
| Status | Description |
|---|---|
400 | Validation error or phone number is missing |
401 | Unauthorized - missing or invalid authorization header |
403 | Forbidden - insufficient permission to perform this action |
500 | Internal server error |

