/v1/accounts/{accountId}/blackLists/{blackListId}/numbersAdds one or more numbers to a black list. Numbers that are already in the black list are skipped.
ID of your SIP Caller account. See Account ID.
ID of the black list.
A JSON array of objects, one for each number to add. A single object is also accepted.
Phone number to block. Separators such as spaces, dashes, dots and parentheses are allowed and removed, for example +1 (555) 123-9000. It must contain between 3 and 50 digits.
Optional description, up to 255 characters, such as the reason why the number was added.
Returns an array with the black list number objects added. Skipped numbers are not included, so the array is empty if all the numbers were already in the black list.
/v1/accounts/ACCOUNT_ID/blackLists/BLACK_LIST_ID/numbers
curl -X POST 'https://api.sipcaller.com/v1/accounts/ACCOUNT_ID/blackLists/BLACK_LIST_ID/numbers' \
-H 'Authorization: Bearer API_KEY_TOKEN' \
-H 'Content-Type: application/json' \
-d '[
{
"number": "+18005551234",
"description": "Asked not to be called again"
}
]'Response
200 OK
[
{
"id": 21,
"number": "+18005551234",
"description": "Asked not to be called again"
}
]