Twilio Workspaces API
The Workspaces API from Twilio — 36 operation(s) for workspaces.
Operations 60
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
GET
/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}
Look up one worker activity state · Fetch activity
#
Ask an LLM
“What are the details of a single TaskRouter activity like Offline or Break?”
“Can I check whether a specific activity makes agents available for tasks?”
Tell an agent
Show me activity {activity} in workspace {workspace}.
Tell me whether activity {activity} in {workspace} counts as available.
Ask an LLM
“Can I rename an existing TaskRouter activity without recreating it?”
“Is there a length limit on an activity's friendly name when I change it?”
Tell an agent
Rename activity {activity} in workspace {workspace} to {name}.
Change the label on existing activity {activity} in {workspace}.
Ask an LLM
“How do I remove an activity state my agents no longer use?”
“What happens when I delete a TaskRouter activity from a workspace?”
Tell an agent destructive · confirm first
Delete activity {activity} from workspace {workspace}.
Remove the unused activity state {activity} in {workspace}.
GET
/v1/Workspaces/{WorkspaceSid}/Activities
List the activity states in a workspace · List activity
#
Ask an LLM
“Which activity states are defined in my TaskRouter workspace?”
“Can I list only the activities that make workers available for tasks?”
Tell an agent
List every activity defined in workspace {workspace}.
Show only activities in {workspace} where availability is {available}.
POST
/v1/Workspaces/{WorkspaceSid}/Activities
Create a new worker activity state · Create activity
#
Ask an LLM
“How do I add a new agent status like Lunch to my TaskRouter workspace?”
“Can I make a new activity that keeps workers from receiving tasks?”
Tell an agent
Create an activity called {name} in workspace {workspace}.
Add activity {name} to {workspace} with available set to {available}.
Ask an LLM
“What exactly happened in one specific TaskRouter event?”
“Can I pull the full record of a single event by its ID?”
Tell an agent
Show me event {event} from workspace {workspace}.
Get the details of TaskRouter event {event} in {workspace}.
Ask an LLM
“Where can I see the audit trail of what happened to tasks and workers in a workspace?”
“Can I filter workspace events to a single worker or a date range?”
Tell an agent
List events in workspace {workspace} from the last {minutes} minutes.
Show all events for task {task} in workspace {workspace}.
Ask an LLM
“What is the current status and priority of a specific task in TaskRouter?”
“Can I see the attributes attached to a single task?”
Tell an agent
Show me task {task} in workspace {workspace}.
Check the assignment status of task {task} in {workspace}.
Ask an LLM
“How do I mark a TaskRouter task as completed with a reason?”
“Can I bump the priority of a task that is already waiting in a queue?”
Tell an agent
Set task {task} in workspace {workspace} to {status} because {reason}.
Raise the priority of existing task {task} in {workspace} to {priority}.
Ask an LLM
“How do I permanently remove a task from a TaskRouter workspace?”
“Can I guard a task deletion with an ETag so I don't delete a changed task?”
Tell an agent destructive · confirm first
Delete task {task} from workspace {workspace}.
Delete task {task} in {workspace} only if its ETag is still {etag}.
Ask an LLM
“Which tasks are still pending or reserved in my workspace right now?”
“Can I find tasks waiting in one particular queue?”
Tell an agent
List tasks in workspace {workspace} with status {status}.
Show the tasks waiting in queue {queue} in {workspace}.
Ask an LLM
“How do I send a new piece of work into TaskRouter to be routed to an agent?”
“Can I set a timeout so an unassigned task expires?”
Tell an agent
Create a task in workspace {workspace} with attributes {attributes}.
Create a task in {workspace} routed by workflow {workflow} at priority {priority}.
GET
/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}
Look up one task channel · Fetch task channel
#
Ask an LLM
“What are the settings of a single task channel such as voice or chat?”
“Can I check whether a task channel prefers idle workers?”
Tell an agent
Show me task channel {channel} in workspace {workspace}.
Get the configuration of task channel {channel} in {workspace}.
POST
/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}
Change a task channel's name or idle routing · Update task channel
#
Ask an LLM
“Can I turn on idle-worker prioritization for an existing task channel?”
“How do I rename a task channel I already created?”
Tell an agent
Rename task channel {channel} in {workspace} to {name}.
Set channel-optimized routing to {optimized} on existing task channel {channel} in {workspace}.
DELETE
/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}
Delete a task channel · Delete task channel
#
Ask an LLM
“How do I get rid of a task channel we stopped using?”
“What do I need to delete a custom task channel from a workspace?”
Tell an agent destructive · confirm first
Delete task channel {channel} from workspace {workspace}.
Remove the unused task channel {channel} in {workspace}.
GET
/v1/Workspaces/{WorkspaceSid}/TaskChannels
List the task channels in a workspace · List task channel
#
Ask an LLM
“Which task channels like voice, SMS or chat exist in my workspace?”
“Can I see every channel type my TaskRouter workspace supports?”
Tell an agent
List all task channels in workspace {workspace}.
Show me the channel types configured for {workspace}.
Ask an LLM
“How do I add a new channel type such as video to TaskRouter?”
“Does a new task channel need both a friendly name and a unique name?”
Tell an agent
Create task channel {name} with unique name {unique_name} in workspace {workspace}.
Add a {unique_name} channel to {workspace} labelled {name} that favours idle workers.
Ask an LLM
“What worker targeting rules does a specific task queue use?”
“Can I see the reservation and assignment activities set on one queue?”
Tell an agent
Show me task queue {queue} in workspace {workspace}.
Get the target-workers expression for queue {queue} in {workspace}.
POST
/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}
Change a task queue's targeting or ordering · Update task queue
#
Ask an LLM
“How do I change which workers an existing queue targets?”
“Can I switch a queue from first-in-first-out to last-in-first-out?”
Tell an agent
Set the target workers on existing queue {queue} in {workspace} to {expression}.
Change task ordering on queue {queue} in {workspace} to {order}.
Ask an LLM
“How do I retire a task queue we no longer route to?”
“What do I pass to delete a TaskRouter queue?”
Tell an agent destructive · confirm first
Delete task queue {queue} from workspace {workspace}.
Remove the retired queue {queue} in {workspace}.
Ask an LLM
“Which task queues are set up in my TaskRouter workspace?”
“Can I find the queues a particular worker is eligible for?”
Tell an agent
List the task queues in workspace {workspace}.
Show which queues in {workspace} worker {worker} can serve.
Ask an LLM
“How do I set up a new queue that only targets Spanish-speaking agents?”
“Can a new queue move workers into a specific activity when a task is assigned?”
Tell an agent
Create a task queue called {name} in workspace {workspace}.
Create queue {name} in {workspace} targeting workers that match {expression}.
GET
/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/CumulativeStatistics
Get a queue's totals over a time window · Fetch task queue cumulative statistics
#
Ask an LLM
“How many tasks did one queue handle, cancel or abandon over the past day?”
“Can I see a queue's wait-time totals split by thresholds like 30 and 60 seconds?”
Tell an agent
Get cumulative stats for queue {queue} in {workspace} over the last {minutes} minutes.
Show historic totals for queue {queue} in {workspace} split by wait times {thresholds}.
GET
/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/RealTimeStatistics
See what is happening in a queue right now · Fetch task queue real time statistics
#
Ask an LLM
“How many tasks are waiting in a specific queue at this moment?”
“What is the longest current wait in one queue, live?”
Tell an agent
Show live stats for queue {queue} in workspace {workspace}.
Get the current backlog of queue {queue} in {workspace} for channel {channel}.
GET
/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/Statistics
Get a queue's combined live and historic stats · Fetch task queue statistics
#
Ask an LLM
“Can I get both the live and cumulative numbers for one queue in a single call?”
“What does one queue's full statistics snapshot look like for a date range?”
Tell an agent
Get the combined real-time and cumulative stats for queue {queue} in {workspace}.
Show the full stats snapshot for queue {queue} in {workspace} from {start} to {end}.
GET
/v1/Workspaces/{WorkspaceSid}/TaskQueues/Statistics
Compare statistics across all queues · List task queues statistics
#
Ask an LLM
“Which of my queues is busiest compared with the others?”
“Can I pull statistics for every queue in a workspace at once?”
Tell an agent
List statistics for every task queue in workspace {workspace}.
Compare all queues in {workspace} over the last {minutes} minutes.
GET
/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations
List the reservations made for a task · List task reservation
#
Ask an LLM
“Which workers has a particular task been offered to so far?”
“Can I see only the rejected or timed-out reservations for one task?”
Tell an agent
List reservations for task {task} in workspace {workspace}.
Show reservations of task {task} in {workspace} with status {status}.
GET
/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}
Look up one reservation on a task · Fetch task reservation
#
Ask an LLM
“What is the status of a specific reservation offered for a task?”
“Can I look up one task reservation to see which worker it went to?”
Tell an agent
Show reservation {reservation} on task {task} in workspace {workspace}.
Get the worker and status for task {task} reservation {reservation} in {workspace}.
POST
/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}
Accept, reject or act on a task's reservation · Update task reservation
#
Ask an LLM
“How do I accept or reject a reservation starting from the task side?”
“Can I dequeue a waiting call to an agent when accepting a task reservation?”
Tell an agent
Set reservation {reservation} on task {task} in {workspace} to {status}.
Run the {instruction} instruction on task {task} reservation {reservation} in {workspace}.
Ask an LLM
“Which agents are currently available in my TaskRouter workspace?”
“Can I find the workers who are eligible for one queue?”
Tell an agent
List all workers in workspace {workspace}.
Show workers in {workspace} currently in activity {activity}.
Ask an LLM
“How do I add a new agent to TaskRouter so they can receive tasks?”
“Can I give a new worker skills and languages as attributes when I create them?”
Tell an agent
Create a worker named {name} in workspace {workspace}.
Add new worker {name} to {workspace} with attributes {attributes}.
Ask an LLM
“What activity is a specific agent in right now?”
“Can I see the skills and attributes recorded for one worker?”
Tell an agent
Show me worker {worker} in workspace {workspace}.
Get the current activity and attributes of worker {worker} in {workspace}.
POST
/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}
Change a worker's activity or attributes · Update worker
#
Ask an LLM
“How do I put an agent on break or back online?”
“Can I reject an agent's pending reservations when I change their activity?”
Tell an agent
Move worker {worker} in {workspace} to activity {activity}.
Replace the attributes of existing worker {worker} in {workspace} with {attributes}.
Ask an LLM
“How do I offboard an agent who has left the team?”
“Can I make a worker deletion conditional on an ETag?”
Tell an agent destructive · confirm first
Delete worker {worker} from workspace {workspace}.
Remove worker {worker} in {workspace} only if the ETag matches {etag}.
GET
/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels
List a worker's per-channel capacity · List worker channel
#
Ask an LLM
“How many chats versus calls can one agent handle at the same time?”
“Which channels is a specific worker available on?”
Tell an agent
List the channels for worker {worker} in workspace {workspace}.
Show every channel capacity set for worker {worker} in {workspace}.
GET
/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}
Look up a worker's capacity on one channel · Fetch worker channel
#
Ask an LLM
“What is one agent's capacity on a single channel like chat?”
“Can I check if a worker is available on one specific channel?”
Tell an agent
Show channel {channel} for worker {worker} in workspace {workspace}.
Get worker {worker}'s capacity on channel {channel} in {workspace}.
POST
/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}
Set a worker's capacity on a channel · Update worker channel
#
Ask an LLM
“How do I let an agent handle three chats at once?”
“Can I turn off one channel for a worker without changing their activity?”
Tell an agent
Set worker {worker}'s capacity on channel {channel} in {workspace} to {capacity}.
Make channel {channel} for worker {worker} in {workspace} available: {available}.
GET
/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Statistics
Get statistics for one worker · Fetch worker instance statistics
#
Ask an LLM
“How much time did one agent spend in each activity today?”
“Can I see how many reservations a single worker accepted or rejected?”
Tell an agent
Show statistics for worker {worker} in workspace {workspace}.
Get worker {worker}'s stats in {workspace} over the last {minutes} minutes.
GET
/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations
List the reservations offered to a worker · List worker reservation
#
Ask an LLM
“Which tasks are currently offered to one agent?”
“Can I list only the pending reservations for a specific worker?”
Tell an agent
List reservations for worker {worker} in workspace {workspace}.
Show worker {worker}'s reservations in {workspace} with status {status}.
GET
/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}
Look up one reservation offered to a worker · Fetch worker reservation
#
Ask an LLM
“What task is behind a specific reservation an agent received?”
“Can I check one reservation from the worker's point of view?”
Tell an agent
Show reservation {reservation} for worker {worker} in workspace {workspace}.
Get the status of worker {worker}'s reservation {reservation} in {workspace}.
POST
/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}
Accept, reject or act on a worker's reservation · Update worker reservation
#
Ask an LLM
“How does an agent accept or reject a task offered to them?”
“Can I set the agent's next activity when they reject a reservation?”
Tell an agent
Mark worker {worker}'s reservation {reservation} in {workspace} as {status}.
Reject worker {worker}'s reservation {reservation} in {workspace} and move them to activity {activity}.
GET
/v1/Workspaces/{WorkspaceSid}/Workers/Statistics
Get combined statistics for all workers · Fetch worker statistics
#
Ask an LLM
“What does my whole team's activity breakdown look like right now and historically?”
“Can I get worker statistics limited to the agents who serve one queue?”
Tell an agent
Get combined worker statistics for workspace {workspace}.
Show stats for workers serving queue {queue} in {workspace}.
GET
/v1/Workspaces/{WorkspaceSid}/Workers/CumulativeStatistics
Get workforce totals over a time window · Fetch workers cumulative statistics
#
Ask an LLM
“How many reservations did my agents accept, reject or time out over the past hour?”
“Can I see total time spent in each activity across all workers for a date range?”
Tell an agent
Get cumulative worker totals for {workspace} over the last {minutes} minutes.
Show historic workforce totals in {workspace} from {start} to {end}.
GET
/v1/Workspaces/{WorkspaceSid}/Workers/RealTimeStatistics
See how many workers are in each activity now · Fetch workers real time statistics
#
Ask an LLM
“How many of my agents are available, busy or offline at this moment?”
“Can I get a live headcount of workers on just the voice channel?”
Tell an agent
Show the live worker headcount by activity in workspace {workspace}.
Get real-time worker counts in {workspace} for channel {channel}.
Ask an LLM
“What routing rules does a specific TaskRouter workflow apply?”
“Can I see the assignment callback URL a workflow uses?”
Tell an agent
Show me workflow {workflow} in workspace {workspace}.
Get the routing configuration of workflow {workflow} in {workspace}.
POST
/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}
Change a workflow's routing rules · Update workflow
#
Ask an LLM
“How do I change the routing rules of a workflow that is already live?”
“Can existing tasks be re-evaluated against a workflow's new rules?”
Tell an agent
Replace the routing rules of workflow {workflow} in {workspace} with {configuration}.
Point existing workflow {workflow} in {workspace} at assignment callback {url}.
Ask an LLM
“How do I remove a workflow we replaced with a new one?”
“What is needed to delete a TaskRouter workflow?”
Tell an agent destructive · confirm first
Delete workflow {workflow} from workspace {workspace}.
Remove the retired routing workflow {workflow} in {workspace}.
Ask an LLM
“Which routing workflows exist in my workspace?”
“Can I look up a workflow by its friendly name?”
Tell an agent
List the workflows in workspace {workspace}.
Find the workflow named {name} in {workspace}.
Ask an LLM
“How do I define rules that route tasks to the right queue?”
“Is a JSON configuration required when creating a new workflow?”
Tell an agent
Create workflow {name} in {workspace} with routing rules {configuration}.
Set up new workflow {name} in {workspace} using rules {configuration} and callback {url}.
GET
/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/CumulativeStatistics
Get a workflow's totals over a time window · Fetch workflow cumulative statistics
#
Ask an LLM
“How many tasks did one workflow route, cancel or time out over a period?”
“Can I break a workflow's historic wait times into buckets?”
Tell an agent
Get cumulative stats for workflow {workflow} in {workspace} over the last {minutes} minutes.
Show historic totals for workflow {workflow} in {workspace} split by wait times {thresholds}.
GET
/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/RealTimeStatistics
See a workflow's live task backlog · Fetch workflow real time statistics
#
Ask an LLM
“How many tasks is one workflow handling at this moment?”
“What is the oldest task currently waiting in a workflow, live?”
Tell an agent
Show live stats for workflow {workflow} in workspace {workspace}.
Get workflow {workflow}'s current backlog in {workspace} for channel {channel}.
GET
/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/Statistics
Get a workflow's combined live and historic stats · Fetch workflow statistics
#
Ask an LLM
“Can I see both the live and cumulative numbers for one workflow together?”
“What does a workflow's full statistics snapshot show for a given date range?”
Tell an agent
Get combined real-time and cumulative stats for workflow {workflow} in {workspace}.
Show the full stats snapshot for workflow {workflow} in {workspace} from {start} to {end}.
Ask an LLM
“What are the default and timeout activities configured on my workspace?”
“Can I check whether multitasking is turned on for a workspace?”
Tell an agent
Show me workspace {workspace}.
Get the event callback URL and settings of workspace {workspace}.
Ask an LLM
“How do I turn on multitasking for an existing TaskRouter workspace?”
“Can I limit which events a workspace sends to my callback URL?”
Tell an agent
Enable multitasking on workspace {workspace}: {enabled}.
Send events from existing workspace {workspace} to {url}.
Ask an LLM
“How do I tear down a TaskRouter workspace I only used for testing?”
“What gets removed when I delete an entire workspace?”
Tell an agent destructive · confirm first
Delete workspace {workspace}.
Tear down the test workspace {workspace} entirely.
Ask an LLM
“Which TaskRouter workspaces exist on my account?”
“Can I find a workspace by its friendly name?”
Tell an agent
List all my TaskRouter workspaces.
Find the workspace named {name}.
Ask an LLM
“How do I start a new contact-center routing setup in Twilio TaskRouter?”
“Can a new workspace come pre-built from the FIFO template?”
Tell an agent
Create a workspace called {name}.
Create workspace {name} from the {template} template with events sent to {url}.
GET
/v1/Workspaces/{WorkspaceSid}/CumulativeStatistics
Get workspace-wide totals over a time window · Fetch workspace cumulative statistics
#
Ask an LLM
“How many tasks were created, completed or canceled across the whole workspace today?”
“Can I see workspace-wide wait-time buckets for a period?”
Tell an agent
Get cumulative workspace totals for {workspace} over the last {minutes} minutes.
Show historic workspace-wide totals for {workspace} split by wait times {thresholds}.
GET
/v1/Workspaces/{WorkspaceSid}/RealTimeStatistics
See live workspace-wide task and worker counts · Fetch workspace real time statistics
#
Ask an LLM
“How many tasks are waiting across my entire contact center right now?”
“Can I get a live workspace snapshot for just the chat channel?”
Tell an agent
Show live workspace-wide stats for {workspace}.
Get the current workspace backlog in {workspace} for channel {channel}.
GET
/v1/Workspaces/{WorkspaceSid}/Statistics
Get combined live and historic workspace stats · Fetch workspace statistics
#
Ask an LLM
“Can I get both the real-time and cumulative workspace numbers in one response?”
“What does the overall workspace statistics report cover for a date range?”
Tell an agent
Get combined real-time and cumulative stats for workspace {workspace}.
Show the overall workspace stats for {workspace} from {start} to {end}.
Documentation
📖
Documentation
https://www.twilio.com/docs/iam/api/account
📖
Documentation
https://www.twilio.com/blog/what-is-intelligent-virtual-assistant
📖
Documentation
https://www.twilio.com/docs/
📖
Documentation
https://www.twilio.com/docs/conversations
📖
Documentation
https://www.twilio.com/docs/add-ons/marketplace
📖
Documentation
https://www.twilio.com/docs/media
📖
Documentation
https://www.twilio.com/en-us/messaging
📖
Documentation
https://www.twilio.com/en-us/trusted-activation/verify
📖
Documentation
https://www.twilio.com/docs/video
📖
Documentation
https://www.twilio.com/en-us/voice
📖
Documentation
https://www.twilio.com/docs/lookup
📖
Documentation
https://www.twilio.com/docs/flex
📖
Documentation
https://www.twilio.com/docs/sendgrid
Specifications
⚙
OpenAPI
https://raw.githubusercontent.com/api-evangelist/twilio/refs/heads/main/openapi/twilio-workspaces-api-openapi.yml
⚙
AsyncAPI
https://raw.githubusercontent.com/api-evangelist/twilio/refs/heads/main/asyncapi/twilio-asyncapi.yml
Other Resources
🔗
Pricing
https://www.twilio.com/en-us/messaging/pricing/conversations-api
🔗
Pricing
https://www.twilio.com/en-us/sms/pricing/us
🔗
Pricing
https://www.twilio.com/en-us/verify/pricing
🔗
Pricing
https://www.twilio.com/en-us/video/pricing
🔗
Pricing
https://www.twilio.com/en-us/voice/pricing/us
🔗
Pricing
https://www.twilio.com/en-us/user-authentication-identity/pricing/lookup
🔗
Pricing
https://www.twilio.com/en-us/flex/pricing
🔗
Pricing
https://www.twilio.com/en-us/products/email-api/pricing