Deletes all numbers associated with a phone number block
POST/phone_number_blocks/jobs/delete_phone_number_block
Creates a new background job to delete all the phone numbers associated with the given block. We will only consider the phone number block as deleted after all phone numbers associated with it are removed, so multiple executions of this job may be necessary in case some of the phone numbers present errors during the deletion process.
Request
- application/json
Body
required
phone_number_block_id stringrequired
Responses
202: Phone number blocks job delete phone numbers requested.
- application/json
default: Unexpected error
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/phone_number_blocks/jobs/delete_phone_number_block' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"phone_number_block_id": "f3946371-7199-4261-9c3d-81a0d7935146"
}'
Response samples
{
"data": {
"id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7",
"record_type": "phone_numbers_job",
"status": "pending",
"type": "delete_phone_number_block",
"etc": "2020-10-30T18:10:00.000Z",
"created_at": "2020-10-23T18:10:00.000Z",
"updated_at": "2020-10-23T18:10:01.000Z",
"successful_operations": [],
"failed_operations": []
}
}
{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "string"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}