Block List
Manage an agent block list through the frontend API using API-key authentication.
GET
List blocked phone numbers
Manage blocked phone numbers for an agent. This endpoint allows you to retrieve, add, and remove phone numbers from an agent’s block list.
Endpoint:
Headers:
Error Responses:
Endpoint:
Headers:
Parameters:
Response Fields:
Endpoint:
Headers:
Parameters:
Response Fields:
POST - Add numbers to block list:
DELETE - Remove numbers from block list:
GET - List Blocked Phone Numbers
Retrieves the list of blocked phone numbers for a specific agent. Method:GETEndpoint:
/api/agent-block-listHeaders:
X-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
400 Bad Request: Invalid search params (missing uid or agentId)401 Unauthorized: Invalid or missing API key, or insufficient permissions500 Internal Server Error: Server error
POST - Add Phone Numbers to Block List
Adds phone numbers to an agent’s block list. Method:POSTEndpoint:
/api/agent-block-listHeaders:
X-Authorization: Your API key (required)Content-Type:application/json
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(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 reasonnumber(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 error
DELETE - Remove Phone Numbers from Block List
Removes phone numbers from an agent’s block list. Method:DELETEEndpoint:
/api/agent-block-listHeaders:
X-Authorization: Your API key (required)Content-Type:application/json
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(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 reasonnumber(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 error
Example
GET - List blocked numbers:Notes
- Phone numbers must be in valid format (E.164 format recommended, e.g.,
+1234567890) - Phone numbers are validated before being added to the block list
- Duplicate numbers will be rejected when adding
- Only numbers that exist in the block list can be removed
- The API returns both successful and failed operations, allowing you to handle partial failures gracefully
Previous
Get OrganizationsReturn the organizations accessible to the current API-key-authenticated frontend user.
Next
List blocked phone numbers

