# List Unterminated Tasks

Reads unterminated task from Twilio API. (This essentially proxies Twilio's
Task API).

Note that paging works differently on this endpoint in order for compatibility
with the Twilio API—but you can still use nextUrl and previousUrl

An "unterminated" task is an "active" task—or any task which has yet to have its
task assignment status set to completed or canceled. See: https://www.twilio.com/docs/taskrouter/lifecycle-task-state

Endpoint: GET /companies/{companyId}/twilio-unterminated-tasks
Version: 2025-03-26
Security: oauth2, bearerAuth, apiKeyHeader

## Path parameters:

  - `companyId` (string, required)
    The unique company identifier.

## Query parameters:

  - `include` (array)
    Fields to include in the response.

If reservation include information on the task's current reservation in the field reservation
    Enum: "reservation"

  - `sortBy` (array)
    The data attributes by which to sort the results.

  - `taskQueueSid` (string)
    The SID of the TaskQueue with the Tasks to read.

  - `assignmentStatus` (array)
    The assignment status of the

Note that the assignment status cannot be completed or canceled because
"unterminated" tasks are never completed or canceled—by definition tasks
of that status are "terminated".
    Enum: "pending", "reserved", "assigned", "wrapping"

  - `taskType` (array)
    Only display tasks matching any these task types
    Enum: "answerInboundVoiceCall", "handleInboundInteraction", "handleUnboundInboundInteraction", "makeScheduledCall", "replyToNewConvo", "replyToNewText", "replyToNewWebChat", "replyToAbandonedWebChat", "reviewEscalatedCaseAgent", "reviewEscalatedCaseAgentUrgent", "reviewEscalatedCaseTeam", "reviewEscalatedCaseTeamUrgent", "reviewDocumentUpload", "reviewSnoozedCase", "reviewAutoCreatedCase", "reviewAutoUpdatedCase", "reviewCaseInstructions", "reviewVoicemail", "smartReviewCase"

  - `caseType` (array)
    Only display tasks with a case with a matching any of these case type
    Enum: "generic", "bankruptcy", "ceaseCommunication", "collection", "deceased", "disputeOfDebt", "federalEmergency", "identityTheft", "legalAction", "militaryDuty", "debtValidation", "oFACSanctionedIndividual", "disputeOfPurchase", "creditBureauDispute"

  - `caseId` (array)
    Only display tasks with a case ID which matches any of these case IDs

  - `supercaseId` (array)
    Only display tasks with a supercase ID which matches any of these supercase IDs

  - `interactionId` (array)
    Only display tasks with an interaction ID which matches any of these interaction IDs

  - `unableToComplete` (boolean)
    If true, only display tasks which were created by an agent clicking "Unable to Complete".
If false, display only other tasks.

  - `taskAttrMatchExpr` (string)
    A Taskrouter expression to use for matching the task by task attributes.

This field's syntax must conform to the Twilio "TaskRouter Expression" syntax[1].

[1] https://www.twilio.com/docs/taskrouter/expression-syntax

  - `hasCase` (boolean)
    Only display tasks which have a case associated with them.

  - `hasCaseOwner` (boolean)
    Only display tasks which has a case with an owner when the task was published.

(Note that this filters based on the data in the task object, which represents the state of the
case at the moment the task was published.)

## Response 200 fields (application/json):

  - `data` (array)

  - `data.account_sid` (string)
    The unique identifier for the Twilio account.

  - `data.addons` (string)
    Currently unused.

  - `data.age` (integer)
    Time since this task was created in seconds.

  - `data.assignment_status` (string)
    Enum: "pending", "reserved", "assigned", "wrapping", "completed", "canceled"

  - `data.attributes` (any)

  - `data.date_created` (string)
    The date and time the task was created. (Potentially this differs from the task_init_at field in 
the task's attributes, since when a task is re-created via the "Unable To Complete" functionality, 
this value will be the time the task was re-created.)

  - `data.date_updated` (string)

  - `data.priority` (integer)
    The priority of the task. A higher priority task jumps the queue ahead of lower priority tasks.
By default, tasks have a priority of 0. For example, inbound texts and chats may be configured
to have a higher priority. And usually, calls will have an even higher priority.

  - `data.reason` (string,null)
    Reason for task cancellation or completion, if applicable.

  - `data.reservation` (string,null)

  - `data.sid` (string)
    The unique identifier for the task.

  - `data.task_channel_sid` (string)
    The SID of the channel this task is associated with.

  - `data.task_channel_unique_name` (string)
    The unique name of the channel this task is associated with.

  - `data.task_queue_entered_date` (string)
    The date and time the task entered the queue.

  - `data.task_queue_friendly_name` (string)
    A human-readable name for the task queue.

  - `data.task_queue_sid` (string)
    The SID of the queue this task is associated with.

  - `data.timeout` (integer)
    The timeout value in seconds for task assignment. After this time, the task will be reassigned
to another agent.

  - `data.workflow_friendly_name` (string)
    A human-readable name for the workflow.

  - `data.workflow_sid` (string)
    The SID of the workflow this task is associated with.

  - `data.workspace_sid` (string)
    The SID of the workspace this task belongs to.


