{"openapi":"3.1.0","info":{"title":"Twilio Task Router (BYOK) API","version":"0.1.0","description":"Twilio Task Router (BYOK) lets an AI assistant read your own Twilio Task Router data through the Twilio Task Router API with a key you supply (Account SID or API key SID (use a restricted API key, SID starts with SK, rather than the main Auth Token where possible)). Read-only: 11 tools (list_workspaces, get_workspace, list_workers, list_task_queues, list_workflows, list_activities,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-twilio-taskrouter.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-twilio-taskrouter/docs"},"termsOfService":"https://connectorbay.com/byok-twilio-taskrouter/terms"},"servers":[{"url":"https://byok-twilio-taskrouter.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-twilio-taskrouter/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_workspaces":{"post":{"operationId":"list_workspaces","summary":"List the TaskRouter workspaces of the account with their default activity and whether multi-tasking is on. Use for \"Whic","description":"List the TaskRouter workspaces of the account with their default activity and whether multi-tasking is on. Use for \"Which TaskRouter workspaces do I have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"friendly_name":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only workspaces with exactly this name.","title":"Friendly Name"},"page_size":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many results to return (1 to 1000).","title":"Page Size"},"page_token":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging token: the PageToken value inside meta.next_page_url from the previous answer (leave empty for the first page).","title":"Page Token"}},"title":"list_workspacesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_workspace":{"post":{"operationId":"get_workspace","summary":"Get one TaskRouter workspace: name, default and timeout activities, event callback URL and multi-task setting. Use for \"","description":"Get one TaskRouter workspace: name, default and timeout activities, event callback URL and multi-task setting. Use for \"What are the settings of my Support TaskRouter workspace\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace_sid":{"description":"The SID of the TaskRouter Workspace: 'WS' followed by 32 hex characters.","maxLength":34,"title":"Workspace Sid","type":"string"}},"required":["workspace_sid"],"title":"get_workspaceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_workers":{"post":{"operationId":"list_workers","summary":"List the workers of a workspace with current activity and availability. Worker attributes are not returned. Use for \"Whi","description":"List the workers of a workspace with current activity and availability. Worker attributes are not returned. Use for \"Which TaskRouter workers are available right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace_sid":{"description":"The SID of the TaskRouter Workspace: 'WS' followed by 32 hex characters.","maxLength":34,"title":"Workspace Sid","type":"string"},"available":{"anyOf":[{"enum":["true","false"],"type":"string"},{"type":"null"}],"default":null,"description":"Use true to return only available workers, false for unavailable ones.","title":"Available"},"activity_name":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only workers in the activity with this name, for example Available.","title":"Activity Name"},"friendly_name":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only workers with exactly this name.","title":"Friendly Name"},"task_queue_name":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only workers eligible for the task queue with this name.","title":"Task Queue Name"},"page_size":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many results to return (1 to 1000).","title":"Page Size"},"page_token":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging token: the PageToken value inside meta.next_page_url from the previous answer (leave empty for the first page).","title":"Page Token"}},"required":["workspace_sid"],"title":"list_workersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_task_queues":{"post":{"operationId":"list_task_queues","summary":"List the task queues of a workspace with the worker expression each one targets and its ordering. Use for \"What task que","description":"List the task queues of a workspace with the worker expression each one targets and its ordering. Use for \"What task queues does my workspace have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace_sid":{"description":"The SID of the TaskRouter Workspace: 'WS' followed by 32 hex characters.","maxLength":34,"title":"Workspace Sid","type":"string"},"friendly_name":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only queues with exactly this name.","title":"Friendly Name"},"page_size":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many results to return (1 to 1000).","title":"Page Size"},"page_token":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging token: the PageToken value inside meta.next_page_url from the previous answer (leave empty for the first page).","title":"Page Token"}},"required":["workspace_sid"],"title":"list_task_queuesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_workflows":{"post":{"operationId":"list_workflows","summary":"List the workflows of a workspace with their reservation timeout and callback URLs. Use for \"Which workflows route tasks","description":"List the workflows of a workspace with their reservation timeout and callback URLs. Use for \"Which workflows route tasks in my workspace\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace_sid":{"description":"The SID of the TaskRouter Workspace: 'WS' followed by 32 hex characters.","maxLength":34,"title":"Workspace Sid","type":"string"},"friendly_name":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only workflows with exactly this name.","title":"Friendly Name"},"page_size":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many results to return (1 to 1000).","title":"Page Size"},"page_token":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging token: the PageToken value inside meta.next_page_url from the previous answer (leave empty for the first page).","title":"Page Token"}},"required":["workspace_sid"],"title":"list_workflowsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_activities":{"post":{"operationId":"list_activities","summary":"List the worker activities (Available, Offline and custom ones) of a workspace and whether each counts as available. Use","description":"List the worker activities (Available, Offline and custom ones) of a workspace and whether each counts as available. Use for \"What worker activities are defined in my workspace\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace_sid":{"description":"The SID of the TaskRouter Workspace: 'WS' followed by 32 hex characters.","maxLength":34,"title":"Workspace Sid","type":"string"},"available":{"anyOf":[{"enum":["true","false"],"type":"string"},{"type":"null"}],"default":null,"description":"Use true to return only activities that mark a worker available.","title":"Available"},"page_size":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many results to return (1 to 1000).","title":"Page Size"},"page_token":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging token: the PageToken value inside meta.next_page_url from the previous answer (leave empty for the first page).","title":"Page Token"}},"required":["workspace_sid"],"title":"list_activitiesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_task_channels":{"post":{"operationId":"list_task_channels","summary":"List the task channels (voice, sms, default and custom) of a workspace. Use for \"Which task channels exist in my workspa","description":"List the task channels (voice, sms, default and custom) of a workspace. Use for \"Which task channels exist in my workspace\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace_sid":{"description":"The SID of the TaskRouter Workspace: 'WS' followed by 32 hex characters.","maxLength":34,"title":"Workspace Sid","type":"string"},"page_size":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many results to return (1 to 1000).","title":"Page Size"},"page_token":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging token: the PageToken value inside meta.next_page_url from the previous answer (leave empty for the first page).","title":"Page Token"}},"required":["workspace_sid"],"title":"list_task_channelsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_tasks":{"post":{"operationId":"list_tasks","summary":"List tasks of a workspace with status, priority, queue and workflow. Task attributes (customer data) are not returned. U","description":"List tasks of a workspace with status, priority, queue and workflow. Task attributes (customer data) are not returned. Use for \"Which TaskRouter tasks are waiting in the Sales queue\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace_sid":{"description":"The SID of the TaskRouter Workspace: 'WS' followed by 32 hex characters.","maxLength":34,"title":"Workspace Sid","type":"string"},"task_queue_name":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only tasks in the queue with this name.","title":"Task Queue Name"},"workflow_name":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only tasks of the workflow with this name.","title":"Workflow Name"},"priority":{"anyOf":[{"maximum":2147483647,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only tasks with this priority value.","title":"Priority"},"ordering":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Sort as Attribute:Order, for example Priority:desc or DateCreated:asc (attributes DateCreated, Priority, VirtualStartTime).","title":"Ordering"},"page_size":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many results to return (1 to 1000).","title":"Page Size"},"page_token":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging token: the PageToken value inside meta.next_page_url from the previous answer (leave empty for the first page).","title":"Page Token"}},"required":["workspace_sid"],"title":"list_tasksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_workspace_realtime_statistics":{"post":{"operationId":"get_workspace_realtime_statistics","summary":"Get live counts for a workspace: workers per activity, tasks by status and priority and the longest waiting task age in ","description":"Get live counts for a workspace: workers per activity, tasks by status and priority and the longest waiting task age in seconds. Use for \"How many tasks are waiting and how many workers are free right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace_sid":{"description":"The SID of the TaskRouter Workspace: 'WS' followed by 32 hex characters.","maxLength":34,"title":"Workspace Sid","type":"string"},"task_channel":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Limit to one task channel (SID or unique name).","title":"Task Channel"}},"required":["workspace_sid"],"title":"get_workspace_realtime_statisticsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_workspace_cumulative_statistics":{"post":{"operationId":"get_workspace_cumulative_statistics","summary":"Get totals over a recent window for a workspace: tasks created, completed and canceled, reservations accepted and reject","description":"Get totals over a recent window for a workspace: tasks created, completed and canceled, reservations accepted and rejected and average acceptance time. Use for \"How many tasks were completed in the last 4 hours\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace_sid":{"description":"The SID of the TaskRouter Workspace: 'WS' followed by 32 hex characters.","maxLength":34,"title":"Workspace Sid","type":"string"},"minutes":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only count the last this many minutes (default 15).","title":"Minutes"},"start_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only count from this ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only count up to this ISO 8601 time.","title":"End Date"},"task_channel":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Limit to one task channel (its SID or unique name such as voice, sms, default).","title":"Task Channel"}},"required":["workspace_sid"],"title":"get_workspace_cumulative_statisticsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_task_queue_realtime_statistics":{"post":{"operationId":"get_task_queue_realtime_statistics","summary":"Get live numbers for one task queue: tasks by status, eligible and available workers and the longest wait. Use for \"How ","description":"Get live numbers for one task queue: tasks by status, eligible and available workers and the longest wait. Use for \"How long has the longest task been waiting in my Sales queue\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace_sid":{"description":"The SID of the TaskRouter Workspace: 'WS' followed by 32 hex characters.","maxLength":34,"title":"Workspace Sid","type":"string"},"task_queue_sid":{"description":"The SID of the task queue: 'WQ' followed by 32 hex characters.","maxLength":34,"title":"Task Queue Sid","type":"string"},"task_channel":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Limit to one task channel (SID or unique name).","title":"Task Channel"}},"required":["workspace_sid","task_queue_sid"],"title":"get_task_queue_realtime_statisticsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}