Skip to main content

Task Object

This section describes the elements of the batch task object.

Task Object Attributes

These fields and values make up the JSON object that gets returned with successful requests.

AttributeData TypeDescription
dataarray of objects

The payload for this request. This field should be empty for DELETE.

date_created
read only
string

The date and time when the task was created.

date_modified
read only
string

The date and time when the task was modified.

entriesarray

This is based on field. Determines the existing entry. This value should be empty for POST.

failure
read only
integer

The count of unsuccessful operations.

fieldstring

The field used to determine the existing entry. This value only applies to the PATCH and DELETE methods. The value should be empty for POST.

methodstring

The method used for the request, either POST, PATCH, or DELETE.

partner_sid
read only
string

The secure ID of the partner associated with the task.

processed
read only
integer

The count of processed operations.

reviewboolean

Whether the task needs reviewing.

statusstring

The status for the current task. Refer to the table below for a comprehensive list of statuses.

success
read only
integer

The count of successful operations.

task_sid
read only
string

The task secure ID.

total
read only
integer

The total count of operations.

typestring

The type of task, either phonenumber, prefix or file.

status

ValueDescription
approvedThe task has been approved and will execute.
cancelledThe task has been cancelled and will not execute.
completedThe task is completed.
createdThe batch of objects has been created.
pending_reviewThe task is pending review and has not been executed.
queuedThe task is in queue.
runningThe task is currently running.

Sample Task object

{
"data": {
"trunk_group_sid": "b30a3dbb-3708-41f0-a9ca-5cf365dcc4d4"
},
"date_created": "2024-10-30T20:47:32.517Z",
"date_modified": "2024-10-30T20:47:32.517Z",
"entries": [
"18053355112",
"18053355280"
],
"error_details": [],
"failure": null,
"field": "phonenumber",
"method": "PATCH",
"partner_sid": "923840ce-0b63-44a9-b4ce-09dc4181fb9d",
"processed": null,
"review": true,
"status": "created",
"success": null,
"task_sid": "2d9e546e-634b-4f6b-97ca-c2158163540c",
"total": null,
"type": "phonenumber"
}