curl --request GET \
--url https://app.phonely.ai/api/agent-block-list \
--header 'X-Authorization: <api-key>'{
"blockList": [
"<string>"
]
}Manage an agent block list through the frontend API using API-key authentication.
curl --request GET \
--url https://app.phonely.ai/api/agent-block-list \
--header 'X-Authorization: <api-key>'{
"blockList": [
"<string>"
]
}GET/api/agent-block-listX-Authorization: Your API key (required)uid (string, required): Your user IDagentId (string, required): The ID of the agent whose block list you want to retrieve{
"blockList": ["+1234567890", "+0987654321"]
}
400 Bad Request: Invalid search params (missing uid or agentId)401 Unauthorized: Invalid or missing API key, or insufficient permissions500 Internal Server Error: Server errorPOST/api/agent-block-listX-Authorization: Your API key (required)Content-Type: application/json{
"uid": "string",
"agentId": "string",
"numbers": ["+1234567890", "+0987654321"]
}
uid (string, required): Your user IDagentId (string, required): The ID of the agentnumbers (string[], required): Array of phone numbers to add to the block list{
"message": "Block list updated successfully",
"added": ["+1234567890"],
"failed": [
{
"number": "+0987654321",
"reason": "Number already in block list"
}
]
}
message (string): Success messageadded (string[]): Array of phone numbers that were successfully addedfailed (array): Array of objects containing numbers that failed to be added and the reason
number (string): The phone number that failedreason (string): Reason for failure (e.g., “Invalid phone number format”, “Number already in block list”)400 Bad Request: Invalid request body or numbers parameter401 Unauthorized: Invalid or missing API key, or insufficient permissions500 Internal Server Error: Server errorDELETE/api/agent-block-listX-Authorization: Your API key (required)Content-Type: application/json{
"uid": "string",
"agentId": "string",
"numbers": ["+1234567890", "+0987654321"]
}
uid (string, required): Your user IDagentId (string, required): The ID of the agentnumbers (string[], required): Array of phone numbers to remove from the block list{
"message": "Block list updated successfully",
"removed": ["+1234567890"],
"failed": [
{
"number": "+0987654321",
"reason": "Number not found in block list"
}
]
}
message (string): Success messageremoved (string[]): Array of phone numbers that were successfully removedfailed (array): Array of objects containing numbers that failed to be removed and the reason
number (string): The phone number that failedreason (string): Reason for failure (e.g., “Number not found in block list”)400 Bad Request: Invalid request body or numbers parameter401 Unauthorized: Invalid or missing API key, or insufficient permissions500 Internal Server Error: Server errorcurl -X GET "https://app.phonely.ai/api/agent-block-list?uid=user123&agentId=agent456" \
-H "X-Authorization: your-api-key"
curl -X POST "https://app.phonely.ai/api/agent-block-list" \
-H "X-Authorization: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"uid": "user123",
"agentId": "agent456",
"numbers": ["+1234567890", "+0987654321"]
}'
curl -X DELETE "https://app.phonely.ai/api/agent-block-list" \
-H "X-Authorization: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"uid": "user123",
"agentId": "agent456",
"numbers": ["+1234567890"]
}'
+1234567890)