Number Blocks Background Jobs API

Background jobs performed over a phone-numbers block's phone numbers using API

Lists the phone number blocks jobs

SecuritybearerAuth
Request
query Parameters
filter[type]
string

Filter the phone number blocks jobs by type.

Value: "delete_phone_number_block"
Example: filter[type]=delete_phone_number_block
filter[status]
string

Filter the phone number blocks jobs by status.

Enum: "pending" "in_progress" "completed" "failed"
Example: filter[status]=in_progress
page[number]
integer >= 1
Default: 1

The page number to load

page[size]
integer [ 1 .. 250 ]
Default: 20

The size of the page

sort
string

Specifies the sort order for results. If not given, results are sorted by created_at in descending order.

Value: "created_at"
Example: sort=created_at
Responses
200

Successful response with a list of phone number blocks background jobs.

Response Schema: application/json
Array of objects (PhoneNumberBlocksJob)
object (PaginationMeta)
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
get/phone_number_blocks/jobs
Request samples
Response samples
application/json
{
  • "data": [
    • {
      • "created_at": "2020-10-23T18:10:00.000Z",
      • "etc": "2020-10-30T18:10:00.000Z",
      • "failed_operations": [ ],
      • "id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7",
      • "record_type": "phone_numbers_job",
      • "status": "pending",
      • "successful_operations": [ ],
      • "type": "delete_phone_number_block",
      • "updated_at": "2020-10-23T18:10:01.000Z"
      }
    ],
  • "meta": {
    • "page_number": 2,
    • "page_size": 25,
    • "total_pages": 3,
    • "total_results": 55
    }
}

Deletes all numbers associated with a 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.

SecuritybearerAuth
Request
Request Body schema: application/json
required
phone_number_block_id
required
string
Responses
202

Phone number blocks job delete phone numbers requested.

Response Schema: application/json
object (PhoneNumberBlocksJob)
created_at
string

ISO 8601 formatted date indicating when the resource was created.

etc
string <date-time>

ISO 8601 formatted date indicating when the estimated time of completion of the background job.

Array of objects (PhoneNumberBlocksJobFailedOperation)
id
string <uuid>

Identifies the resource.

record_type
string

Identifies the type of the resource.

status
string
Default: "pending"

Indicates the completion status of the background operation.

Enum: "pending" "in_progress" "completed" "failed"
Array of objects (PhoneNumberBlocksJobSuccessfulOperation)
type
string

Identifies the type of the background job.

Value: "delete_phone_number_block"
updated_at
string

ISO 8601 formatted date indicating when the resource was updated.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
post/phone_number_blocks/jobs/delete_phone_number_block
Request samples
application/json
{
  • "phone_number_block_id": "f3946371-7199-4261-9c3d-81a0d7935146"
}
Response samples
application/json
{
  • "data": {
    • "created_at": "2020-10-23T18:10:00.000Z",
    • "etc": "2020-10-30T18:10:00.000Z",
    • "failed_operations": [ ],
    • "id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7",
    • "record_type": "phone_numbers_job",
    • "status": "pending",
    • "successful_operations": [ ],
    • "type": "delete_phone_number_block",
    • "updated_at": "2020-10-23T18:10:01.000Z"
    }
}

Retrieves a phone number blocks job

SecuritybearerAuth
Request
path Parameters
id
required
string

Identifies the Phone Number Blocks Job.

Responses
200

Phone number blocks job details.

Response Schema: application/json
object (PhoneNumberBlocksJob)
created_at
string

ISO 8601 formatted date indicating when the resource was created.

etc
string <date-time>

ISO 8601 formatted date indicating when the estimated time of completion of the background job.

Array of objects (PhoneNumberBlocksJobFailedOperation)
id
string <uuid>

Identifies the resource.

record_type
string

Identifies the type of the resource.

status
string
Default: "pending"

Indicates the completion status of the background operation.

Enum: "pending" "in_progress" "completed" "failed"
Array of objects (PhoneNumberBlocksJobSuccessfulOperation)
type
string

Identifies the type of the background job.

Value: "delete_phone_number_block"
updated_at
string

ISO 8601 formatted date indicating when the resource was updated.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
get/phone_number_blocks/jobs/{id}
Request samples
Response samples
application/json
{
  • "data": {
    • "created_at": "2020-10-23T18:10:00.000Z",
    • "etc": "2020-10-30T18:10:00.000Z",
    • "failed_operations": [ ],
    • "id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7",
    • "record_type": "phone_numbers_job",
    • "status": "pending",
    • "successful_operations": [ ],
    • "type": "delete_phone_number_block",
    • "updated_at": "2020-10-23T18:10:01.000Z"
    }
}