Rate this page:

TaskRouter: REST API Reference

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

Base URL

All TaskRouter URLs referenced in the documentation have the following base:

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

REST API Best Practices

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", in case your application has to handle spikes in volumes or unexpected usage patterns.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

Loading Code Sample...

        Thank you for your feedback!

        Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!