Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

TaskRouter: REST API Reference


TaskRouter's REST API enables you to interact with TaskRouter resources from your server-side applications.


Base URL

base-url page anchor

All TaskRouter URLs referenced in the documentation have the following base: https://taskrouter.twilio.com.

All Twilio REST APIs are served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.


The TaskRouter REST API exposes the following subresources. You can read about these resources and some common TaskRouter development tasks below:

  • Workspaces are containers for your TaskRouter objects. All of your Tasks, Workers, Workflows and Queues are contained within a Workspace. Each account can have multiple Workspaces.
  • Workers are entities that process tasks, like agents in a call center, or the support staff on a support team.
  • Activities describe what Workers are doing and whether they are ready to accept a new task assignment. TaskRouter provides a set of default Activities, but you can customize the list if you need more granular reporting.
  • Task Channels provide a mechanism to separate tasks of different types. Workers can be specified to have different concurrent capacity for tasks of each type.
  • Task Queues distribute tasks to workers, and collect statistics about task distribution. You can manage Queues through the Task Queues resource.
  • Workflows route tasks to the appropriate queues, and set rules for each task's prioritization and escalation. Learn how to create, update, and configure Workflows through the Workflow resource.
  • Tasks are the individual pieces of work managed by the system. You add, remove, and update Tasks in TaskRouter through the Task resource.
  • Statistics give you realtime and historical information about the performance of workers and taskqueues in your TaskRouter environment.
  • Events provide a feed of activity about changes taking place in a given Workspace.

We encourage you to build your solution using REST API: Best Practices, such as retries with exponential backoff to properly handle the API response Error 429 "Too Many Requests"(link takes you to an external page), in case your application has to handle spikes in volumes or unexpected usage patterns.

When API rate limits are calculated, they are averaged over 10 seconds. This calculation method means that our REST APIs can handle rate spikes as long as the average number of requests over 10 seconds remains within the per-second rate limit.


Rate this page: