Tasks

Tasks are used to track work that needs to be done by agents in the CRM. Tasks are automatically assigned to agents based on configurable characteristics of the agents and the tasks.

List Terminated Tasks

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
companyId
required
string

The unique company identifier.

Responses
200

Success

get/companies/{companyId}/twilio-terminated-tasks

Get Terminated Task by ID

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
companyId
required
string

The unique company identifier.

taskHistoryId
required
string

The id or sid of the terminated task

Responses
200

Success

get/companies/{companyId}/twilio-terminated-tasks/{taskHistoryId}

Clone Terminated Task by ID

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
companyId
required
string

The unique company identifier.

taskHistoryId
required
string

The id or sid of the terminated task

Responses
200

Success

post/companies/{companyId}/twilio-terminated-tasks/{taskHistoryId}/clone

Get information on Twilio task queues

Get information on task queues such as friendly name and task statistics.

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
companyId
required
string

The unique company identifier.

Responses
200

Success

get/companies/{companyId}/twilio-queues
Response samples
application/json
[
  • {
    }
]

Update task type availability

Securityoauth2 or bearerAuth or apiKeyHeader
Request
Request Body schema: application/json
required
availableByUserConfig
object
Responses
200

ok

put/twilio/tasktype-availability
Request samples
application/json
{
  • "availableByUserConfig": { }
}
Response samples
application/json
{
  • "status": 0,
  • "message": "string",
  • "data": {
    }
}

Get task availability

Securityoauth2 or bearerAuth or apiKeyHeader
Responses
200

Success

get/twilio/tasktype-availability
Response samples
application/json
{
  • "status": 0,
  • "message": "string",
  • "data": {
    }
}

List Taskrouter Workers

List all Taskrouter Workers.

Note that this endpoint returns all Twilio workers up to 10,000—i.e., there is no paging. It may suffer from poor performance for large numbers of workers.

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
companyId
required
string

The unique company identifier.

query Parameters
include
Array of strings

Extra fields to include in the response.

  • statsToday: include the statsToday field with statistical information about the given workers since the start of "today" (from the worker's company's configured timezone).
Items Value: "statsToday"
Responses
200

Success

get/companies/{companyId}/twilio-workers
Response samples
application/json
{ }

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

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
companyId
required
string

The unique company identifier.

query Parameters
include
Array of strings

Fields to include in the response.

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

Items Value: "reservation"
sortBy
Array of strings

The data attributes by which to sort the results.

taskQueueSid
string

The SID of the TaskQueue with the Tasks to read.

assignmentStatus
Array of strings

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".

Items Enum: "pending" "reserved" "assigned" "wrapping"
taskType
Array of strings (TaskType)

Only display tasks matching any these task types

Items Enum: "answerInboundVoiceCall" "handleInboundInteraction" "handleUnboundInboundInteraction" "makeScheduledCall" "replyToNewConvo" "replyToNewText" "replyToNewWebChat" "replyToAbandonedWebChat" "reviewEscalatedCaseAgent" "reviewEscalatedCaseAgentUrgent" "reviewEscalatedCaseTeam" "reviewEscalatedCaseTeamUrgent" "reviewDocumentUpload" "reviewSnoozedCase" "reviewAutoCreatedCase" "reviewAutoUpdatedCase" "reviewCaseInstructions" "reviewVoicemail" "smartReviewCase"
caseType
Array of strings (BaseCaseType)

Only display tasks with a case with a matching any of these case type

Items Enum: "generic" "bankruptcy" "ceaseCommunication" "collection" "deceased" "disputeOfDebt" "federalEmergency" "identityTheft" "legalAction" "militaryDuty" "debtValidation" "oFACSanctionedIndividual" "disputeOfPurchase" "creditBureauDispute"
caseId
Array of strings

Only display tasks with a case ID which matches any of these case IDs

supercaseId
Array of strings

Only display tasks with a supercase ID which matches any of these supercase IDs

interactionId
Array of strings

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.)

Responses
200

Success

get/companies/{companyId}/twilio-unterminated-tasks
Response samples
application/json
{
  • "data": [
    ]
}

Bulk Delete Unterminated Tasks

Bulk delete unterminated tasks from Twilio API. (this proxy's Twilio's Task API).

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

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
companyId
required
string

The unique company identifier.

Request Body schema: application/json
required
taskSids
Array of strings

List of task SIDs to delete.

Responses
200

Success

delete/companies/{companyId}/twilio-unterminated-tasks
Request samples
application/json
{
  • "taskSids": [
    ]
}
Response samples
application/json
{
  • "status": 0,
  • "message": "string"
}

Read Unterminated Task by SID

Read's the specified unterminated task from Twilio API (this proxy's Twilio's Task API).

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

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
companyId
required
string

The unique company identifier.

taskSid
required
string

The sid of the task

Responses
200

Success

get/companies/{companyId}/twilio-unterminated-tasks/{taskSid}
Response samples
application/json
{
  • "data": {
    }
}

Deletes Unterminated Task by SID

Delete the unterminated task from Twilio API (this proxy's Twilio's Task API).

The deleted task immediately has its assignment status transition to canceled. This also generates the Twilio event task.deleted.

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

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
companyId
required
string

The unique company identifier.

taskSid
required
string

The sid of the task

Responses
200

Success

delete/companies/{companyId}/twilio-unterminated-tasks/{taskSid}
Response samples
application/json
{
  • "status": 0,
  • "message": "string"
}

Abandon Unterminated Task by SID

Abandon an unterminated, accepted task. i.e., Mark the task as "Unable to Complete" and create a duplicate task.

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

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
companyId
required
string

The unique company identifier.

taskSid
required
string

The sid of the task

Responses
200

Success

400

Failed to abandon task

post/companies/{companyId}/twilio-unterminated-tasks/{taskSid}/abandon