{ "components": { "securitySchemes": { "accountSid_authToken": { "scheme": "basic", "type": "http" } }, "schemas": { "taskrouter.v1.workspace.activity": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Activity resource." }, "available": { "type": "boolean", "nullable": true, "description": "Whether the Worker is eligible to receive a Task when it occupies the Activity. A value of `true`, `1`, or `yes` indicates the Activity is available. All other values indicate that it is not. The value cannot be changed after the Activity is created." }, "date_created": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "date_updated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "friendly_name": { "type": "string", "nullable": true, "description": "The string that you assigned to describe the Activity resource." }, "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Activity resource." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the Activity." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Activity resource." }, "links": { "type": "object", "format": "uri-map", "nullable": true } } }, "taskrouter.v1.workspace.event": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Event resource." }, "actor_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^[a-zA-Z]{2}[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the resource that triggered the event." }, "actor_type": { "type": "string", "nullable": true, "description": "The type of resource that triggered the event." }, "actor_url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the resource that triggered the event." }, "description": { "type": "string", "nullable": true, "description": "A description of the event." }, "event_data": { "nullable": true, "description": "Data about the event. For more information, see [Event types](https://www.twilio.com/docs/taskrouter/api/event#event-types)." }, "event_date": { "type": "string", "format": "date-time", "nullable": true, "description": "The time the event was sent, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "event_date_ms": { "type": "integer", "format": "int64", "nullable": true, "description": "The time the event was sent in milliseconds." }, "event_type": { "type": "string", "nullable": true, "description": "The identifier for the event." }, "resource_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^[a-zA-Z]{2}[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the object the event is most relevant to, such as a TaskSid, ReservationSid, or a WorkerSid." }, "resource_type": { "type": "string", "nullable": true, "description": "The type of object the event is most relevant to, such as a Task, Reservation, or a Worker)." }, "resource_url": { "type": "string", "format": "uri", "nullable": true, "description": "The URL of the resource the event is most relevant to." }, "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^EV[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Event resource." }, "source": { "type": "string", "nullable": true, "description": "Where the Event originated." }, "source_ip_address": { "type": "string", "nullable": true, "description": "The IP from which the Event originated." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Event resource." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the Event." } } }, "taskrouter.v1.workspace.task": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Task resource." }, "age": { "type": "integer", "default": 0, "description": "The number of seconds since the Task was created." }, "assignment_status": { "type": "string", "$ref": "#/components/schemas/task_enum_status", "nullable": true, "description": "The current status of the Task's assignment. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or `completed`." }, "attributes": { "type": "string", "nullable": true, "description": "The JSON string with custom attributes of the work. **Note** If this property has been assigned a value, it will only be displayed in FETCH action that returns a single resource. Otherwise, it will be null.", "x-twilio": { "pii": { "handling": "sensitive", "deleteSla": 30 } } }, "addons": { "type": "string", "nullable": true, "description": "An object that contains the [Add-on](https://www.twilio.com/docs/add-ons) data for all installed Add-ons." }, "date_created": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "date_updated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "task_queue_entered_date": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the Task entered the TaskQueue, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "priority": { "type": "integer", "default": 0, "description": "The current priority score of the Task as assigned to a Worker by the workflow. Tasks with higher priority values will be assigned before Tasks with lower values." }, "reason": { "type": "string", "nullable": true, "description": "The reason the Task was canceled or completed, if applicable." }, "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WT[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Task resource." }, "task_queue_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the TaskQueue." }, "task_queue_friendly_name": { "type": "string", "nullable": true, "description": "The friendly name of the TaskQueue." }, "task_channel_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^TC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the TaskChannel." }, "task_channel_unique_name": { "type": "string", "nullable": true, "description": "The unique name of the TaskChannel." }, "timeout": { "type": "integer", "default": 0, "description": "The amount of time in seconds that the Task can live before being assigned." }, "workflow_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WW[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workflow that is controlling the Task." }, "workflow_friendly_name": { "type": "string", "nullable": true, "description": "The friendly name of the Workflow that is controlling the Task." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the Task." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Task resource." }, "links": { "type": "object", "format": "uri-map", "nullable": true, "description": "The URLs of related resources." }, "virtual_start_time": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT indicating the ordering for routing of the Task specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "ignore_capacity": { "type": "boolean", "nullable": true, "description": "A boolean that indicates if the Task should respect a Worker's capacity and availability during assignment. This field can only be used when the `RoutingTarget` field is set to a Worker SID. By setting `IgnoreCapacity` to a value of `true`, `1`, or `yes`, the Task will be routed to the Worker without respecting their capacity and availability. Any other value will enforce the Worker's capacity and availability. The default value of `IgnoreCapacity` is `true` when the `RoutingTarget` is set to a Worker SID. " }, "routing_target": { "type": "string", "nullable": true, "description": "A SID of a Worker, Queue, or Workflow to route a Task to" } } }, "task_enum_status": { "type": "string", "enum": [ "pending", "reserved", "assigned", "canceled", "completed", "wrapping" ] }, "taskrouter.v1.workspace.task_channel": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Task Channel resource." }, "date_created": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "date_updated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "friendly_name": { "type": "string", "nullable": true, "description": "The string that you assigned to describe the resource." }, "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^TC[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Task Channel resource." }, "unique_name": { "type": "string", "nullable": true, "description": "An application-defined string that uniquely identifies the Task Channel, such as `voice` or `sms`." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the Task Channel." }, "channel_optimized_routing": { "type": "boolean", "nullable": true, "description": "Whether the Task Channel will prioritize Workers that have been idle. When `true`, Workers that have been idle the longest are prioritized." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Task Channel resource." }, "links": { "type": "object", "format": "uri-map", "nullable": true, "description": "The URLs of related resources." } } }, "taskrouter.v1.workspace.task_queue": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the TaskQueue resource." }, "assignment_activity_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Activity to assign Workers when a task is assigned for them." }, "assignment_activity_name": { "type": "string", "nullable": true, "description": "The name of the Activity to assign Workers when a task is assigned for them." }, "date_created": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." }, "date_updated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." }, "friendly_name": { "type": "string", "nullable": true, "description": "The string that you assigned to describe the resource.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "max_reserved_workers": { "type": "integer", "default": 0, "description": "The maximum number of Workers to reserve for the assignment of a task in the queue. Can be an integer between 1 and 50, inclusive and defaults to 1." }, "reservation_activity_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Activity to assign Workers once a task is reserved for them." }, "reservation_activity_name": { "type": "string", "nullable": true, "description": "The name of the Activity to assign Workers once a task is reserved for them." }, "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the TaskQueue resource." }, "target_workers": { "type": "string", "nullable": true, "description": "A string describing the Worker selection criteria for any Tasks that enter the TaskQueue. For example `'\"language\" == \"spanish\"'` If no TargetWorkers parameter is provided, Tasks will wait in the TaskQueue until they are either deleted or moved to another TaskQueue. Additional examples on how to describing Worker selection criteria below. Defaults to 1==1." }, "task_order": { "type": "string", "$ref": "#/components/schemas/task_queue_enum_task_order", "nullable": true, "description": "How Tasks will be assigned to Workers. Set this parameter to `LIFO` to assign most recently created Task first or `FIFO` to assign the oldest Task. Default is FIFO. [Click here](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo) to learn more." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the TaskQueue resource." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the TaskQueue." }, "links": { "type": "object", "format": "uri-map", "nullable": true, "description": "The URLs of related resources." } } }, "task_queue_enum_task_order": { "type": "string", "enum": [ "FIFO", "LIFO" ] }, "taskrouter.v1.workspace.task_queue.task_queue_bulk_real_time_statistics": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the TaskQueue resource." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the TaskQueue." }, "task_queue_data": { "type": "array", "items": {}, "nullable": true, "description": "The real-time statistics for each requested TaskQueue SID. `task_queue_data` returns the following attributes:\n\n`task_queue_sid`: The SID of the TaskQueue from which these statistics were calculated.\n\n`total_available_workers`: The total number of Workers available for Tasks in the TaskQueue.\n\n`total_eligible_workers`: The total number of Workers eligible for Tasks in the TaskQueue, regardless of their Activity state.\n\n`total_tasks`: The total number of Tasks.\n\n`longest_task_waiting_age`: The age of the longest waiting Task.\n\n`longest_task_waiting_sid`: The SID of the longest waiting Task.\n\n`tasks_by_status`: The number of Tasks grouped by their current status.\n\n`tasks_by_priority`: The number of Tasks grouped by priority.\n\n`activity_statistics`: The number of current Workers grouped by Activity.\n" }, "task_queue_response_count": { "type": "integer", "default": 0, "description": "The number of TaskQueue statistics received in task_queue_data." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the TaskQueue statistics resource." } } }, "taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the TaskQueue resource." }, "avg_task_acceptance_time": { "type": "integer", "default": 0, "description": "The average time in seconds between Task creation and acceptance." }, "start_time": { "type": "string", "format": "date-time", "nullable": true, "description": "The beginning of the interval during which these statistics were calculated, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "end_time": { "type": "string", "format": "date-time", "nullable": true, "description": "The end of the interval during which these statistics were calculated, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "reservations_created": { "type": "integer", "default": 0, "description": "The total number of Reservations created for Tasks in the TaskQueue." }, "reservations_accepted": { "type": "integer", "default": 0, "description": "The total number of Reservations accepted for Tasks in the TaskQueue." }, "reservations_rejected": { "type": "integer", "default": 0, "description": "The total number of Reservations rejected for Tasks in the TaskQueue." }, "reservations_timed_out": { "type": "integer", "default": 0, "description": "The total number of Reservations that timed out for Tasks in the TaskQueue." }, "reservations_canceled": { "type": "integer", "default": 0, "description": "The total number of Reservations canceled for Tasks in the TaskQueue." }, "reservations_rescinded": { "type": "integer", "default": 0, "description": "The total number of Reservations rescinded." }, "split_by_wait_time": { "nullable": true, "description": "A list of objects that describe the number of Tasks canceled and reservations accepted above and below the thresholds specified in seconds." }, "task_queue_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the TaskQueue from which these statistics were calculated." }, "wait_duration_until_accepted": { "nullable": true, "description": "The wait duration statistics (`avg`, `min`, `max`, `total`) for Tasks accepted while in the TaskQueue. Calculation is based on the time when the Tasks were created. For transfers, the wait duration is counted from the moment ***the Task was created***, and not from when the transfer was initiated." }, "wait_duration_until_canceled": { "nullable": true, "description": "The wait duration statistics (`avg`, `min`, `max`, `total`) for Tasks canceled while in the TaskQueue." }, "wait_duration_in_queue_until_accepted": { "nullable": true, "description": "The relative wait duration statistics (`avg`, `min`, `max`, `total`) for Tasks accepted while in the TaskQueue. Calculation is based on the time when the Tasks entered the TaskQueue." }, "tasks_canceled": { "type": "integer", "default": 0, "description": "The total number of Tasks canceled in the TaskQueue." }, "tasks_completed": { "type": "integer", "default": 0, "description": "The total number of Tasks completed in the TaskQueue." }, "tasks_deleted": { "type": "integer", "default": 0, "description": "The total number of Tasks deleted in the TaskQueue." }, "tasks_entered": { "type": "integer", "default": 0, "description": "The total number of Tasks entered into the TaskQueue." }, "tasks_moved": { "type": "integer", "default": 0, "description": "The total number of Tasks that were moved from one queue to another." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the TaskQueue." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the TaskQueue statistics resource." } } }, "taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the TaskQueue resource." }, "activity_statistics": { "type": "array", "items": {}, "nullable": true, "description": "The number of current Workers by Activity." }, "longest_task_waiting_age": { "type": "integer", "default": 0, "description": "The age of the longest waiting Task." }, "longest_task_waiting_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WT[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the longest waiting Task." }, "longest_relative_task_age_in_queue": { "type": "integer", "default": 0, "description": "The relative age in the TaskQueue for the longest waiting Task. Calculation is based on the time when the Task entered the TaskQueue." }, "longest_relative_task_sid_in_queue": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WT[0-9a-fA-F]{32}$", "nullable": true, "description": "The Task SID of the Task waiting in the TaskQueue the longest. Calculation is based on the time when the Task entered the TaskQueue." }, "task_queue_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the TaskQueue from which these statistics were calculated." }, "tasks_by_priority": { "nullable": true, "description": "The number of Tasks by priority. For example: `{\"0\": \"10\", \"99\": \"5\"}` shows 10 Tasks at priority 0 and 5 at priority 99." }, "tasks_by_status": { "nullable": true, "description": "The number of Tasks by their current status. For example: `{\"pending\": \"1\", \"reserved\": \"3\", \"assigned\": \"2\", \"completed\": \"5\"}`." }, "total_available_workers": { "type": "integer", "default": 0, "description": "The total number of Workers in the TaskQueue with an `available` status. Workers with an `available` status may already have active interactions or may have none." }, "total_eligible_workers": { "type": "integer", "default": 0, "description": "The total number of Workers eligible for Tasks in the TaskQueue, independent of their Activity state." }, "total_tasks": { "type": "integer", "default": 0, "description": "The total number of Tasks." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the TaskQueue." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the TaskQueue statistics resource." } } }, "taskrouter.v1.workspace.task_queue.task_queue_statistics": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the TaskQueue resource." }, "cumulative": { "nullable": true, "description": "An object that contains the cumulative statistics for the TaskQueue." }, "realtime": { "nullable": true, "description": "An object that contains the real-time statistics for the TaskQueue." }, "task_queue_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the TaskQueue from which these statistics were calculated." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the TaskQueue." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the TaskQueue statistics resource." } } }, "taskrouter.v1.workspace.task_queue.task_queues_statistics": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the TaskQueue resource." }, "cumulative": { "nullable": true, "description": "An object that contains the cumulative statistics for the TaskQueues." }, "realtime": { "nullable": true, "description": "An object that contains the real-time statistics for the TaskQueues." }, "task_queue_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the TaskQueue from which these statistics were calculated." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the TaskQueues." } } }, "taskrouter.v1.workspace.task.task_reservation": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the TaskReservation resource." }, "date_created": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "date_updated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "reservation_status": { "type": "string", "$ref": "#/components/schemas/task_reservation_enum_status", "nullable": true, "description": "The current status of the reservation. Can be: `pending`, `accepted`, `rejected`, or `timeout`." }, "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WR[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the TaskReservation resource." }, "task_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WT[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the reserved Task resource." }, "worker_name": { "type": "string", "nullable": true, "description": "The `friendly_name` of the Worker that is reserved." }, "worker_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the reserved Worker resource." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that this task is contained within." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the TaskReservation reservation." }, "links": { "type": "object", "format": "uri-map", "nullable": true, "description": "The URLs of related resources." } } }, "task_reservation_enum_status": { "type": "string", "enum": [ "pending", "accepted", "rejected", "timeout", "canceled", "rescinded", "wrapping", "completed" ] }, "task_reservation_enum_call_status": { "type": "string", "enum": [ "initiated", "ringing", "answered", "completed" ] }, "task_reservation_enum_conference_event": { "type": "string", "enum": [ "start", "end", "join", "leave", "mute", "hold", "speaker" ] }, "task_reservation_enum_supervisor_mode": { "type": "string", "enum": [ "monitor", "whisper", "barge" ] }, "taskrouter.v1.workspace.worker": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Worker resource." }, "activity_name": { "type": "string", "nullable": true, "description": "The `friendly_name` of the Worker's current Activity." }, "activity_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Worker's current Activity." }, "attributes": { "type": "string", "nullable": true, "description": "The JSON string that describes the Worker. For example: `{ \"email\": \"Bob@example.com\", \"phone\": \"+5095551234\" }`. **Note** If this property has been assigned a value, it will only be displayed in FETCH actions that return a single resource. Otherwise, this property will be null, even if it has a value. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker.", "x-twilio": { "pii": { "handling": "sensitive", "deleteSla": 30 } } }, "available": { "type": "boolean", "nullable": true, "description": "Whether the Worker is available to perform tasks." }, "date_created": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "date_status_changed": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT of the last change to the Worker's activity specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Used to calculate Workflow statistics." }, "date_updated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "friendly_name": { "type": "string", "nullable": true, "description": "The string that you assigned to describe the resource. Friendly names are case insensitive, and unique within the TaskRouter Workspace.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Worker resource." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the Worker." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Worker resource." }, "links": { "type": "object", "format": "uri-map", "nullable": true, "description": "The URLs of related resources." } } }, "taskrouter.v1.workspace.worker.worker_channel": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Worker resource." }, "assigned_tasks": { "type": "integer", "default": 0, "description": "The total number of Tasks assigned to Worker for the TaskChannel type." }, "available": { "type": "boolean", "nullable": true, "description": "Whether the Worker should receive Tasks of the TaskChannel type." }, "available_capacity_percentage": { "type": "integer", "default": 0, "description": "The current percentage of capacity the TaskChannel has available. Can be a number between `0` and `100`. A value of `0` indicates that TaskChannel has no capacity available and a value of `100` means the Worker is available to receive any Tasks of this TaskChannel type." }, "configured_capacity": { "type": "integer", "default": 0, "description": "The current configured capacity for the WorkerChannel. TaskRouter will not create any reservations after the assigned Tasks for the Worker reaches the value." }, "date_created": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." }, "date_updated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." }, "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WC[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the WorkerChannel resource." }, "task_channel_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^TC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the TaskChannel." }, "task_channel_unique_name": { "type": "string", "nullable": true, "description": "The unique name of the TaskChannel, such as `voice` or `sms`." }, "worker_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Worker that contains the WorkerChannel." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the WorkerChannel." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the WorkerChannel resource." } } }, "taskrouter.v1.workspace.worker.worker_instance_statistics": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Worker resource." }, "cumulative": { "nullable": true, "description": "An object that contains the cumulative statistics for the Worker." }, "worker_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Worker that contains the WorkerChannel." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the WorkerChannel." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the WorkerChannel statistics resource." } } }, "taskrouter.v1.workspace.worker.worker_reservation": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the WorkerReservation resource." }, "date_created": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "date_updated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "reservation_status": { "type": "string", "$ref": "#/components/schemas/worker_reservation_enum_status", "nullable": true, "description": "The current status of the reservation. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`." }, "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WR[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the WorkerReservation resource." }, "task_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WT[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the reserved Task resource." }, "worker_name": { "type": "string", "nullable": true, "description": "The `friendly_name` of the Worker that is reserved." }, "worker_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the reserved Worker resource." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that this worker is contained within." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the WorkerReservation resource." }, "links": { "type": "object", "format": "uri-map", "nullable": true, "description": "The URLs of related resources." } } }, "worker_reservation_enum_status": { "type": "string", "enum": [ "pending", "accepted", "rejected", "timeout", "canceled", "rescinded", "wrapping", "completed" ] }, "worker_reservation_enum_call_status": { "type": "string", "enum": [ "initiated", "ringing", "answered", "completed" ] }, "worker_reservation_enum_conference_event": { "type": "string", "enum": [ "start", "end", "join", "leave", "mute", "hold", "speaker" ] }, "taskrouter.v1.workspace.worker.worker_statistics": { "type": "object", "properties": { "realtime": { "nullable": true, "description": "An object that contains the real-time statistics for the Worker." }, "cumulative": { "nullable": true, "description": "An object that contains the cumulative statistics for the Worker." }, "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Worker resource." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the Worker." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Worker statistics resource." } } }, "taskrouter.v1.workspace.worker.workers_cumulative_statistics": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Worker resource." }, "start_time": { "type": "string", "format": "date-time", "nullable": true, "description": "The beginning of the interval during which these statistics were calculated, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "end_time": { "type": "string", "format": "date-time", "nullable": true, "description": "The end of the interval during which these statistics were calculated, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "activity_durations": { "type": "array", "items": {}, "nullable": true, "description": "The minimum, average, maximum, and total time (in seconds) that Workers spent in each Activity." }, "reservations_created": { "type": "integer", "default": 0, "description": "The total number of Reservations that were created." }, "reservations_accepted": { "type": "integer", "default": 0, "description": "The total number of Reservations that were accepted." }, "reservations_rejected": { "type": "integer", "default": 0, "description": "The total number of Reservations that were rejected." }, "reservations_timed_out": { "type": "integer", "default": 0, "description": "The total number of Reservations that were timed out." }, "reservations_canceled": { "type": "integer", "default": 0, "description": "The total number of Reservations that were canceled." }, "reservations_rescinded": { "type": "integer", "default": 0, "description": "The total number of Reservations that were rescinded." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the Workers." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Workers statistics resource." } } }, "taskrouter.v1.workspace.worker.workers_real_time_statistics": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Worker resource." }, "activity_statistics": { "type": "array", "items": {}, "nullable": true, "description": "The number of current Workers by Activity." }, "total_workers": { "type": "integer", "default": 0, "description": "The total number of Workers." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the Workers." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Workers statistics resource." } } }, "taskrouter.v1.workspace.workflow": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Workflow resource." }, "assignment_callback_url": { "type": "string", "format": "uri", "nullable": true, "description": "The URL that we call when a task managed by the Workflow is assigned to a Worker. See Assignment Callback URL for more information." }, "configuration": { "type": "string", "nullable": true, "description": "A JSON string that contains the Workflow's configuration. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information." }, "date_created": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." }, "date_updated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." }, "document_content_type": { "type": "string", "nullable": true, "description": "The MIME type of the document." }, "fallback_assignment_callback_url": { "type": "string", "format": "uri", "nullable": true, "description": "The URL that we call when a call to the `assignment_callback_url` fails." }, "friendly_name": { "type": "string", "nullable": true, "description": "The string that you assigned to describe the Workflow resource. For example, `Customer Support` or `2014 Election Campaign`.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WW[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Workflow resource." }, "task_reservation_timeout": { "type": "integer", "default": 0, "description": "How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the Workflow." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Workflow resource." }, "links": { "type": "object", "format": "uri-map", "nullable": true, "description": "The URLs of related resources." } } }, "taskrouter.v1.workspace.workflow.workflow_cumulative_statistics": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Workflow resource." }, "avg_task_acceptance_time": { "type": "integer", "default": 0, "description": "The average time in seconds between Task creation and acceptance." }, "start_time": { "type": "string", "format": "date-time", "nullable": true, "description": "The beginning of the interval during which these statistics were calculated, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "end_time": { "type": "string", "format": "date-time", "nullable": true, "description": "The end of the interval during which these statistics were calculated, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "reservations_created": { "type": "integer", "default": 0, "description": "The total number of Reservations that were created for Workers." }, "reservations_accepted": { "type": "integer", "default": 0, "description": "The total number of Reservations accepted by Workers." }, "reservations_rejected": { "type": "integer", "default": 0, "description": "The total number of Reservations that were rejected." }, "reservations_timed_out": { "type": "integer", "default": 0, "description": "The total number of Reservations that were timed out." }, "reservations_canceled": { "type": "integer", "default": 0, "description": "The total number of Reservations that were canceled." }, "reservations_rescinded": { "type": "integer", "default": 0, "description": "The total number of Reservations that were rescinded." }, "split_by_wait_time": { "nullable": true, "description": "A list of objects that describe the number of Tasks canceled and reservations accepted above and below the thresholds specified in seconds." }, "wait_duration_until_accepted": { "nullable": true, "description": "The wait duration statistics (`avg`, `min`, `max`, `total`) for Tasks that were accepted." }, "wait_duration_until_canceled": { "nullable": true, "description": "The wait duration statistics (`avg`, `min`, `max`, `total`) for Tasks that were canceled." }, "tasks_canceled": { "type": "integer", "default": 0, "description": "The total number of Tasks that were canceled." }, "tasks_completed": { "type": "integer", "default": 0, "description": "The total number of Tasks that were completed." }, "tasks_entered": { "type": "integer", "default": 0, "description": "The total number of Tasks that entered the Workflow." }, "tasks_deleted": { "type": "integer", "default": 0, "description": "The total number of Tasks that were deleted." }, "tasks_moved": { "type": "integer", "default": 0, "description": "The total number of Tasks that were moved from one queue to another." }, "tasks_timed_out_in_workflow": { "type": "integer", "default": 0, "description": "The total number of Tasks that were timed out of their Workflows (and deleted)." }, "workflow_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WW[0-9a-fA-F]{32}$", "nullable": true, "description": "Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the Workflow." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Workflow statistics resource." } } }, "taskrouter.v1.workspace.workflow.workflow_real_time_statistics": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Workflow resource." }, "longest_task_waiting_age": { "type": "integer", "default": 0, "description": "The age of the longest waiting Task." }, "longest_task_waiting_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WT[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the longest waiting Task." }, "tasks_by_priority": { "nullable": true, "description": "The number of Tasks by priority. For example: `{\"0\": \"10\", \"99\": \"5\"}` shows 10 Tasks at priority 0 and 5 at priority 99." }, "tasks_by_status": { "nullable": true, "description": "The number of Tasks by their current status. For example: `{\"pending\": \"1\", \"reserved\": \"3\", \"assigned\": \"2\", \"completed\": \"5\"}`." }, "total_tasks": { "type": "integer", "default": 0, "description": "The total number of Tasks." }, "workflow_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WW[0-9a-fA-F]{32}$", "nullable": true, "description": "Returns the list of Tasks that are being controlled by the Workflow with the specified SID value." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the Workflow." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Workflow statistics resource." } } }, "taskrouter.v1.workspace.workflow.workflow_statistics": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Workflow resource." }, "cumulative": { "nullable": true, "description": "An object that contains the cumulative statistics for the Workflow." }, "realtime": { "nullable": true, "description": "An object that contains the real-time statistics for the Workflow." }, "workflow_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WW[0-9a-fA-F]{32}$", "nullable": true, "description": "Returns the list of Tasks that are being controlled by the Workflow with the specified SID value." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace that contains the Workflow." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Workflow statistics resource." } } }, "taskrouter.v1.workspace": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Workspace resource." }, "date_created": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "date_updated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "default_activity_name": { "type": "string", "nullable": true, "description": "The name of the default activity." }, "default_activity_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Activity that will be used when new Workers are created in the Workspace." }, "event_callback_url": { "type": "string", "format": "uri", "nullable": true, "description": "The URL we call when an event occurs. If provided, the Workspace will publish events to this URL, for example, to collect data for reporting. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. This parameter supports Twilio's [Webhooks (HTTP callbacks) Connection Overrides](https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides)." }, "events_filter": { "type": "string", "nullable": true, "description": "The list of Workspace events for which to call `event_callback_url`. For example, if `EventsFilter=task.created, task.canceled, worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated." }, "friendly_name": { "type": "string", "nullable": true, "description": "The string that you assigned to describe the Workspace resource. For example `Customer Support` or `2014 Election Campaign`.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "multi_task_enabled": { "type": "boolean", "nullable": true, "description": "Whether multi-tasking is enabled. The default is `true`, which enables multi-tasking. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (`true`), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. In single-tasking each Worker would only receive a new reservation when the previous task is completed. Learn more at [Multitasking](https://www.twilio.com/docs/taskrouter/multitasking)." }, "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Workspace resource." }, "timeout_activity_name": { "type": "string", "nullable": true, "description": "The name of the timeout activity." }, "timeout_activity_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response." }, "prioritize_queue_order": { "type": "string", "$ref": "#/components/schemas/workspace_enum_queue_order", "nullable": true, "description": "The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo)." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Workspace resource." }, "links": { "type": "object", "format": "uri-map", "nullable": true, "description": "The URLs of related resources." } } }, "workspace_enum_queue_order": { "type": "string", "enum": [ "FIFO", "LIFO" ] }, "taskrouter.v1.workspace.workspace_cumulative_statistics": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Workspace resource." }, "avg_task_acceptance_time": { "type": "integer", "default": 0, "description": "The average time in seconds between Task creation and acceptance." }, "start_time": { "type": "string", "format": "date-time", "nullable": true, "description": "The beginning of the interval during which these statistics were calculated, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "end_time": { "type": "string", "format": "date-time", "nullable": true, "description": "The end of the interval during which these statistics were calculated, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "reservations_created": { "type": "integer", "default": 0, "description": "The total number of Reservations that were created for Workers." }, "reservations_accepted": { "type": "integer", "default": 0, "description": "The total number of Reservations accepted by Workers." }, "reservations_rejected": { "type": "integer", "default": 0, "description": "The total number of Reservations that were rejected." }, "reservations_timed_out": { "type": "integer", "default": 0, "description": "The total number of Reservations that were timed out." }, "reservations_canceled": { "type": "integer", "default": 0, "description": "The total number of Reservations that were canceled." }, "reservations_rescinded": { "type": "integer", "default": 0, "description": "The total number of Reservations that were rescinded." }, "split_by_wait_time": { "nullable": true, "description": "A list of objects that describe the number of Tasks canceled and reservations accepted above and below the thresholds specified in seconds." }, "wait_duration_until_accepted": { "nullable": true, "description": "The wait duration statistics (`avg`, `min`, `max`, `total`) for Tasks that were accepted." }, "wait_duration_until_canceled": { "nullable": true, "description": "The wait duration statistics (`avg`, `min`, `max`, `total`) for Tasks that were canceled." }, "tasks_canceled": { "type": "integer", "default": 0, "description": "The total number of Tasks that were canceled." }, "tasks_completed": { "type": "integer", "default": 0, "description": "The total number of Tasks that were completed." }, "tasks_created": { "type": "integer", "default": 0, "description": "The total number of Tasks created." }, "tasks_deleted": { "type": "integer", "default": 0, "description": "The total number of Tasks that were deleted." }, "tasks_moved": { "type": "integer", "default": 0, "description": "The total number of Tasks that were moved from one queue to another." }, "tasks_timed_out_in_workflow": { "type": "integer", "default": 0, "description": "The total number of Tasks that were timed out of their Workflows (and deleted)." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Workspace statistics resource." } } }, "taskrouter.v1.workspace.workspace_real_time_statistics": { "type": "object", "properties": { "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Workspace resource." }, "activity_statistics": { "type": "array", "items": {}, "nullable": true, "description": "The number of current Workers by Activity." }, "longest_task_waiting_age": { "type": "integer", "default": 0, "description": "The age of the longest waiting Task." }, "longest_task_waiting_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WT[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the longest waiting Task." }, "tasks_by_priority": { "nullable": true, "description": "The number of Tasks by priority. For example: `{\"0\": \"10\", \"99\": \"5\"}` shows 10 Tasks at priority 0 and 5 at priority 99." }, "tasks_by_status": { "nullable": true, "description": "The number of Tasks by their current status. For example: `{\"pending\": \"1\", \"reserved\": \"3\", \"assigned\": \"2\", \"completed\": \"5\"}`." }, "total_tasks": { "type": "integer", "default": 0, "description": "The total number of Tasks." }, "total_workers": { "type": "integer", "default": 0, "description": "The total number of Workers in the Workspace." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Workspace statistics resource." } } }, "taskrouter.v1.workspace.workspace_statistics": { "type": "object", "properties": { "realtime": { "nullable": true, "description": "An object that contains the real-time statistics for the Workspace." }, "cumulative": { "nullable": true, "description": "An object that contains the cumulative statistics for the Workspace." }, "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Workspace resource." }, "workspace_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Workspace." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Workspace statistics resource." } } } } }, "info": { "title": "Twilio - Taskrouter", "description": "This is the public Twilio REST API.", "termsOfService": "https://www.twilio.com/legal/tos", "contact": { "name": "Twilio Support", "url": "https://support.twilio.com", "email": "support@twilio.com" }, "license": { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "1.0.0" }, "openapi": "3.0.1", "paths": { "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "date_created" ], "parent": "/Workspaces/{Sid}", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1Activity" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Activity resources to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Activity resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.activity" }, "examples": { "fetch": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "available": true, "date_created": "2014-05-14T10:50:02Z", "date_updated": "2014-05-14T23:26:06Z", "friendly_name": "New Activity", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchActivity" }, "post": { "description": "", "tags": [ "TaskrouterV1Activity" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Activity resources to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Activity resource to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.activity" }, "examples": { "update": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "available": true, "date_created": "2014-05-14T10:50:02Z", "date_updated": "2014-05-14T23:26:06Z", "friendly_name": "New Activity", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateActivity", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateActivityRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`." } } }, "examples": { "update": { "value": { "FriendlyName": "friendly_name" } } } } } } }, "delete": { "description": "", "tags": [ "TaskrouterV1Activity" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Activity resources to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Activity resource to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully.", "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } } } } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteActivity" } }, "/v1/Workspaces/{WorkspaceSid}/Activities": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "date_created" ], "parent": "/Workspaces/{Sid}", "pathType": "list" }, "get": { "description": "", "tags": [ "TaskrouterV1Activity" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Activity resources to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "FriendlyName", "in": "query", "description": "The `friendly_name` of the Activity resources to read.", "schema": { "type": "string" }, "examples": { "readFull": { "value": "friendly_name" }, "readEmpty": { "value": "friendly_name" } } }, { "name": "Available", "in": "query", "description": "Whether return only Activity resources that are available or unavailable. A value of `true` returns only available activities. Values of '1' or `yes` also indicate `true`. All other values represent `false` and return activities that are unavailable.", "schema": { "type": "string" }, "examples": { "readFull": { "value": "true" }, "readEmpty": { "value": "true" } } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "activities": { "type": "array", "items": { "$ref": "#/components/schemas/taskrouter.v1.workspace.activity" } }, "meta": { "properties": { "first_page_url": { "format": "uri", "type": "string" }, "key": { "type": "string" }, "next_page_url": { "format": "uri", "nullable": true, "type": "string" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "format": "uri", "nullable": true, "type": "string" }, "url": { "format": "uri", "type": "string" } }, "type": "object" } }, "title": "ListActivityResponse" }, "examples": { "readFull": { "value": { "activities": [ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "available": true, "date_created": "2014-05-14T10:50:02Z", "date_updated": "2014-05-14T23:26:06Z", "friendly_name": "New Activity", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } ], "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities?Available=true&FriendlyName=friendly_name&PageSize=50&Page=0", "key": "activities", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities?Available=true&FriendlyName=friendly_name&PageSize=50&Page=0" } } }, "readEmpty": { "value": { "activities": [], "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities?Available=true&FriendlyName=friendly_name&PageSize=50&Page=0", "key": "activities", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities?Available=true&FriendlyName=friendly_name&PageSize=50&Page=0" } } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListActivity" }, "post": { "description": "", "tags": [ "TaskrouterV1Activity" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace that the new Activity belongs to.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.activity" }, "examples": { "create": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "available": true, "date_created": "2014-05-14T10:50:02Z", "date_updated": "2014-05-14T23:26:06Z", "friendly_name": "New Activity", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateActivity", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateActivityRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`." }, "Available": { "type": "boolean", "description": "Whether the Worker should be eligible to receive a Task when it occupies the Activity. A value of `true`, `1`, or `yes` specifies the Activity is available. All other values specify that it is not. The value cannot be changed after the Activity is created." } }, "required": [ "FriendlyName" ] }, "examples": { "create": { "value": { "Available": "true", "FriendlyName": "friendly_name" } } } } } } } }, "/v1/Workspaces/{WorkspaceSid}/Events/{Sid}": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "description", "event_date" ], "parent": "/Workspaces/{Sid}", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1Event" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Event to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Event resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^EV[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.event" }, "examples": { "fetch": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "actor_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "actor_type": "workspace", "actor_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "description": "Worker JustinWorker updated to Idle Activity", "event_data": { "worker_activity_name": "Offline", "worker_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker_attributes": "{}", "worker_name": "JustinWorker", "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker_time_in_previous_activity": "26", "worker_time_in_previous_activity_ms": "26123", "workspace_name": "WorkspaceName", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "event_date": "2015-02-07T00:32:41Z", "event_date_ms": 987654321111, "event_type": "worker.activity", "resource_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "resource_type": "worker", "resource_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "sid": "EVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "source": "twilio", "source_ip_address": "1.2.3.4", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events/EVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchEvent" } }, "/v1/Workspaces/{WorkspaceSid}/Events": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "description", "event_date" ], "parent": "/Workspaces/{Sid}", "pathType": "list" }, "get": { "description": "", "tags": [ "TaskrouterV1Event" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Events to read. Returns only the Events that pertain to the specified Workspace.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "EndDate", "in": "query", "description": "Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.", "schema": { "type": "string", "format": "date-time" }, "examples": { "readFull": { "value": "2008-01-03T00:00:00Z" }, "readEmpty": { "value": "2008-01-03T00:00:00Z" } } }, { "name": "EventType", "in": "query", "description": "The type of Events to read. Returns only Events of the type specified.", "schema": { "type": "string" }, "examples": { "readFull": { "value": "reservation.created" }, "readEmpty": { "value": "reservation.created" } } }, { "name": "Minutes", "in": "query", "description": "The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.", "schema": { "type": "integer" } }, { "name": "ReservationSid", "in": "query", "description": "The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WR[0-9a-fA-F]{32}$" }, "examples": { "readFull": { "value": "WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "readEmpty": { "value": "WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } }, { "name": "StartDate", "in": "query", "description": "Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted.", "schema": { "type": "string", "format": "date-time" }, "examples": { "readFull": { "value": "2008-01-02T00:00:00Z" }, "readEmpty": { "value": "2008-01-02T00:00:00Z" } } }, { "name": "TaskQueueSid", "in": "query", "description": "The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$" }, "examples": { "readFull": { "value": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "readEmpty": { "value": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } }, { "name": "TaskSid", "in": "query", "description": "The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WT[0-9a-fA-F]{32}$" }, "examples": { "readFull": { "value": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "readEmpty": { "value": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } }, { "name": "WorkerSid", "in": "query", "description": "The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$" }, "examples": { "readFull": { "value": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "readEmpty": { "value": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } }, { "name": "WorkflowSid", "in": "query", "description": "The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WW[0-9a-fA-F]{32}$" }, "examples": { "readFull": { "value": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "readEmpty": { "value": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } }, { "name": "TaskChannel", "in": "query", "description": "The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.", "schema": { "type": "string" } }, { "name": "Sid", "in": "query", "description": "The SID of the Event resource to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^EV[0-9a-fA-F]{32}$" } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "events": { "type": "array", "items": { "$ref": "#/components/schemas/taskrouter.v1.workspace.event" } }, "meta": { "properties": { "first_page_url": { "format": "uri", "type": "string" }, "key": { "type": "string" }, "next_page_url": { "format": "uri", "nullable": true, "type": "string" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "format": "uri", "nullable": true, "type": "string" }, "url": { "format": "uri", "type": "string" } }, "type": "object" } }, "title": "ListEventResponse" }, "examples": { "readFull": { "value": { "events": [ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "actor_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "actor_type": "workspace", "actor_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "description": "Worker JustinWorker updated to Idle Activity", "event_data": { "worker_activity_name": "Offline", "worker_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker_attributes": "{}", "worker_name": "JustinWorker", "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker_time_in_previous_activity": "26", "worker_time_in_previous_activity_ms": "26123", "workspace_name": "WorkspaceName", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "event_date": "2015-02-07T00:32:41Z", "event_date_ms": 987654321111, "event_type": "worker.activity", "resource_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "resource_type": "worker", "resource_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "sid": "EVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "source": "twilio", "source_ip_address": "1.2.3.4", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events/EVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ], "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-03T00%3A00%3A00Z&WorkerSid=WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&EventType=reservation.created&TaskSid=WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&ReservationSid=WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0", "key": "events", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-03T00%3A00%3A00Z&WorkerSid=WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&EventType=reservation.created&TaskSid=WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&ReservationSid=WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0" } } }, "readEmpty": { "value": { "events": [], "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-03T00%3A00%3A00Z&WorkerSid=WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&EventType=reservation.created&TaskSid=WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&ReservationSid=WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0", "key": "events", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-03T00%3A00%3A00Z&WorkerSid=WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&EventType=reservation.created&TaskSid=WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&ReservationSid=WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0" } } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListEvent" } }, "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "age", "assignment_status", "priority", "reason" ], "dependentProperties": { "reservations": { "mapping": { "workspace_sid": "workspace_sid", "task_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Tasks/{task_sid}/Reservations" } }, "parent": "/Workspaces/{Sid}", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1Task" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Task to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Task resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WT[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task" }, "examples": { "fetch": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "age": 25200, "assignment_status": "pending", "attributes": "{\"body\": \"hello\"}", "date_created": "2014-05-14T18:50:02Z", "date_updated": "2014-05-15T07:26:06Z", "task_queue_entered_date": "2014-05-14T18:50:02Z", "virtual_start_time": "2014-05-14T18:50:02Z", "priority": 0, "reason": "Test Reason", "sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_channel_unique_name": "task-channel", "timeout": 60, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workflow_sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workflow_friendly_name": "Test Workflow", "task_queue_friendly_name": "Test Queue", "ignore_capacity": false, "routing_target": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "addons": "{}", "required_attention": 0, "links": { "task_queue": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workflow": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations" } } } } } }, "headers": { "ETag": { "schema": { "type": "string" } }, "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchTask" }, "post": { "description": "", "tags": [ "TaskrouterV1Task" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Task to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Task resource to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WT[0-9a-fA-F]{32}$" }, "required": true }, { "name": "If-Match", "in": "header", "description": "If provided, applies this mutation if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task" }, "examples": { "update": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "age": 25200, "assignment_status": "pending", "attributes": "{\"body\": \"hello\"}", "date_created": "2014-05-14T18:50:02Z", "date_updated": "2014-05-15T07:26:06Z", "task_queue_entered_date": "2014-05-14T18:50:02Z", "virtual_start_time": "2023-08-02T12:34:56Z", "priority": 0, "reason": "Test Reason", "sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_channel_unique_name": "task-channel", "timeout": 60, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workflow_sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workflow_friendly_name": "Test Workflow", "task_queue_friendly_name": "Test Queue", "addons": "{}", "ignore_capacity": false, "routing_target": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "required_attention": 0, "links": { "task_queue": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workflow": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations" } } } } } }, "headers": { "ETag": { "schema": { "type": "string" } }, "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateTask", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateTaskRequest", "properties": { "Attributes": { "type": "string", "description": "The JSON string that describes the custom attributes of the task." }, "AssignmentStatus": { "type": "string", "$ref": "#/components/schemas/task_enum_status", "description": "The new status of the task. Can be: `canceled`, to cancel a Task that is currently `pending` or `reserved`; `wrapping`, to move the Task to wrapup state; or `completed`, to move a Task to the completed state." }, "Reason": { "type": "string", "description": "The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason." }, "Priority": { "type": "integer", "description": "The Task's new priority value. When supplied, the Task takes on the specified priority unless it matches a Workflow Target with a Priority set. Value can be 0 to 2^31^ (2,147,483,647)." }, "TaskChannel": { "type": "string", "description": "When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`." }, "VirtualStartTime": { "type": "string", "format": "date-time", "description": "The task's new virtual start time value. When supplied, the Task takes on the specified virtual start time. Value can't be in the future or before the year of 1900." } } }, "examples": { "update": { "value": { "AssignmentStatus": "pending", "Attributes": "attributes", "Priority": 1, "Reason": "reason", "VirtualStartTime": "2023-08-02T12:34:56Z", "RequiredAttention": 0 } } } } } } }, "delete": { "description": "", "tags": [ "TaskrouterV1Task" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Task to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Task resource to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WT[0-9a-fA-F]{32}$" }, "required": true }, { "name": "If-Match", "in": "header", "description": "If provided, deletes this Task if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).", "schema": { "type": "string" } } ], "responses": { "204": { "description": "The resource was deleted successfully.", "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } } } } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteTask" } }, "/v1/Workspaces/{WorkspaceSid}/Tasks": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "age", "assignment_status", "priority", "reason" ], "dependentProperties": { "reservations": { "mapping": { "workspace_sid": "workspace_sid", "task_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Tasks/{task_sid}/Reservations" } }, "parent": "/Workspaces/{Sid}", "pathType": "list" }, "get": { "description": "", "tags": [ "TaskrouterV1Task" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Tasks to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Priority", "in": "query", "description": "The priority value of the Tasks to read. Returns the list of all Tasks in the Workspace with the specified priority.", "schema": { "type": "integer" }, "examples": { "readFull": { "value": 1 }, "readEmpty": { "value": 1 }, "readAssignmentStatusMultiple": { "value": 1 } } }, { "name": "AssignmentStatus", "in": "query", "description": "The `assignment_status` of the Tasks you want to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or `completed`. Returns all Tasks in the Workspace with the specified `assignment_status`.", "schema": { "type": "array", "items": { "type": "string" } }, "examples": { "readFull": { "value": "pending,reserved" }, "readEmpty": { "value": "pending" }, "readAssignmentStatusMultiple": { "value": [ "pending", "reserved" ] } } }, { "name": "WorkflowSid", "in": "query", "description": "The SID of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this SID.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WW[0-9a-fA-F]{32}$" }, "examples": { "readFull": { "value": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "readEmpty": { "value": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "readAssignmentStatusMultiple": { "value": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } }, { "name": "WorkflowName", "in": "query", "description": "The friendly name of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this friendly name.", "schema": { "type": "string" }, "examples": { "readFull": { "value": "workflow_name" }, "readEmpty": { "value": "workflow_name" }, "readAssignmentStatusMultiple": { "value": "workflow_name" } } }, { "name": "TaskQueueSid", "in": "query", "description": "The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$" }, "examples": { "readFull": { "value": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "readEmpty": { "value": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "readAssignmentStatusMultiple": { "value": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } }, { "name": "TaskQueueName", "in": "query", "description": "The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name.", "schema": { "type": "string" }, "examples": { "readFull": { "value": "task_queue_name" }, "readEmpty": { "value": "task_queue_name" }, "readAssignmentStatusMultiple": { "value": "task_queue_name" } } }, { "name": "EvaluateTaskAttributes", "in": "query", "description": "The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter.", "schema": { "type": "string" } }, { "name": "RoutingTarget", "in": "query", "description": "A SID of a Worker, Queue, or Workflow to route a Task to", "schema": { "type": "string" }, "examples": { "readFull": { "value": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "readEmpty": { "value": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "readAssignmentStatusMultiple": { "value": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } }, { "name": "Ordering", "in": "query", "description": "How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime.", "schema": { "type": "string" } }, { "name": "HasAddons", "in": "query", "description": "Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons.", "schema": { "type": "boolean" } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "tasks": { "type": "array", "items": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task" } }, "meta": { "properties": { "first_page_url": { "format": "uri", "type": "string" }, "key": { "type": "string" }, "next_page_url": { "format": "uri", "nullable": true, "type": "string" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "format": "uri", "nullable": true, "type": "string" }, "url": { "format": "uri", "type": "string" } }, "type": "object" } }, "title": "ListTaskResponse" }, "examples": { "readFull": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&RoutingTarget=WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&Priority=1&PageSize=50&Page=0", "key": "tasks", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&RoutingTarget=WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&Priority=1&PageSize=50&Page=0" }, "tasks": [ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "age": 25200, "assignment_status": "pending", "attributes": "{\"body\": \"hello\"}", "date_created": "2014-05-14T14:26:54Z", "date_updated": "2014-05-15T16:03:42Z", "task_queue_entered_date": "2014-05-14T14:26:54Z", "virtual_start_time": "2014-05-14T14:26:54Z", "priority": 0, "reason": "Test Reason", "sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_channel_unique_name": "task-channel", "timeout": 60, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workflow_sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workflow_friendly_name": "Test Workflow", "task_queue_friendly_name": "Test Queue", "ignore_capacity": false, "routing_target": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "addons": "{}", "required_attention": 0, "links": { "task_queue": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workflow": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations" } } ] } }, "readEmpty": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&RoutingTarget=WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending&Priority=1&PageSize=50&Page=0", "key": "tasks", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&RoutingTarget=WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending&Priority=1&PageSize=50&Page=0" }, "tasks": [] } }, "readAssignmentStatusMultiple": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&RoutingTarget=WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending&Priority=1&PageSize=50&Page=0", "key": "tasks", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&RoutingTarget=WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending&Priority=1&PageSize=50&Page=0" }, "tasks": [] } } } } }, "headers": { "ETag": { "schema": { "type": "string" } }, "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListTask" }, "post": { "description": "", "tags": [ "TaskrouterV1Task" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace that the new Task belongs to.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task" }, "examples": { "create": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "age": 25200, "assignment_status": "pending", "attributes": "{\"body\": \"attributes\"}", "date_created": "2014-05-14T18:50:02Z", "date_updated": "2014-05-15T07:26:06Z", "task_queue_entered_date": null, "virtual_start_time": "2014-05-14T18:50:02Z", "priority": 1, "reason": "Test Reason", "sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_channel_unique_name": "unique", "timeout": 60, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workflow_sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workflow_friendly_name": "Example Workflow", "task_queue_friendly_name": "Example Task Queue", "ignore_capacity": false, "routing_target": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "addons": "{}", "required_attention": 0, "links": { "task_queue": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workflow": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations" } } } } } }, "headers": { "ETag": { "schema": { "type": "string" } }, "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateTask", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateTaskRequest", "properties": { "Timeout": { "type": "integer", "description": "The amount of time in seconds the new task can live before being assigned. Can be up to a maximum of 2 weeks (1,209,600 seconds). The default value is 24 hours (86,400 seconds). On timeout, the `task.canceled` event will fire with description `Task TTL Exceeded`." }, "Priority": { "type": "integer", "description": "The priority to assign the new task and override the default. When supplied, the new Task will have this priority unless it matches a Workflow Target with a Priority set. When not supplied, the new Task will have the priority of the matching Workflow Target. Value can be 0 to 2^31^ (2,147,483,647)." }, "TaskChannel": { "type": "string", "description": "When MultiTasking is enabled, specify the TaskChannel by passing either its `unique_name` or `sid`. Default value is `default`." }, "WorkflowSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WW[0-9a-fA-F]{32}$", "description": "The SID of the Workflow that you would like to handle routing for the new Task. If there is only one Workflow defined for the Workspace that you are posting the new task to, this parameter is optional." }, "Attributes": { "type": "string", "description": "A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow's `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \"task_type\": \"call\", \"twilio_call_sid\": \"CAxxx\", \"customer_ticket_number\": \"12345\" }`." }, "VirtualStartTime": { "type": "string", "format": "date-time", "description": "The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can't be in the future or before the year of 1900." }, "RoutingTarget": { "type": "string", "description": "A SID of a Worker, Queue, or Workflow to route a Task to" }, "IgnoreCapacity": { "type": "string", "description": "A boolean that indicates if the Task should respect a Worker's capacity and availability during assignment. This field can only be used when the `RoutingTarget` field is set to a Worker SID. By setting `IgnoreCapacity` to a value of `true`, `1`, or `yes`, the Task will be routed to the Worker without respecting their capacity and availability. Any other value will enforce the Worker's capacity and availability. The default value of `IgnoreCapacity` is `true` when the `RoutingTarget` is set to a Worker SID. " }, "TaskQueueSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$", "description": "The SID of the TaskQueue in which the Task belongs" } } }, "examples": { "create": { "value": { "Attributes": "{\"body\": \"attributes\"}", "Priority": 1, "Timeout": 1, "WorkflowSid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "TaskChannel": "channel", "VirtualStartTime": "2014-05-14T18:50:02Z", "IgnoreCapacity": "false", "RoutingTarget": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "TaskQueueSid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "RequiredAttention": 0 } } } } } } } }, "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "Types of tasks", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "date_created" ], "parent": "/Workspaces/{Sid}", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1TaskChannel" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Task Channel to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Task Channel resource to fetch.", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task_channel" }, "examples": { "fetchSid": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2016-04-14T17:35:54Z", "date_updated": "2016-04-14T17:35:54Z", "friendly_name": "Default", "sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "unique_name": "default", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels/TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "channel_optimized_routing": true, "links": { "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } }, "fetchUniqueName": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2016-04-14T17:35:54Z", "date_updated": "2016-04-14T17:35:54Z", "friendly_name": "Default", "sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "unique_name": "default", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels/TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "channel_optimized_routing": false, "links": { "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchTaskChannel" }, "post": { "description": "", "tags": [ "TaskrouterV1TaskChannel" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Task Channel to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Task Channel resource to update.", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task_channel" }, "examples": { "updateSid": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Default", "unique_name": "default", "date_created": "2016-04-14T17:35:54Z", "date_updated": "2016-04-14T17:35:54Z", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels/TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "channel_optimized_routing": true, "links": { "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } }, "updateUniqueName": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Default", "unique_name": "default", "date_created": "2016-04-14T17:35:54Z", "date_updated": "2016-04-14T17:35:54Z", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels/TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "channel_optimized_routing": true, "links": { "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateTaskChannel", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateTaskChannelRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long." }, "ChannelOptimizedRouting": { "type": "boolean", "description": "Whether the TaskChannel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized." } } }, "examples": { "updateSid": { "value": { "FriendlyName": "Outbound Voice", "ChannelOptimizedRouting": true } }, "updateUniqueName": { "value": { "FriendlyName": "Outbound Voice", "ChannelOptimizedRouting": true } } } } } } }, "delete": { "description": "", "tags": [ "TaskrouterV1TaskChannel" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Task Channel to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Task Channel resource to delete.", "schema": { "type": "string" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully.", "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } } } } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteTaskChannel" } }, "/v1/Workspaces/{WorkspaceSid}/TaskChannels": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "Types of tasks", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "date_created" ], "parent": "/Workspaces/{Sid}", "pathType": "list" }, "get": { "description": "", "tags": [ "TaskrouterV1TaskChannel" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Task Channel to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "channels": { "type": "array", "items": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task_channel" } }, "meta": { "properties": { "first_page_url": { "format": "uri", "type": "string" }, "key": { "type": "string" }, "next_page_url": { "format": "uri", "nullable": true, "type": "string" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "format": "uri", "nullable": true, "type": "string" }, "url": { "format": "uri", "type": "string" } }, "type": "object" } }, "title": "ListTaskChannelResponse" }, "examples": { "readFull": { "value": { "channels": [ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2016-04-14T17:35:54Z", "date_updated": "2016-04-14T17:35:54Z", "friendly_name": "Default", "sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "unique_name": "default", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels/TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "channel_optimized_routing": true, "links": { "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } ], "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels?PageSize=50&Page=0", "key": "channels", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels?PageSize=50&Page=0" } } }, "readEmpty": { "value": { "channels": [], "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels?PageSize=50&Page=0", "key": "channels", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels?PageSize=50&Page=0" } } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListTaskChannel" }, "post": { "description": "", "tags": [ "TaskrouterV1TaskChannel" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace that the new Task Channel belongs to.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task_channel" }, "examples": { "create": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Outbound Voice", "unique_name": "ovoice", "date_created": "2016-04-14T17:35:54Z", "date_updated": "2016-04-14T17:35:54Z", "channel_optimized_routing": true, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels/TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateTaskChannel", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateTaskChannelRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long." }, "UniqueName": { "type": "string", "description": "An application-defined string that uniquely identifies the Task Channel, such as `voice` or `sms`." }, "ChannelOptimizedRouting": { "type": "boolean", "description": "Whether the Task Channel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized." } }, "required": [ "FriendlyName", "UniqueName" ] }, "examples": { "create": { "value": { "FriendlyName": "Outbound Voice", "UniqueName": "ovoice", "RequiredAttention": 0 } } } } } } } }, "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "task_order" ], "dependentProperties": { "statistics": { "mapping": { "workspace_sid": "workspace_sid", "task_queue_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/TaskQueues/{task_queue_sid}/Statistics" }, "real_time_statistics": { "mapping": { "workspace_sid": "workspace_sid", "task_queue_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/TaskQueues/{task_queue_sid}/RealTimeStatistics" }, "cumulative_statistics": { "mapping": { "workspace_sid": "workspace_sid", "task_queue_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/TaskQueues/{task_queue_sid}/CumulativeStatistics" } }, "parent": "/Workspaces/{Sid}", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1TaskQueue" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the TaskQueue to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the TaskQueue resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task_queue" }, "examples": { "fetch": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "assignment_activity_name": "817ca1c5-3a05-11e5-9292-98e0d9a1eb73", "assignment_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2015-08-04T01:31:41Z", "date_updated": "2015-08-04T01:31:41Z", "friendly_name": "81f96435-3a05-11e5-9f81-98e0d9a1eb73", "max_reserved_workers": 1, "links": { "assignment_activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "reservation_activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics", "list_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/Statistics", "bulk_real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/RealTimeStatistics" }, "reservation_activity_name": "80fa2beb-3a05-11e5-8fc8-98e0d9a1eb73", "reservation_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "target_workers": null, "task_order": "FIFO", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "operating_unit_sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchTaskQueue" }, "post": { "description": "", "tags": [ "TaskrouterV1TaskQueue" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the TaskQueue to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the TaskQueue resource to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task_queue" }, "examples": { "update": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "assignment_activity_name": "817ca1c5-3a05-11e5-9292-98e0d9a1eb73", "assignment_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2015-08-04T01:31:41Z", "date_updated": "2015-08-04T01:31:41Z", "friendly_name": "81f96435-3a05-11e5-9f81-98e0d9a1eb73", "max_reserved_workers": 1, "links": { "assignment_activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "reservation_activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics", "list_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/Statistics", "bulk_real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/RealTimeStatistics" }, "reservation_activity_name": "80fa2beb-3a05-11e5-8fc8-98e0d9a1eb73", "reservation_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "target_workers": null, "task_order": "FIFO", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "operating_unit_sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateTaskQueue", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateTaskQueueRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`." }, "TargetWorkers": { "type": "string", "description": "A string describing the Worker selection criteria for any Tasks that enter the TaskQueue. For example '\"language\" == \"spanish\"' If no TargetWorkers parameter is provided, Tasks will wait in the queue until they are either deleted or moved to another queue. Additional examples on how to describing Worker selection criteria below." }, "ReservationActivitySid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "description": "The SID of the Activity to assign Workers when a task is reserved for them." }, "AssignmentActivitySid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "description": "The SID of the Activity to assign Workers when a task is assigned for them." }, "MaxReservedWorkers": { "type": "integer", "description": "The maximum number of Workers to create reservations for the assignment of a task while in the queue. Maximum of 50." }, "TaskOrder": { "type": "string", "$ref": "#/components/schemas/task_queue_enum_task_order", "description": "How Tasks will be assigned to Workers. Can be: `FIFO` or `LIFO` and the default is `FIFO`. Use `FIFO` to assign the oldest task first and `LIFO` to assign the most recent task first. For more information, see [Queue Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo)." } } }, "examples": { "update": { "value": { "AssignmentActivitySid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "FriendlyName": "friendly_name", "MaxReservedWorkers": 1, "ReservationActivitySid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "TargetWorkers": "target_workers", "OperatingUnitSid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } } } }, "delete": { "description": "", "tags": [ "TaskrouterV1TaskQueue" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the TaskQueue to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the TaskQueue resource to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully.", "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } } } } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteTaskQueue" } }, "/v1/Workspaces/{WorkspaceSid}/TaskQueues": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "task_order" ], "dependentProperties": { "statistics": { "mapping": { "workspace_sid": "workspace_sid", "task_queue_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/TaskQueues/{task_queue_sid}/Statistics" }, "real_time_statistics": { "mapping": { "workspace_sid": "workspace_sid", "task_queue_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/TaskQueues/{task_queue_sid}/RealTimeStatistics" }, "cumulative_statistics": { "mapping": { "workspace_sid": "workspace_sid", "task_queue_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/TaskQueues/{task_queue_sid}/CumulativeStatistics" } }, "parent": "/Workspaces/{Sid}", "pathType": "list" }, "get": { "description": "", "tags": [ "TaskrouterV1TaskQueue" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the TaskQueue to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "FriendlyName", "in": "query", "description": "The `friendly_name` of the TaskQueue resources to read.", "schema": { "type": "string" }, "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } }, "examples": { "readFull": { "value": "friendly_name" }, "readEmpty": { "value": "friendly_name" } } }, { "name": "EvaluateWorkerAttributes", "in": "query", "description": "The attributes of the Workers to read. Returns the TaskQueues with Workers that match the attributes specified in this parameter.", "schema": { "type": "string" }, "examples": { "readFull": { "value": "evaluate_worker_attributes" }, "readEmpty": { "value": "evaluate_worker_attributes" } } }, { "name": "WorkerSid", "in": "query", "description": "The SID of the Worker with the TaskQueue resources to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$" } }, { "name": "Ordering", "in": "query", "description": "Sorting parameter for TaskQueues", "schema": { "type": "string" } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "task_queues": { "type": "array", "items": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task_queue" } }, "meta": { "properties": { "first_page_url": { "format": "uri", "type": "string" }, "key": { "type": "string" }, "next_page_url": { "format": "uri", "nullable": true, "type": "string" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "format": "uri", "nullable": true, "type": "string" }, "url": { "format": "uri", "type": "string" } }, "type": "object" } }, "title": "ListTaskQueueResponse" }, "examples": { "readFull": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues?EvaluateWorkerAttributes=evaluate_worker_attributes&FriendlyName=friendly_name&PageSize=50&Page=0", "key": "task_queues", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues?EvaluateWorkerAttributes=evaluate_worker_attributes&FriendlyName=friendly_name&PageSize=50&Page=0" }, "task_queues": [ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "assignment_activity_name": "817ca1c5-3a05-11e5-9292-98e0d9a1eb73", "assignment_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2015-08-04T01:31:41Z", "date_updated": "2015-08-04T01:31:41Z", "friendly_name": "81f96435-3a05-11e5-9f81-98e0d9a1eb73", "max_reserved_workers": 1, "links": { "assignment_activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "reservation_activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics", "list_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/Statistics", "bulk_real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/RealTimeStatistics" }, "reservation_activity_name": "80fa2beb-3a05-11e5-8fc8-98e0d9a1eb73", "reservation_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "target_workers": null, "task_order": "FIFO", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "operating_unit_sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] } }, "readEmpty": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues?EvaluateWorkerAttributes=evaluate_worker_attributes&FriendlyName=friendly_name&PageSize=50&Page=0", "key": "task_queues", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues?EvaluateWorkerAttributes=evaluate_worker_attributes&FriendlyName=friendly_name&PageSize=50&Page=0" }, "task_queues": [] } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListTaskQueue" }, "post": { "description": "", "tags": [ "TaskrouterV1TaskQueue" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace that the new TaskQueue belongs to.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task_queue" }, "examples": { "create": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "assignment_activity_name": "817ca1c5-3a05-11e5-9292-98e0d9a1eb73", "assignment_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2015-08-04T01:31:41Z", "date_updated": "2015-08-04T01:31:41Z", "friendly_name": "81f96435-3a05-11e5-9f81-98e0d9a1eb73", "max_reserved_workers": 1, "links": { "assignment_activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "reservation_activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics", "list_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/Statistics", "bulk_real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/RealTimeStatistics" }, "reservation_activity_name": "80fa2beb-3a05-11e5-8fc8-98e0d9a1eb73", "reservation_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "target_workers": null, "task_order": "FIFO", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "operating_unit_sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateTaskQueue", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateTaskQueueRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`." }, "TargetWorkers": { "type": "string", "description": "A string that describes the Worker selection criteria for any Tasks that enter the TaskQueue. For example, `'\"language\" == \"spanish\"'`. The default value is `1==1`. If this value is empty, Tasks will wait in the TaskQueue until they are deleted or moved to another TaskQueue. For more information about Worker selection, see [Describing Worker selection criteria](https://www.twilio.com/docs/taskrouter/api/taskqueues#target-workers)." }, "MaxReservedWorkers": { "type": "integer", "description": "The maximum number of Workers to reserve for the assignment of a Task in the queue. Can be an integer between 1 and 50, inclusive and defaults to 1." }, "TaskOrder": { "type": "string", "$ref": "#/components/schemas/task_queue_enum_task_order", "description": "How Tasks will be assigned to Workers. Set this parameter to `LIFO` to assign most recently created Task first or FIFO to assign the oldest Task first. Default is `FIFO`. [Click here](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo) to learn more." }, "ReservationActivitySid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "description": "The SID of the Activity to assign Workers when a task is reserved for them." }, "AssignmentActivitySid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "description": "The SID of the Activity to assign Workers when a task is assigned to them." } }, "required": [ "FriendlyName" ] }, "examples": { "create": { "value": { "AssignmentActivitySid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "FriendlyName": "friendly_name", "MaxReservedWorkers": 1, "ReservationActivitySid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "TargetWorkers": "target_workers", "OperatingUnitSid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } } } } }, "/v1/Workspaces/{WorkspaceSid}/TaskQueues/RealTimeStatistics": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "account_sid", "workspace_sid", "task_queue_data", "task_queue_response_count" ], "parent": "/Workspaces/{WorkspaceSid}/TaskQueues", "mountName": "bulk_real_time_statistics", "className": "task_queue_bulk_real_time_statistics", "pathType": "list" }, "post": { "description": "Fetch a Task Queue Real Time Statistics in bulk for the array of TaskQueue SIDs, support upto 50 in a request.", "tags": [ "TaskrouterV1TaskQueueBulkRealTimeStatistics" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The unique SID identifier of the Workspace.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task_queue.task_queue_bulk_real_time_statistics" }, "examples": { "create": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/RealTimeStatistics", "task_queue_data": [ { "task_queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "longest_task_waiting_age": 100, "longest_task_waiting_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "total_tasks": 100, "total_eligible_workers": 100, "total_available_workers": 100, "tasks_by_status": { "reserved": 0, "pending": 0, "assigned": 0, "wrapping": 0 }, "tasks_by_priority": {}, "activity_statistics": [ { "friendly_name": "Idle", "workers": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, { "friendly_name": "Busy", "workers": 9, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, { "friendly_name": "Offline", "workers": 6, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, { "friendly_name": "Reserved", "workers": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] } ], "task_queue_response_count": 100 } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateTaskQueueBulkRealTimeStatistics", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "title": "CreateTaskQueueBulkRealTimeStatisticsRequest", "properties": {} } } } } } }, "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/CumulativeStatistics": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "start_time", "end_time", "avg_task_acceptance_time", "tasks_completed" ], "parent": "/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}", "className": "task_queue_cumulative_statistics", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1TaskQueueCumulativeStatistics" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the TaskQueue to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "TaskQueueSid", "in": "path", "description": "The SID of the TaskQueue for which to fetch statistics.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$" }, "required": true }, { "name": "EndDate", "in": "query", "description": "Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2015-07-30T20:00:00Z" } } }, { "name": "Minutes", "in": "query", "description": "Only calculate statistics since this many minutes in the past. The default is 15 minutes.", "schema": { "type": "integer" } }, { "name": "StartDate", "in": "query", "description": "Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2015-07-30T20:00:00Z" } } }, { "name": "TaskChannel", "in": "query", "description": "Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.", "schema": { "type": "string" } }, { "name": "SplitByWaitTime", "in": "query", "description": "A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. TaskRouter will calculate statistics on up to 10,000 Tasks/Reservations for any given threshold.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics" }, "examples": { "fetch": { "value": { "reservations_created": 100, "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "reservations_rejected": 100, "tasks_completed": 100, "end_time": "2015-07-30T20:00:00Z", "tasks_entered": 100, "tasks_canceled": 100, "reservations_accepted": 100, "task_queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "reservations_timed_out": 100, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics", "wait_duration_until_canceled": { "avg": 0, "min": 0, "max": 0, "total": 0 }, "wait_duration_until_accepted": { "avg": 0, "min": 0, "max": 0, "total": 0 }, "wait_duration_in_queue_until_accepted": { "avg": 0, "min": 0, "max": 0, "total": 0 }, "split_by_wait_time": { "5": { "above": { "tasks_canceled": 0, "reservations_accepted": 0 }, "below": { "tasks_canceled": 0, "reservations_accepted": 0 } }, "10": { "above": { "tasks_canceled": 0, "reservations_accepted": 0 }, "below": { "tasks_canceled": 0, "reservations_accepted": 0 } } }, "start_time": "2015-07-30T20:00:00Z", "tasks_moved": 100, "reservations_canceled": 100, "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "tasks_deleted": 100, "reservations_rescinded": 100, "avg_task_acceptance_time": 100 } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchTaskQueueCumulativeStatistics" } }, "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/RealTimeStatistics": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "longest_task_waiting_age", "longest_task_waiting_sid", "total_tasks" ], "parent": "/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}", "className": "task_queue_real_time_statistics", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1TaskQueueRealTimeStatistics" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the TaskQueue to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "TaskQueueSid", "in": "path", "description": "The SID of the TaskQueue for which to fetch statistics.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$" }, "required": true }, { "name": "TaskChannel", "in": "query", "description": "The TaskChannel for which to fetch statistics. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.", "schema": { "type": "string" }, "examples": { "fetch": { "value": "voice" } } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics" }, "examples": { "fetch": { "value": { "longest_task_waiting_age": 100, "longest_task_waiting_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "longest_relative_task_age_in_queue": 100, "longest_relative_task_sid_in_queue": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "tasks_by_status": { "reserved": 0, "pending": 0, "assigned": 0, "wrapping": 0 }, "total_eligible_workers": 100, "activity_statistics": [ { "friendly_name": "Idle", "workers": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, { "friendly_name": "Busy", "workers": 9, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, { "friendly_name": "Offline", "workers": 6, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, { "friendly_name": "Reserved", "workers": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ], "tasks_by_priority": {}, "total_tasks": 100, "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "total_available_workers": 100, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchTaskQueueRealTimeStatistics" } }, "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/Statistics": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "cumulative" ], "parent": "/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}", "className": "task_queue_statistics", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1TaskQueueStatistics" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the TaskQueue to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "TaskQueueSid", "in": "path", "description": "The SID of the TaskQueue for which to fetch statistics.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$" }, "required": true }, { "name": "EndDate", "in": "query", "description": "Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2008-01-02T00:00:00Z" } } }, { "name": "Minutes", "in": "query", "description": "Only calculate statistics since this many minutes in the past. The default is 15 minutes.", "schema": { "type": "integer" }, "examples": { "fetch": { "value": 1 } } }, { "name": "StartDate", "in": "query", "description": "Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2008-01-02T00:00:00Z" } } }, { "name": "TaskChannel", "in": "query", "description": "Only calculate real-time and cumulative statistics for the specified TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.", "schema": { "type": "string" } }, { "name": "SplitByWaitTime", "in": "query", "description": "A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task_queue.task_queue_statistics" }, "examples": { "fetch": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "cumulative": { "avg_task_acceptance_time": 0.0, "end_time": "2015-08-18T08:42:34Z", "reservations_accepted": 0, "reservations_canceled": 0, "reservations_created": 0, "reservations_rejected": 0, "reservations_rescinded": 0, "reservations_timed_out": 0, "start_time": "2015-08-18T08:27:34Z", "tasks_canceled": 0, "tasks_deleted": 0, "tasks_entered": 0, "tasks_moved": 0 }, "realtime": { "activity_statistics": [ { "friendly_name": "Offline", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 }, { "friendly_name": "Idle", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 }, { "friendly_name": "80fa2beb-3a05-11e5-8fc8-98e0d9a1eb73", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 }, { "friendly_name": "Reserved", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 }, { "friendly_name": "Busy", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 }, { "friendly_name": "817ca1c5-3a05-11e5-9292-98e0d9a1eb73", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 } ], "longest_task_waiting_age": 0, "longest_task_waiting_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "tasks_by_status": { "assigned": 0, "pending": 0, "reserved": 0, "wrapping": 0 }, "total_available_workers": 0, "total_eligible_workers": 0, "total_tasks": 0 }, "task_queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchTaskQueueStatistics" } }, "/v1/Workspaces/{WorkspaceSid}/TaskQueues/Statistics": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "cumulative" ], "parent": "/Workspaces/{WorkspaceSid}/TaskQueues", "className": "task_queues_statistics", "pathType": "list" }, "get": { "description": "", "tags": [ "TaskrouterV1TaskQueuesStatistics" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the TaskQueues to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "EndDate", "in": "query", "description": "Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.", "schema": { "type": "string", "format": "date-time" }, "examples": { "readFull": { "value": "2008-01-02T00:00:00Z" }, "readEmpty": { "value": "2008-01-02T00:00:00Z" } } }, { "name": "FriendlyName", "in": "query", "description": "The `friendly_name` of the TaskQueue statistics to read.", "schema": { "type": "string" }, "examples": { "readFull": { "value": "friendly_name" }, "readEmpty": { "value": "friendly_name" } } }, { "name": "Minutes", "in": "query", "description": "Only calculate statistics since this many minutes in the past. The default is 15 minutes.", "schema": { "type": "integer" }, "examples": { "readFull": { "value": 1 }, "readEmpty": { "value": 1 } } }, { "name": "StartDate", "in": "query", "description": "Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.", "schema": { "type": "string", "format": "date-time" }, "examples": { "readFull": { "value": "2008-01-02T00:00:00Z" }, "readEmpty": { "value": "2008-01-02T00:00:00Z" } } }, { "name": "TaskChannel", "in": "query", "description": "Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.", "schema": { "type": "string" } }, { "name": "SplitByWaitTime", "in": "query", "description": "A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed.", "schema": { "type": "string" } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "task_queues_statistics": { "type": "array", "items": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task_queue.task_queues_statistics" } }, "meta": { "properties": { "first_page_url": { "format": "uri", "type": "string" }, "key": { "type": "string" }, "next_page_url": { "format": "uri", "nullable": true, "type": "string" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "format": "uri", "nullable": true, "type": "string" }, "url": { "format": "uri", "type": "string" } }, "type": "object" } }, "title": "ListTaskQueuesStatisticsResponse" }, "examples": { "readFull": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/Statistics?FriendlyName=friendly_name&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-02T00%3A00%3A00Z&Minutes=1&PageSize=50&Page=0", "key": "task_queues_statistics", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/Statistics?FriendlyName=friendly_name&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-02T00%3A00%3A00Z&Minutes=1&PageSize=50&Page=0" }, "task_queues_statistics": [ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "cumulative": { "avg_task_acceptance_time": 0.0, "end_time": "2015-08-18T08:46:15Z", "reservations_accepted": 0, "reservations_canceled": 0, "reservations_created": 0, "reservations_rejected": 0, "reservations_rescinded": 0, "reservations_timed_out": 0, "start_time": "2015-08-18T08:31:15Z", "tasks_canceled": 0, "tasks_deleted": 0, "tasks_entered": 0, "tasks_moved": 0 }, "realtime": { "activity_statistics": [ { "friendly_name": "Offline", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 }, { "friendly_name": "Idle", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 }, { "friendly_name": "80fa2beb-3a05-11e5-8fc8-98e0d9a1eb73", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 }, { "friendly_name": "Reserved", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 }, { "friendly_name": "Busy", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 }, { "friendly_name": "817ca1c5-3a05-11e5-9292-98e0d9a1eb73", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 } ], "longest_task_waiting_age": 0, "longest_task_waiting_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "tasks_by_status": { "assigned": 0, "pending": 0, "reserved": 0, "wrapping": 0 }, "total_available_workers": 0, "total_eligible_workers": 0, "total_tasks": 0 }, "task_queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] } }, "readEmpty": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/Statistics?FriendlyName=friendly_name&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-02T00%3A00%3A00Z&Minutes=1&PageSize=50&Page=0", "key": "task_queues_statistics", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/Statistics?FriendlyName=friendly_name&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-02T00%3A00%3A00Z&Minutes=1&PageSize=50&Page=0" }, "task_queues_statistics": [] } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListTaskQueuesStatistics" } }, "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "Tasks reserved for workers", "x-twilio": { "defaultOutputProperties": [ "sid", "reservation_status", "worker_name", "worker_sid" ], "parent": "/Workspaces/{WorkspaceSid}/Tasks/{Sid}", "pathType": "list" }, "get": { "description": "", "tags": [ "TaskrouterV1TaskReservation" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the TaskReservation resources to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "TaskSid", "in": "path", "description": "The SID of the reserved Task resource with the TaskReservation resources to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WT[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ReservationStatus", "in": "query", "description": "Returns the list of reservations for a task with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, or `timeout`.", "schema": { "type": "string", "$ref": "#/components/schemas/task_reservation_enum_status" } }, { "name": "WorkerSid", "in": "query", "description": "The SID of the reserved Worker resource to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$" } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "reservations": { "type": "array", "items": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task.task_reservation" } }, "meta": { "properties": { "first_page_url": { "format": "uri", "type": "string" }, "key": { "type": "string" }, "next_page_url": { "format": "uri", "nullable": true, "type": "string" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "format": "uri", "nullable": true, "type": "string" }, "url": { "format": "uri", "type": "string" } }, "type": "object" } }, "title": "ListTaskReservationResponse" }, "examples": { "readFull": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations?PageSize=50&Page=0", "key": "reservations", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations?PageSize=50&Page=0" }, "reservations": [ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2014-05-14T10:50:02Z", "date_updated": "2014-05-15T16:03:42Z", "links": { "task": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "reservation_status": "accepted", "sid": "WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations/WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker_name": "Doug", "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attention": 0 } ] } }, "readEmpty": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations?PageSize=50&Page=0", "key": "reservations", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations?PageSize=50&Page=0" }, "reservations": [] } } } } }, "headers": { "ETag": { "schema": { "type": "string" } }, "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListTaskReservation" } }, "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "Tasks reserved for workers", "x-twilio": { "defaultOutputProperties": [ "sid", "reservation_status", "worker_name", "worker_sid" ], "parent": "/Workspaces/{WorkspaceSid}/Tasks/{Sid}", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1TaskReservation" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the TaskReservation resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "TaskSid", "in": "path", "description": "The SID of the reserved Task resource with the TaskReservation resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WT[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the TaskReservation resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WR[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task.task_reservation" }, "examples": { "fetch": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2014-05-14T10:50:02Z", "date_updated": "2014-05-15T16:03:42Z", "links": { "task": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "reservation_status": "accepted", "sid": "WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations/WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker_name": "Doug", "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attention": 0 } } } } }, "headers": { "Etag": { "schema": { "type": "string" } }, "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchTaskReservation" }, "post": { "description": "", "tags": [ "TaskrouterV1TaskReservation" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the TaskReservation resources to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "TaskSid", "in": "path", "description": "The SID of the reserved Task resource with the TaskReservation resources to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WT[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the TaskReservation resource to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WR[0-9a-fA-F]{32}$" }, "required": true }, { "name": "If-Match", "in": "header", "description": "The If-Match HTTP request header", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.task.task_reservation" }, "examples": { "update": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2014-05-14T10:50:02Z", "date_updated": "2014-05-15T16:03:42Z", "links": { "task": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "reservation_status": "accepted", "sid": "WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations/WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker_name": "Doug", "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attention": 0 } }, "updateSuperviseInstruction": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2014-05-14T10:50:02Z", "date_updated": "2014-05-15T16:03:42Z", "links": { "task": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "reservation_status": "accepted", "sid": "WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations/WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker_name": "Doug", "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attention": 0 } } } } }, "headers": { "ETag": { "schema": { "type": "string" } }, "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateTaskReservation", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateTaskReservationRequest", "properties": { "ReservationStatus": { "type": "string", "$ref": "#/components/schemas/task_reservation_enum_status", "description": "The new status of the reservation. Can be: `pending`, `accepted`, `rejected`, or `timeout`." }, "WorkerActivitySid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "description": "The new worker activity SID if rejecting a reservation." }, "Instruction": { "type": "string", "description": "The assignment instruction for reservation." }, "DequeuePostWorkActivitySid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "description": "The SID of the Activity resource to start after executing a Dequeue instruction." }, "DequeueFrom": { "type": "string", "description": "The Caller ID of the call to the worker when executing a Dequeue instruction." }, "DequeueRecord": { "type": "string", "description": "Whether to record both legs of a call when executing a Dequeue instruction or which leg to record." }, "DequeueTimeout": { "type": "integer", "description": "Timeout for call when executing a Dequeue instruction." }, "DequeueTo": { "type": "string", "description": "The Contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination." }, "DequeueStatusCallbackUrl": { "type": "string", "format": "uri", "description": "The Callback URL for completed call event when executing a Dequeue instruction." }, "CallFrom": { "type": "string", "description": "The Caller ID of the outbound call when executing a Call instruction." }, "CallRecord": { "type": "string", "description": "Whether to record both legs of a call when executing a Call instruction or which leg to record." }, "CallTimeout": { "type": "integer", "description": "Timeout for call when executing a Call instruction." }, "CallTo": { "type": "string", "description": "The Contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination." }, "CallUrl": { "type": "string", "format": "uri", "description": "TwiML URI executed on answering the worker's leg as a result of the Call instruction." }, "CallStatusCallbackUrl": { "type": "string", "format": "uri", "description": "The URL to call for the completed call event when executing a Call instruction." }, "CallAccept": { "type": "boolean", "description": "Whether to accept a reservation when executing a Call instruction." }, "RedirectCallSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^CA[0-9a-fA-F]{32}$", "description": "The Call SID of the call parked in the queue when executing a Redirect instruction." }, "RedirectAccept": { "type": "boolean", "description": "Whether the reservation should be accepted when executing a Redirect instruction." }, "RedirectUrl": { "type": "string", "format": "uri", "description": "TwiML URI to redirect the call to when executing the Redirect instruction." }, "To": { "type": "string", "description": "The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination." }, "From": { "type": "string", "description": "The Caller ID of the call to the worker when executing a Conference instruction." }, "StatusCallback": { "type": "string", "format": "uri", "description": "The URL we should call using the `status_callback_method` to send status information to your application." }, "StatusCallbackMethod": { "type": "string", "format": "http-method", "enum": [ "GET", "POST" ], "description": "The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`." }, "StatusCallbackEvent": { "type": "array", "items": { "type": "string", "$ref": "#/components/schemas/task_reservation_enum_call_status" }, "description": "The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`." }, "Timeout": { "type": "integer", "description": "Timeout for call when executing a Conference instruction." }, "Record": { "type": "boolean", "description": "Whether to record the participant and their conferences, including the time between conferences. The default is `false`." }, "Muted": { "type": "boolean", "description": "Whether the agent is muted in the conference. The default is `false`." }, "Beep": { "type": "string", "description": "Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`." }, "StartConferenceOnEnter": { "type": "boolean", "description": "Whether to start the conference when the participant joins, if it has not already started. The default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference." }, "EndConferenceOnExit": { "type": "boolean", "description": "Whether to end the conference when the agent leaves." }, "WaitUrl": { "type": "string", "format": "uri", "description": "The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic)." }, "WaitMethod": { "type": "string", "format": "http-method", "enum": [ "GET", "POST" ], "description": "The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file." }, "EarlyMedia": { "type": "boolean", "description": "Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`." }, "MaxParticipants": { "type": "integer", "description": "The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`." }, "ConferenceStatusCallback": { "type": "string", "format": "uri", "description": "The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored." }, "ConferenceStatusCallbackMethod": { "type": "string", "format": "http-method", "enum": [ "GET", "POST" ], "description": "The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`." }, "ConferenceStatusCallbackEvent": { "type": "array", "items": { "type": "string", "$ref": "#/components/schemas/task_reservation_enum_conference_event" }, "description": "The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`." }, "ConferenceRecord": { "type": "string", "description": "Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`." }, "ConferenceTrim": { "type": "string", "description": "How to trim the leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`." }, "RecordingChannels": { "type": "string", "description": "The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`." }, "RecordingStatusCallback": { "type": "string", "format": "uri", "description": "The URL that we should call using the `recording_status_callback_method` when the recording status changes." }, "RecordingStatusCallbackMethod": { "type": "string", "format": "http-method", "enum": [ "GET", "POST" ], "description": "The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`." }, "ConferenceRecordingStatusCallback": { "type": "string", "format": "uri", "description": "The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available." }, "ConferenceRecordingStatusCallbackMethod": { "type": "string", "format": "http-method", "enum": [ "GET", "POST" ], "description": "The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`." }, "Region": { "type": "string", "description": "The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`." }, "SipAuthUsername": { "type": "string", "description": "The SIP username used for authentication." }, "SipAuthPassword": { "type": "string", "description": "The SIP password for authentication." }, "DequeueStatusCallbackEvent": { "type": "array", "items": { "type": "string" }, "description": "The Call progress events sent via webhooks as a result of a Dequeue instruction." }, "PostWorkActivitySid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "description": "The new worker activity SID after executing a Conference instruction." }, "SupervisorMode": { "type": "string", "$ref": "#/components/schemas/task_reservation_enum_supervisor_mode", "description": "The Supervisor mode when executing the Supervise instruction." }, "Supervisor": { "type": "string", "description": "The Supervisor SID/URI when executing the Supervise instruction." }, "EndConferenceOnCustomerExit": { "type": "boolean", "description": "Whether to end the conference when the customer leaves." }, "BeepOnCustomerEntrance": { "type": "boolean", "description": "Whether to play a notification beep when the customer joins." }, "JitterBufferSize": { "type": "string", "description": "The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`." } } }, "examples": { "update": { "value": { "ReservationStatus": "accepted" } }, "updateSuperviseInstruction": { "value": { "Instruction": "supervise", "SupervisorMode": "monitor", "Supervisor": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } } } } }, "/v1/Workspaces/{WorkspaceSid}/Workers": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "available" ], "dependentProperties": { "real_time_statistics": { "mapping": { "workspace_sid": "workspace_sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workers/RealTimeStatistics" }, "cumulative_statistics": { "mapping": { "workspace_sid": "workspace_sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workers/CumulativeStatistics" }, "statistics": { "mapping": { "workspace_sid": "workspace_sid", "worker_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workers/{worker_sid}/Statistics" }, "reservations": { "mapping": { "workspace_sid": "workspace_sid", "worker_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workers/{worker_sid}/Reservations" }, "worker_channels": { "mapping": { "workspace_sid": "workspace_sid", "worker_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workers/{worker_sid}/Channels" } }, "parent": "/Workspaces/{Sid}", "pathType": "list" }, "get": { "description": "", "tags": [ "TaskrouterV1Worker" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Workers to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ActivityName", "in": "query", "description": "The `activity_name` of the Worker resources to read.", "schema": { "type": "string" }, "examples": { "readFull": { "value": "activity_name" }, "readEmpty": { "value": "activity_name" } } }, { "name": "ActivitySid", "in": "query", "description": "The `activity_sid` of the Worker resources to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$" }, "examples": { "readFull": { "value": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "readEmpty": { "value": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } }, { "name": "Available", "in": "query", "description": "Whether to return only Worker resources that are available or unavailable. Can be `true`, `1`, or `yes` to return Worker resources that are available, and `false`, or any value returns the Worker resources that are not available.", "schema": { "type": "string" }, "examples": { "readFull": { "value": "available" }, "readEmpty": { "value": "available" } } }, { "name": "FriendlyName", "in": "query", "description": "The `friendly_name` of the Worker resources to read.", "schema": { "type": "string" }, "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } }, "examples": { "readFull": { "value": "friendly_name" }, "readEmpty": { "value": "friendly_name" } } }, { "name": "TargetWorkersExpression", "in": "query", "description": "Filter by Workers that would match an expression. In addition to fields in the workers' attributes, the expression can include the following worker fields: `sid`, `friendly_name`, `activity_sid`, or `activity_name`", "schema": { "type": "string" }, "examples": { "readFull": { "value": "target_workers_expression" }, "readEmpty": { "value": "target_workers_expression" } } }, { "name": "TaskQueueName", "in": "query", "description": "The `friendly_name` of the TaskQueue that the Workers to read are eligible for.", "schema": { "type": "string" }, "examples": { "readFull": { "value": "task_queue_name" }, "readEmpty": { "value": "task_queue_name" } } }, { "name": "TaskQueueSid", "in": "query", "description": "The SID of the TaskQueue that the Workers to read are eligible for.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$" }, "examples": { "readFull": { "value": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "readEmpty": { "value": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } }, { "name": "Ordering", "in": "query", "description": "Sorting parameter for Workers", "schema": { "type": "string" } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "workers": { "type": "array", "items": { "$ref": "#/components/schemas/taskrouter.v1.workspace.worker" } }, "meta": { "properties": { "first_page_url": { "format": "uri", "type": "string" }, "key": { "type": "string" }, "next_page_url": { "format": "uri", "nullable": true, "type": "string" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "format": "uri", "nullable": true, "type": "string" }, "url": { "format": "uri", "type": "string" } }, "type": "object" } }, "title": "ListWorkerResponse" }, "examples": { "readFull": { "value": { "meta": { "page": 0, "page_size": 50, "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers?Available=available&TargetWorkersExpression=target_workers_expression&TaskQueueName=task_queue_name&ActivityName=activity_name&ActivitySid=WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&FriendlyName=friendly_name&PageSize=50&Page=0", "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers?Available=available&TargetWorkersExpression=target_workers_expression&TaskQueueName=task_queue_name&ActivityName=activity_name&ActivitySid=WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&FriendlyName=friendly_name&PageSize=50&Page=0", "next_page_url": null, "key": "workers" }, "workers": [ { "sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "testWorker", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "activity_name": "Offline", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attributes": "{}", "available": false, "date_created": "2017-05-30T23:05:29Z", "date_updated": "2017-05-30T23:05:29Z", "date_status_changed": "2017-05-30T23:05:29Z", "operating_unit_sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "consumed_concurrency": 0, "consumed_attention": 0, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { "channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", "activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/CumulativeStatistics", "worker_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "worker_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", "reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations" } } ] } }, "readEmpty": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers?Available=available&TargetWorkersExpression=target_workers_expression&TaskQueueName=task_queue_name&ActivityName=activity_name&ActivitySid=WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&FriendlyName=friendly_name&PageSize=50&Page=0", "key": "workers", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers?Available=available&TargetWorkersExpression=target_workers_expression&TaskQueueName=task_queue_name&ActivityName=activity_name&ActivitySid=WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&FriendlyName=friendly_name&PageSize=50&Page=0" }, "workers": [] } } } } }, "headers": { "ETag": { "schema": { "type": "string" } }, "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListWorker" }, "post": { "description": "", "tags": [ "TaskrouterV1Worker" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace that the new Worker belongs to.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.worker" }, "examples": { "create": { "value": { "sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "NewWorker", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "activity_name": "Offline", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attributes": "{}", "available": false, "date_created": "2017-05-30T23:19:38Z", "date_updated": "2017-05-30T23:19:38Z", "date_status_changed": "2017-05-30T23:19:38Z", "operating_unit_sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "consumed_concurrency": 0, "consumed_attention": 0, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { "channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", "activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/CumulativeStatistics", "worker_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "worker_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", "reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations" } } } } } }, "headers": { "ETag": { "schema": { "type": "string" } }, "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateWorker", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateWorkerRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the new Worker. It can be up to 64 characters long." }, "ActivitySid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "description": "The SID of a valid Activity that will describe the new Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information. If not provided, the new Worker's initial state is the `default_activity_sid` configured on the Workspace." }, "Attributes": { "type": "string", "description": "A valid JSON string that describes the new Worker. For example: `{ \"email\": \"Bob@example.com\", \"phone\": \"+5095551234\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}." } }, "required": [ "FriendlyName" ] }, "examples": { "create": { "value": { "ActivitySid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Attributes": "attributes", "FriendlyName": "friendly_name", "OperatingUnitSid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } } } } }, "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "available" ], "dependentProperties": { "real_time_statistics": { "mapping": { "workspace_sid": "workspace_sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workers/RealTimeStatistics" }, "cumulative_statistics": { "mapping": { "workspace_sid": "workspace_sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workers/CumulativeStatistics" }, "statistics": { "mapping": { "workspace_sid": "workspace_sid", "worker_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workers/{worker_sid}/Statistics" }, "reservations": { "mapping": { "workspace_sid": "workspace_sid", "worker_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workers/{worker_sid}/Reservations" }, "worker_channels": { "mapping": { "workspace_sid": "workspace_sid", "worker_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workers/{worker_sid}/Channels" } }, "parent": "/Workspaces/{Sid}", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1Worker" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Worker to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Worker resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.worker" }, "examples": { "fetch": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "activity_name": "available", "activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attributes": "{}", "available": false, "date_created": "2017-05-30T23:32:39Z", "date_status_changed": "2017-05-30T23:32:39Z", "date_updated": "2017-05-30T23:32:39Z", "friendly_name": "NewWorker3", "sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "operating_unit_sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "consumed_concurrency": 0, "consumed_attention": 0, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { "channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", "activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/CumulativeStatistics", "worker_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "worker_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", "reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations" } } } } } }, "headers": { "ETag": { "schema": { "type": "string" } }, "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchWorker" }, "post": { "description": "", "tags": [ "TaskrouterV1Worker" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Worker to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Worker resource to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$" }, "required": true }, { "name": "If-Match", "in": "header", "description": "The If-Match HTTP request header", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.worker" }, "examples": { "update": { "value": { "sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "blah", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "activity_name": "Offline", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attributes": "{}", "available": false, "date_created": "2017-05-30T23:32:22Z", "date_updated": "2017-05-31T00:05:57Z", "date_status_changed": "2017-05-30T23:32:22Z", "operating_unit_sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "consumed_concurrency": 0, "consumed_attention": 0, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { "channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", "activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/CumulativeStatistics", "worker_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "worker_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", "reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations" } } } } } }, "headers": { "ETag": { "schema": { "type": "string" } }, "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateWorker", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateWorkerRequest", "properties": { "ActivitySid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "description": "The SID of a valid Activity that will describe the Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information." }, "Attributes": { "type": "string", "description": "The JSON string that describes the Worker. For example: `{ \"email\": \"Bob@example.com\", \"phone\": \"+5095551234\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}." }, "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the Worker. It can be up to 64 characters long." }, "RejectPendingReservations": { "type": "boolean", "description": "Whether to reject the Worker's pending reservations. This option is only valid if the Worker's new [Activity](https://www.twilio.com/docs/taskrouter/api/activity) resource has its `availability` property set to `False`." } } }, "examples": { "update": { "value": { "ActivitySid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Attributes": "attributes", "FriendlyName": "friendly_name", "OperatingUnitSid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } } } }, "delete": { "description": "", "tags": [ "TaskrouterV1Worker" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Worker to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Worker resource to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$" }, "required": true }, { "name": "If-Match", "in": "header", "description": "The If-Match HTTP request header", "schema": { "type": "string" } } ], "responses": { "204": { "description": "The resource was deleted successfully.", "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } } } } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteWorker" } }, "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "task_channel_sid", "task_channel_unique_name" ], "parent": "/Workspaces/{WorkspaceSid}/Workers/{Sid}", "mountName": "worker_channels", "pathType": "list" }, "get": { "description": "", "tags": [ "TaskrouterV1WorkerChannel" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the WorkerChannels to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "WorkerSid", "in": "path", "description": "The SID of the Worker with the WorkerChannels to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$" }, "required": true }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "channels": { "type": "array", "items": { "$ref": "#/components/schemas/taskrouter.v1.workspace.worker.worker_channel" } }, "meta": { "properties": { "first_page_url": { "format": "uri", "type": "string" }, "key": { "type": "string" }, "next_page_url": { "format": "uri", "nullable": true, "type": "string" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "format": "uri", "nullable": true, "type": "string" }, "url": { "format": "uri", "type": "string" } }, "type": "object" } }, "title": "ListWorkerChannelResponse" }, "examples": { "readFull": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels?PageSize=50&Page=0", "key": "channels", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels?PageSize=50&Page=0" }, "channels": [ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "assigned_tasks": 0, "available": true, "available_capacity_percentage": 100, "configured_capacity": 1, "date_created": "2016-04-14T17:35:54Z", "date_updated": "2016-04-14T17:35:54Z", "sid": "WCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_channel_unique_name": "default", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/WCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] } }, "readEmpty": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels?PageSize=50&Page=0", "key": "channels", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels?PageSize=50&Page=0" }, "channels": [] } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListWorkerChannel" } }, "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "task_channel_sid", "task_channel_unique_name" ], "parent": "/Workspaces/{WorkspaceSid}/Workers/{Sid}", "mountName": "worker_channels", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1WorkerChannel" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the WorkerChannel to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "WorkerSid", "in": "path", "description": "The SID of the Worker with the WorkerChannel to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the WorkerChannel to fetch.", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.worker.worker_channel" }, "examples": { "fetchSid": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "assigned_tasks": 0, "available": true, "available_capacity_percentage": 100, "configured_capacity": 1, "date_created": "2016-04-14T17:35:54Z", "date_updated": "2016-04-14T17:35:54Z", "sid": "WCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_channel_unique_name": "default", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/WCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchWorkerChannel" }, "post": { "description": "", "tags": [ "TaskrouterV1WorkerChannel" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the WorkerChannel to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "WorkerSid", "in": "path", "description": "The SID of the Worker with the WorkerChannel to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the WorkerChannel to update.", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.worker.worker_channel" }, "examples": { "update": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "assigned_tasks": 0, "available": true, "available_capacity_percentage": 100, "configured_capacity": 3, "date_created": "2016-04-14T17:35:54Z", "date_updated": "2016-04-14T17:35:54Z", "sid": "WCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_channel_unique_name": "default", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/WCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateWorkerChannel", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateWorkerChannelRequest", "properties": { "Capacity": { "type": "integer", "description": "The total number of Tasks that the Worker should handle for the TaskChannel type. TaskRouter creates reservations for Tasks of this TaskChannel type up to the specified capacity. If the capacity is 0, no new reservations will be created." }, "Available": { "type": "boolean", "description": "Whether the WorkerChannel is available. Set to `false` to prevent the Worker from receiving any new Tasks of this TaskChannel type." } } }, "examples": { "update": { "value": { "Capacity": 3 } } } } } } } }, "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Statistics": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "cumulative" ], "parent": "/Workspaces/{WorkspaceSid}/Workers/{Sid}", "className": "worker_statistics", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1WorkerStatistics" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the WorkerChannel to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "WorkerSid", "in": "path", "description": "The SID of the Worker with the WorkerChannel to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Minutes", "in": "query", "description": "Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.", "schema": { "type": "integer" }, "examples": { "fetch": { "value": 1 } } }, { "name": "StartDate", "in": "query", "description": "Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2008-01-02T00:00:00Z" } } }, { "name": "EndDate", "in": "query", "description": "Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2008-01-02T00:00:00Z" } } }, { "name": "TaskChannel", "in": "query", "description": "Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.worker.worker_instance_statistics" }, "examples": { "fetch": { "value": { "cumulative": { "reservations_created": 100, "reservations_accepted": 100, "reservations_rejected": 100, "reservations_timed_out": 100, "reservations_canceled": 100, "reservations_rescinded": 100, "activity_durations": [ { "max": 0, "min": 900, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Offline", "avg": 1080, "total": 5400 }, { "max": 0, "min": 900, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Busy", "avg": 1012, "total": 8100 }, { "max": 0, "min": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Idle", "avg": 0, "total": 0 }, { "max": 0, "min": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Reserved", "avg": 0, "total": 0 } ], "start_time": "2008-01-02T00:00:00Z", "end_time": "2008-01-02T00:00:00Z" }, "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchWorkerInstanceStatistics" } }, "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "Current and past reservations for a worker", "x-twilio": { "defaultOutputProperties": [ "sid", "reservation_status", "date_created" ], "parent": "/Workspaces/{WorkspaceSid}/Workers/{Sid}", "pathType": "list" }, "get": { "description": "", "tags": [ "TaskrouterV1WorkerReservation" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the WorkerReservation resources to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "WorkerSid", "in": "path", "description": "The SID of the reserved Worker resource with the WorkerReservation resources to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ReservationStatus", "in": "query", "description": "Returns the list of reservations for a worker with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`.", "schema": { "type": "string", "$ref": "#/components/schemas/worker_reservation_enum_status" } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "reservations": { "type": "array", "items": { "$ref": "#/components/schemas/taskrouter.v1.workspace.worker.worker_reservation" } }, "meta": { "properties": { "first_page_url": { "format": "uri", "type": "string" }, "key": { "type": "string" }, "next_page_url": { "format": "uri", "nullable": true, "type": "string" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "format": "uri", "nullable": true, "type": "string" }, "url": { "format": "uri", "type": "string" } }, "type": "object" } }, "title": "ListWorkerReservationResponse" }, "examples": { "readFull": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations?PageSize=50&Page=0", "key": "reservations", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations?PageSize=50&Page=0" }, "reservations": [ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2014-05-14T10:50:02Z", "date_updated": "2014-05-15T16:03:42Z", "links": { "task": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "reservation_status": "accepted", "sid": "WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations/WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker_name": "Doug", "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attention": 0 } ] } }, "readEmpty": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations?PageSize=50&Page=0", "key": "reservations", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations?PageSize=50&Page=0" }, "reservations": [] } } } } }, "headers": { "Etag": { "schema": { "type": "string" } }, "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListWorkerReservation" } }, "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "Current and past reservations for a worker", "x-twilio": { "defaultOutputProperties": [ "sid", "reservation_status", "date_created" ], "parent": "/Workspaces/{WorkspaceSid}/Workers/{Sid}", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1WorkerReservation" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the WorkerReservation resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "WorkerSid", "in": "path", "description": "The SID of the reserved Worker resource with the WorkerReservation resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the WorkerReservation resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WR[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.worker.worker_reservation" }, "examples": { "fetch": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2014-05-14T10:50:02Z", "date_updated": "2014-05-15T16:03:42Z", "links": { "task": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "reservation_status": "accepted", "sid": "WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations/WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker_name": "Doug", "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attention": 0 } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchWorkerReservation" }, "post": { "description": "", "tags": [ "TaskrouterV1WorkerReservation" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the WorkerReservation resources to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "WorkerSid", "in": "path", "description": "The SID of the reserved Worker resource with the WorkerReservation resources to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WK[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the WorkerReservation resource to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WR[0-9a-fA-F]{32}$" }, "required": true }, { "name": "If-Match", "in": "header", "description": "The If-Match HTTP request header", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.worker.worker_reservation" }, "examples": { "update": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2014-05-14T10:50:02Z", "date_updated": "2014-05-15T16:03:42Z", "links": { "task": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "reservation_status": "accepted", "sid": "WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations/WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worker_name": "Doug", "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attention": 0 } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateWorkerReservation", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateWorkerReservationRequest", "properties": { "ReservationStatus": { "type": "string", "$ref": "#/components/schemas/worker_reservation_enum_status", "description": "The new status of the reservation. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`." }, "WorkerActivitySid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "description": "The new worker activity SID if rejecting a reservation." }, "Instruction": { "type": "string", "description": "The assignment instruction for the reservation." }, "DequeuePostWorkActivitySid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "description": "The SID of the Activity resource to start after executing a Dequeue instruction." }, "DequeueFrom": { "type": "string", "description": "The caller ID of the call to the worker when executing a Dequeue instruction." }, "DequeueRecord": { "type": "string", "description": "Whether to record both legs of a call when executing a Dequeue instruction or which leg to record." }, "DequeueTimeout": { "type": "integer", "description": "The timeout for call when executing a Dequeue instruction." }, "DequeueTo": { "type": "string", "description": "The contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination." }, "DequeueStatusCallbackUrl": { "type": "string", "format": "uri", "description": "The callback URL for completed call event when executing a Dequeue instruction." }, "CallFrom": { "type": "string", "description": "The Caller ID of the outbound call when executing a Call instruction." }, "CallRecord": { "type": "string", "description": "Whether to record both legs of a call when executing a Call instruction." }, "CallTimeout": { "type": "integer", "description": "The timeout for a call when executing a Call instruction." }, "CallTo": { "type": "string", "description": "The contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination." }, "CallUrl": { "type": "string", "format": "uri", "description": "TwiML URI executed on answering the worker's leg as a result of the Call instruction." }, "CallStatusCallbackUrl": { "type": "string", "format": "uri", "description": "The URL to call for the completed call event when executing a Call instruction." }, "CallAccept": { "type": "boolean", "description": "Whether to accept a reservation when executing a Call instruction." }, "RedirectCallSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^CA[0-9a-fA-F]{32}$", "description": "The Call SID of the call parked in the queue when executing a Redirect instruction." }, "RedirectAccept": { "type": "boolean", "description": "Whether the reservation should be accepted when executing a Redirect instruction." }, "RedirectUrl": { "type": "string", "format": "uri", "description": "TwiML URI to redirect the call to when executing the Redirect instruction." }, "To": { "type": "string", "description": "The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination." }, "From": { "type": "string", "description": "The caller ID of the call to the worker when executing a Conference instruction." }, "StatusCallback": { "type": "string", "format": "uri", "description": "The URL we should call using the `status_callback_method` to send status information to your application." }, "StatusCallbackMethod": { "type": "string", "format": "http-method", "enum": [ "GET", "POST" ], "description": "The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`." }, "StatusCallbackEvent": { "type": "array", "items": { "type": "string", "$ref": "#/components/schemas/worker_reservation_enum_call_status" }, "description": "The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`." }, "Timeout": { "type": "integer", "description": "The timeout for a call when executing a Conference instruction." }, "Record": { "type": "boolean", "description": "Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`." }, "Muted": { "type": "boolean", "description": "Whether the agent is muted in the conference. Defaults to `false`." }, "Beep": { "type": "string", "description": "Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`." }, "StartConferenceOnEnter": { "type": "boolean", "description": "Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference." }, "EndConferenceOnExit": { "type": "boolean", "description": "Whether to end the conference when the agent leaves." }, "WaitUrl": { "type": "string", "format": "uri", "description": "The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic)." }, "WaitMethod": { "type": "string", "format": "http-method", "enum": [ "GET", "POST" ], "description": "The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file." }, "EarlyMedia": { "type": "boolean", "description": "Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`." }, "MaxParticipants": { "type": "integer", "description": "The maximum number of participants allowed in the conference. Can be a positive integer from `2` to `250`. The default value is `250`." }, "ConferenceStatusCallback": { "type": "string", "format": "uri", "description": "The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored." }, "ConferenceStatusCallbackMethod": { "type": "string", "format": "http-method", "enum": [ "GET", "POST" ], "description": "The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`." }, "ConferenceStatusCallbackEvent": { "type": "array", "items": { "type": "string", "$ref": "#/components/schemas/worker_reservation_enum_conference_event" }, "description": "The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`." }, "ConferenceRecord": { "type": "string", "description": "Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`." }, "ConferenceTrim": { "type": "string", "description": "Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`." }, "RecordingChannels": { "type": "string", "description": "The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`." }, "RecordingStatusCallback": { "type": "string", "format": "uri", "description": "The URL that we should call using the `recording_status_callback_method` when the recording status changes." }, "RecordingStatusCallbackMethod": { "type": "string", "format": "http-method", "enum": [ "GET", "POST" ], "description": "The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`." }, "ConferenceRecordingStatusCallback": { "type": "string", "format": "uri", "description": "The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available." }, "ConferenceRecordingStatusCallbackMethod": { "type": "string", "format": "http-method", "enum": [ "GET", "POST" ], "description": "The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`." }, "Region": { "type": "string", "description": "The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`." }, "SipAuthUsername": { "type": "string", "description": "The SIP username used for authentication." }, "SipAuthPassword": { "type": "string", "description": "The SIP password for authentication." }, "DequeueStatusCallbackEvent": { "type": "array", "items": { "type": "string" }, "description": "The call progress events sent via webhooks as a result of a Dequeue instruction." }, "PostWorkActivitySid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "description": "The new worker activity SID after executing a Conference instruction." }, "EndConferenceOnCustomerExit": { "type": "boolean", "description": "Whether to end the conference when the customer leaves." }, "BeepOnCustomerEntrance": { "type": "boolean", "description": "Whether to play a notification beep when the customer joins." }, "JitterBufferSize": { "type": "string", "description": "The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`." } } }, "examples": { "update": { "value": { "ReservationStatus": "accepted" } } } } } } } }, "/v1/Workspaces/{WorkspaceSid}/Workers/Statistics": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "cumulative" ], "parent": "/Workspaces/{WorkspaceSid}/Workers", "className": "workers_statistics", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1WorkersStatistics" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Worker to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Minutes", "in": "query", "description": "Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.", "schema": { "type": "integer" }, "examples": { "fetch": { "value": 1 } } }, { "name": "StartDate", "in": "query", "description": "Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2008-01-02T00:00:00Z" } } }, { "name": "EndDate", "in": "query", "description": "Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2008-01-02T00:00:00Z" } } }, { "name": "TaskQueueSid", "in": "query", "description": "The SID of the TaskQueue for which to fetch Worker statistics.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WQ[0-9a-fA-F]{32}$" } }, { "name": "TaskQueueName", "in": "query", "description": "The `friendly_name` of the TaskQueue for which to fetch Worker statistics.", "schema": { "type": "string" } }, { "name": "FriendlyName", "in": "query", "description": "Only include Workers with `friendly_name` values that match this parameter.", "schema": { "type": "string" } }, { "name": "TaskChannel", "in": "query", "description": "Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.worker.worker_statistics" }, "examples": { "fetch": { "value": { "cumulative": { "reservations_created": 0, "reservations_accepted": 0, "reservations_rejected": 0, "reservations_timed_out": 0, "reservations_canceled": 0, "reservations_rescinded": 0, "activity_durations": [ { "max": 0, "min": 900, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Offline", "avg": 1080, "total": 5400 }, { "max": 0, "min": 900, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Busy", "avg": 1012, "total": 8100 }, { "max": 0, "min": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Idle", "avg": 0, "total": 0 }, { "max": 0, "min": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Reserved", "avg": 0, "total": 0 } ], "start_time": "2008-01-02T00:00:00Z", "end_time": "2008-01-02T00:00:00Z" }, "realtime": { "total_workers": 15, "activity_statistics": [ { "friendly_name": "Idle", "workers": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, { "friendly_name": "Busy", "workers": 9, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, { "friendly_name": "Offline", "workers": 6, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, { "friendly_name": "Reserved", "workers": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] }, "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/Statistics" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchWorkerStatistics" } }, "/v1/Workspaces/{WorkspaceSid}/Workers/CumulativeStatistics": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "reservations_created", "reservations_accepted", "reservations_rejected", "reservations_timed_out", "reservations_canceled", "reservations_rescinded" ], "parent": "/Workspaces/{WorkspaceSid}/Workers/{Sid}", "className": "workers_cumulative_statistics", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1WorkersCumulativeStatistics" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "EndDate", "in": "query", "description": "Only calculate statistics from this date and time and earlier, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2015-07-30T20:00:00Z" } } }, { "name": "Minutes", "in": "query", "description": "Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.", "schema": { "type": "integer" } }, { "name": "StartDate", "in": "query", "description": "Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2015-07-30T20:00:00Z" } } }, { "name": "TaskChannel", "in": "query", "description": "Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.worker.workers_cumulative_statistics" }, "examples": { "fetch": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/CumulativeStatistics", "reservations_created": 100, "reservations_accepted": 100, "reservations_rejected": 100, "reservations_timed_out": 100, "reservations_canceled": 100, "reservations_rescinded": 100, "activity_durations": [ { "max": 0, "min": 900, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Offline", "avg": 1080, "total": 5400 }, { "max": 0, "min": 900, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Busy", "avg": 1012, "total": 8100 }, { "max": 0, "min": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Idle", "avg": 0, "total": 0 }, { "max": 0, "min": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Reserved", "avg": 0, "total": 0 } ], "start_time": "2015-07-30T20:00:00Z", "end_time": "2015-07-30T20:00:00Z" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchWorkersCumulativeStatistics" } }, "/v1/Workspaces/{WorkspaceSid}/Workers/RealTimeStatistics": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "total_workers" ], "parent": "/Workspaces/{WorkspaceSid}/Workers/{Sid}", "className": "workers_real_time_statistics", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1WorkersRealTimeStatistics" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "TaskChannel", "in": "query", "description": "Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.", "schema": { "type": "string" }, "examples": { "fetch": { "value": "voice" } } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.worker.workers_real_time_statistics" }, "examples": { "fetch": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/RealTimeStatistics", "total_workers": 15, "activity_statistics": [ { "friendly_name": "Idle", "workers": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, { "friendly_name": "Busy", "workers": 9, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, { "friendly_name": "Offline", "workers": 6, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, { "friendly_name": "Reserved", "workers": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchWorkersRealTimeStatistics" } }, "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "document_content_type" ], "dependentProperties": { "statistics": { "mapping": { "workspace_sid": "workspace_sid", "workflow_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workflows/{workflow_sid}/Statistics" }, "real_time_statistics": { "mapping": { "workspace_sid": "workspace_sid", "workflow_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workflows/{workflow_sid}/RealTimeStatistics" }, "cumulative_statistics": { "mapping": { "workspace_sid": "workspace_sid", "workflow_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workflows/{workflow_sid}/CumulativeStatistics" } }, "parent": "/Workspaces/{Sid}", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1Workflow" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Workflow to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Workflow resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WW[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.workflow" }, "examples": { "fetch": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "assignment_callback_url": "http://example.com", "configuration": "task-routing:\\n - filter: \\n - 1 == 1\\n target:\\n - queue: WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\n set-priority: 0\\n", "date_created": "2014-05-14T10:50:02Z", "date_updated": "2014-05-14T23:26:06Z", "document_content_type": "application/json", "fallback_assignment_callback_url": null, "friendly_name": "Default Fifo Workflow", "sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_reservation_timeout": 120, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics" } } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchWorkflow" }, "post": { "description": "", "tags": [ "TaskrouterV1Workflow" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Workflow to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Workflow resource to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WW[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.workflow" }, "examples": { "update": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "assignment_callback_url": "http://example.com", "configuration": "task-routing:\\n - filter: \\n - 1 == 1\\n target:\\n - queue: WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\n set-priority: 0\\n", "date_created": "2014-05-14T10:50:02Z", "date_updated": "2014-05-14T23:26:06Z", "document_content_type": "application/json", "fallback_assignment_callback_url": null, "friendly_name": "Default Fifo Workflow", "sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_reservation_timeout": 120, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics" }, "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateWorkflow", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateWorkflowRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`." }, "AssignmentCallbackUrl": { "type": "string", "format": "uri", "description": "The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details." }, "FallbackAssignmentCallbackUrl": { "type": "string", "format": "uri", "description": "The URL that we should call when a call to the `assignment_callback_url` fails." }, "Configuration": { "type": "string", "description": "A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information." }, "TaskReservationTimeout": { "type": "integer", "description": "How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`." }, "ReEvaluateTasks": { "type": "string", "description": "Whether or not to re-evaluate Tasks. The default is `false`, which means Tasks in the Workflow will not be processed through the assignment loop again." } } }, "examples": { "update": { "value": { "AssignmentCallbackUrl": "http://example.com", "Configuration": "configuration", "FallbackAssignmentCallbackUrl": "http://example.com", "FriendlyName": "friendly_name", "TaskReservationTimeout": 1, "ReEvaluateTasks": "false" } } } } } } }, "delete": { "description": "", "tags": [ "TaskrouterV1Workflow" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Workflow to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Workflow resource to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WW[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully.", "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } } } } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteWorkflow" } }, "/v1/Workspaces/{WorkspaceSid}/Workflows": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "document_content_type" ], "dependentProperties": { "statistics": { "mapping": { "workspace_sid": "workspace_sid", "workflow_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workflows/{workflow_sid}/Statistics" }, "real_time_statistics": { "mapping": { "workspace_sid": "workspace_sid", "workflow_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workflows/{workflow_sid}/RealTimeStatistics" }, "cumulative_statistics": { "mapping": { "workspace_sid": "workspace_sid", "workflow_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workflows/{workflow_sid}/CumulativeStatistics" } }, "parent": "/Workspaces/{Sid}", "pathType": "list" }, "get": { "description": "", "tags": [ "TaskrouterV1Workflow" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Workflow to read.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "FriendlyName", "in": "query", "description": "The `friendly_name` of the Workflow resources to read.", "schema": { "type": "string" }, "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } }, "examples": { "readFull": { "value": "friendly_name" }, "readEmpty": { "value": "friendly_name" } } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "workflows": { "type": "array", "items": { "$ref": "#/components/schemas/taskrouter.v1.workspace.workflow" } }, "meta": { "properties": { "first_page_url": { "format": "uri", "type": "string" }, "key": { "type": "string" }, "next_page_url": { "format": "uri", "nullable": true, "type": "string" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "format": "uri", "nullable": true, "type": "string" }, "url": { "format": "uri", "type": "string" } }, "type": "object" } }, "title": "ListWorkflowResponse" }, "examples": { "readFull": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?FriendlyName=friendly_name&PageSize=50&Page=0", "key": "workflows", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?FriendlyName=friendly_name&PageSize=50&Page=0" }, "workflows": [ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "assignment_callback_url": "http://example.com", "configuration": "task-routing:\\n - filter: \\n - 1 == 1\\n target:\\n - queue: WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\n set-priority: 0\\n", "date_created": "2014-05-14T10:50:02Z", "date_updated": "2014-05-15T16:47:51Z", "document_content_type": "application/json", "fallback_assignment_callback_url": null, "friendly_name": "Default Fifo Workflow", "sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_reservation_timeout": 120, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics" }, "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] } }, "readEmpty": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?FriendlyName=friendly_name&PageSize=50&Page=0", "key": "workflows", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?FriendlyName=friendly_name&PageSize=50&Page=0" }, "workflows": [] } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListWorkflow" }, "post": { "description": "", "tags": [ "TaskrouterV1Workflow" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace that the new Workflow to create belongs to.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.workflow" }, "examples": { "create": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "assignment_callback_url": "http://example.com", "configuration": "task-routing:\\n - filter: \\n - 1 == 1\\n target:\\n - queue: WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\n set-priority: 0\\n", "date_created": "2014-05-14T10:50:02Z", "date_updated": "2014-05-14T23:26:06Z", "document_content_type": "application/json", "fallback_assignment_callback_url": null, "friendly_name": "Default Fifo Workflow", "sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "task_reservation_timeout": 120, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics" } } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateWorkflow", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateWorkflowRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`." }, "Configuration": { "type": "string", "description": "A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information." }, "AssignmentCallbackUrl": { "type": "string", "format": "uri", "description": "The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details." }, "FallbackAssignmentCallbackUrl": { "type": "string", "format": "uri", "description": "The URL that we should call when a call to the `assignment_callback_url` fails." }, "TaskReservationTimeout": { "type": "integer", "description": "How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`." } }, "required": [ "FriendlyName", "Configuration" ] }, "examples": { "create": { "value": { "AssignmentCallbackUrl": "http://example.com", "Configuration": "configuration", "FallbackAssignmentCallbackUrl": "http://example.com", "FriendlyName": "friendly_name", "TaskReservationTimeout": 1 } } } } } } } }, "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/CumulativeStatistics": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "start_time", "end_time", "avg_task_acceptance_time", "tasks_completed" ], "parent": "/Workspaces/{WorkspaceSid}/Workflows/{Sid}", "className": "workflow_cumulative_statistics", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1WorkflowCumulativeStatistics" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "WorkflowSid", "in": "path", "description": "Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WW[0-9a-fA-F]{32}$" }, "required": true }, { "name": "EndDate", "in": "query", "description": "Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2015-07-30T20:00:00Z" } } }, { "name": "Minutes", "in": "query", "description": "Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.", "schema": { "type": "integer" } }, { "name": "StartDate", "in": "query", "description": "Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2015-07-30T20:00:00Z" } } }, { "name": "TaskChannel", "in": "query", "description": "Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.", "schema": { "type": "string" } }, { "name": "SplitByWaitTime", "in": "query", "description": "A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate statistics on up to 10,000 Tasks for any given threshold.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.workflow.workflow_cumulative_statistics" }, "examples": { "fetch": { "value": { "avg_task_acceptance_time": 100, "tasks_canceled": 100, "start_time": "2015-07-30T20:00:00Z", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "tasks_moved": 100, "tasks_entered": 100, "wait_duration_until_canceled": { "avg": 0, "min": 0, "max": 0, "total": 0 }, "wait_duration_until_accepted": { "avg": 0, "min": 0, "max": 0, "total": 0 }, "split_by_wait_time": { "5": { "above": { "tasks_canceled": 0, "reservations_accepted": 0 }, "below": { "tasks_canceled": 0, "reservations_accepted": 0 } }, "10": { "above": { "tasks_canceled": 0, "reservations_accepted": 0 }, "below": { "tasks_canceled": 0, "reservations_accepted": 0 } } }, "reservations_canceled": 100, "end_time": "2015-07-30T20:00:00Z", "workflow_sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "reservations_created": 100, "reservations_accepted": 100, "reservations_rescinded": 100, "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "reservations_rejected": 100, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics", "tasks_deleted": 100, "tasks_timed_out_in_workflow": 100, "tasks_completed": 100, "reservations_timed_out": 100 } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchWorkflowCumulativeStatistics" } }, "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/RealTimeStatistics": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "longest_task_waiting_age", "longest_task_waiting_sid", "total_tasks" ], "parent": "/Workspaces/{WorkspaceSid}/Workflows/{Sid}", "className": "workflow_real_time_statistics", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1WorkflowRealTimeStatistics" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Workflow to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "WorkflowSid", "in": "path", "description": "Returns the list of Tasks that are being controlled by the Workflow with the specified SID value.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WW[0-9a-fA-F]{32}$" }, "required": true }, { "name": "TaskChannel", "in": "query", "description": "Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.", "schema": { "type": "string" }, "examples": { "fetch": { "value": "voice" } } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.workflow.workflow_real_time_statistics" }, "examples": { "fetch": { "value": { "longest_task_waiting_age": 100, "longest_task_waiting_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics", "tasks_by_priority": {}, "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "tasks_by_status": { "reserved": 0, "pending": 0, "assigned": 0, "wrapping": 0 }, "workflow_sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "total_tasks": 100, "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchWorkflowRealTimeStatistics" } }, "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/Statistics": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "cumulative" ], "parent": "/Workspaces/{WorkspaceSid}/Workflows/{Sid}", "className": "workflow_statistics", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1WorkflowStatistics" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace with the Workflow to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "WorkflowSid", "in": "path", "description": "Returns the list of Tasks that are being controlled by the Workflow with the specified SID value.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WW[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Minutes", "in": "query", "description": "Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.", "schema": { "type": "integer" }, "examples": { "fetch": { "value": 1 } } }, { "name": "StartDate", "in": "query", "description": "Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2008-01-02T00:00:00Z" } } }, { "name": "EndDate", "in": "query", "description": "Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2008-01-02T00:00:00Z" } } }, { "name": "TaskChannel", "in": "query", "description": "Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.", "schema": { "type": "string" } }, { "name": "SplitByWaitTime", "in": "query", "description": "A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.workflow.workflow_statistics" }, "examples": { "fetch": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "cumulative": { "avg_task_acceptance_time": 0.0, "end_time": "2008-01-02T00:00:00Z", "reservations_accepted": 0, "reservations_rejected": 0, "reservations_timed_out": 0, "start_time": "2008-01-02T00:00:00Z", "tasks_canceled": 0, "tasks_entered": 0, "tasks_moved": 0, "tasks_timed_out_in_workflow": 0 }, "realtime": { "longest_task_waiting_age": 0, "longest_task_waiting_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "tasks_by_status": { "assigned": 1, "pending": 0, "reserved": 0, "wrapping": 0 }, "total_tasks": 1 }, "workflow_sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchWorkflowStatistics" } }, "/v1/Workspaces/{Sid}": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "prioritize_queue_order" ], "dependentProperties": { "activities": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Activities" }, "events": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Events" }, "tasks": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Tasks" }, "task_queues": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/TaskQueues" }, "workers": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workers" }, "workflows": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workflows" }, "statistics": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Statistics" }, "real_time_statistics": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/RealTimeStatistics" }, "cumulative_statistics": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/CumulativeStatistics" }, "task_channels": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/TaskChannels" } }, "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1Workspace" ], "parameters": [ { "name": "Sid", "in": "path", "description": "The SID of the Workspace resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace" }, "examples": { "fetch": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2016-08-01T22:10:40Z", "date_updated": "2016-08-01T22:10:40Z", "default_activity_name": "Offline", "default_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "event_callback_url": "", "events_filter": null, "friendly_name": "new", "links": { "activities": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities", "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics", "task_queues": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues", "tasks": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks", "workers": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers", "workflows": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows", "task_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels", "events": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events" }, "multi_task_enabled": false, "prioritize_queue_order": "FIFO", "sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "timeout_activity_name": "Offline", "timeout_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "default_operating_unit_sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "default_attention_profile_sid": "WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attention_routing_enabled": false, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchWorkspace" }, "post": { "description": "", "tags": [ "TaskrouterV1Workspace" ], "parameters": [ { "name": "Sid", "in": "path", "description": "The SID of the Workspace resource to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace" }, "examples": { "update": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2016-08-01T22:10:40Z", "date_updated": "2016-08-01T22:10:40Z", "default_activity_name": "Offline", "default_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "event_callback_url": "", "events_filter": null, "friendly_name": "new", "links": { "activities": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities", "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics", "task_queues": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues", "tasks": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks", "workers": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers", "workflows": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows", "task_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels", "events": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events" }, "multi_task_enabled": false, "prioritize_queue_order": "FIFO", "sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "timeout_activity_name": "Offline", "timeout_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "default_operating_unit_sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "default_attention_profile_sid": "WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attention_routing_enabled": false, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateWorkspace", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateWorkspaceRequest", "properties": { "DefaultActivitySid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "description": "The SID of the Activity that will be used when new Workers are created in the Workspace." }, "EventCallbackUrl": { "type": "string", "format": "uri", "description": "The URL we should call when an event occurs. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. This parameter supports Twilio's [Webhooks (HTTP callbacks) Connection Overrides](https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides)." }, "EventsFilter": { "type": "string", "description": "The list of Workspace events for which to call event_callback_url. For example if `EventsFilter=task.created,task.canceled,worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated." }, "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the Workspace resource. For example: `Sales Call Center` or `Customer Support Team`." }, "MultiTaskEnabled": { "type": "boolean", "description": "Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. However, all workspaces should be maintained as multi-tasking. There is no default when omitting this parameter. A multi-tasking Workspace can't be updated to single-tasking unless it is not a Flex Project and another (legacy) single-tasking Workspace exists. Multi-tasking allows Workers to handle multiple Tasks simultaneously. In multi-tasking mode, each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. In single-tasking mode (legacy mode), each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking](https://www.twilio.com/docs/taskrouter/multitasking)." }, "TimeoutActivitySid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WA[0-9a-fA-F]{32}$", "description": "The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response." }, "PrioritizeQueueOrder": { "type": "string", "$ref": "#/components/schemas/workspace_enum_queue_order", "description": "The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO`. For more information, see [Queue Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo)." } } }, "examples": { "update": { "value": { "DefaultActivitySid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "EventCallbackUrl": "/example", "FriendlyName": "friendly_name", "TimeoutActivitySid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "DefaultAttentionProfileSid": "WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "AttentionRoutingEnabled": false } } } } } } }, "delete": { "description": "", "tags": [ "TaskrouterV1Workspace" ], "parameters": [ { "name": "Sid", "in": "path", "description": "The SID of the Workspace resource to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully.", "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } } } } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteWorkspace" } }, "/v1/Workspaces": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "prioritize_queue_order" ], "dependentProperties": { "activities": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Activities" }, "events": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Events" }, "tasks": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Tasks" }, "task_queues": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/TaskQueues" }, "workers": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workers" }, "workflows": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Workflows" }, "statistics": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/Statistics" }, "real_time_statistics": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/RealTimeStatistics" }, "cumulative_statistics": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/CumulativeStatistics" }, "task_channels": { "mapping": { "workspace_sid": "sid" }, "resource_url": "/v1/Workspaces/{workspace_sid}/TaskChannels" } }, "pathType": "list" }, "get": { "description": "", "tags": [ "TaskrouterV1Workspace" ], "parameters": [ { "name": "FriendlyName", "in": "query", "description": "The `friendly_name` of the Workspace resources to read. For example `Customer Support` or `2014 Election Campaign`.", "schema": { "type": "string" }, "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } }, "examples": { "readFull": { "value": "friendly_name" }, "readEmpty": { "value": "friendly_name" } } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "workspaces": { "type": "array", "items": { "$ref": "#/components/schemas/taskrouter.v1.workspace" } }, "meta": { "properties": { "first_page_url": { "format": "uri", "type": "string" }, "key": { "type": "string" }, "next_page_url": { "format": "uri", "nullable": true, "type": "string" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "format": "uri", "nullable": true, "type": "string" }, "url": { "format": "uri", "type": "string" } }, "type": "object" } }, "title": "ListWorkspaceResponse" }, "examples": { "readFull": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces?FriendlyName=friendly_name&PageSize=50&Page=0", "key": "workspaces", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces?FriendlyName=friendly_name&PageSize=50&Page=0" }, "workspaces": [ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2016-08-01T22:10:40Z", "date_updated": "2016-08-01T22:10:40Z", "default_activity_name": "Offline", "default_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "event_callback_url": "", "events_filter": null, "friendly_name": "new", "links": { "activities": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities", "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics", "task_queues": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues", "tasks": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks", "workers": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers", "workflows": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows", "task_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels", "events": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events" }, "multi_task_enabled": false, "prioritize_queue_order": "FIFO", "sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "timeout_activity_name": "Offline", "timeout_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "default_operating_unit_sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "default_attention_profile_sid": "WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attention_routing_enabled": false, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] } }, "readEmpty": { "value": { "meta": { "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces?FriendlyName=friendly_name&PageSize=50&Page=0", "key": "workspaces", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://taskrouter.twilio.com/v1/Workspaces?FriendlyName=friendly_name&PageSize=50&Page=0" }, "workspaces": [] } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListWorkspace" }, "post": { "description": "", "tags": [ "TaskrouterV1Workspace" ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace" }, "examples": { "create": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2016-08-01T22:10:40Z", "date_updated": "2016-08-01T22:10:40Z", "default_activity_name": "Offline", "default_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "event_callback_url": "", "events_filter": null, "friendly_name": "new", "links": { "activities": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities", "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics", "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics", "task_queues": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues", "tasks": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks", "workers": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers", "workflows": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows", "task_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels", "events": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events" }, "multi_task_enabled": false, "prioritize_queue_order": "FIFO", "sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "timeout_activity_name": "Offline", "timeout_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "default_operating_unit_sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "default_attention_profile_sid": "WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attention_routing_enabled": false, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateWorkspace", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateWorkspaceRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the Workspace resource. It can be up to 64 characters long. For example: `Customer Support` or `2014 Election Campaign`." }, "EventCallbackUrl": { "type": "string", "format": "uri", "description": "The URL we should call when an event occurs. If provided, the Workspace will publish events to this URL, for example, to collect data for reporting. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. This parameter supports Twilio's [Webhooks (HTTP callbacks) Connection Overrides](https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides)." }, "EventsFilter": { "type": "string", "description": "The list of Workspace events for which to call event_callback_url. For example, if `EventsFilter=task.created, task.canceled, worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated." }, "MultiTaskEnabled": { "type": "boolean", "description": "Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. However, all workspaces should be created as multi-tasking. The default is `true`. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (`true`), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. In single-tasking mode (legacy mode), each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking](https://www.twilio.com/docs/taskrouter/multitasking)." }, "Template": { "type": "string", "description": "An available template name. Can be: `NONE` or `FIFO` and the default is `NONE`. Pre-configures the Workspace with the Workflow and Activities specified in the template. `NONE` will create a Workspace with only a set of default activities. `FIFO` will configure TaskRouter with a set of default activities and a single TaskQueue for first-in, first-out distribution, which can be useful when you are getting started with TaskRouter." }, "PrioritizeQueueOrder": { "type": "string", "$ref": "#/components/schemas/workspace_enum_queue_order", "description": "The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo)." } }, "required": [ "FriendlyName" ] }, "examples": { "create": { "value": { "EventCallbackUrl": "/example", "FriendlyName": "friendly_name", "Template": "template" } } } } } } } }, "/v1/Workspaces/{WorkspaceSid}/CumulativeStatistics": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "start_time", "end_time", "avg_task_acceptance_time", "tasks_completed" ], "parent": "/Workspaces/{Sid}", "className": "workspace_cumulative_statistics", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1WorkspaceCumulativeStatistics" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "EndDate", "in": "query", "description": "Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2015-07-30T20:00:00Z" } } }, { "name": "Minutes", "in": "query", "description": "Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.", "schema": { "type": "integer" } }, { "name": "StartDate", "in": "query", "description": "Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2015-07-30T20:00:00Z" } } }, { "name": "TaskChannel", "in": "query", "description": "Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.", "schema": { "type": "string" } }, { "name": "SplitByWaitTime", "in": "query", "description": "A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate statistics on up to 10,000 Tasks for any given threshold.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.workspace_cumulative_statistics" }, "examples": { "fetch": { "value": { "reservations_accepted": 100, "tasks_completed": 100, "start_time": "2015-07-30T20:00:00Z", "reservations_rescinded": 100, "tasks_timed_out_in_workflow": 100, "end_time": "2015-07-30T20:00:00Z", "avg_task_acceptance_time": 100, "tasks_canceled": 100, "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics", "tasks_moved": 100, "tasks_deleted": 100, "tasks_created": 100, "reservations_canceled": 100, "reservations_timed_out": 100, "wait_duration_until_canceled": { "avg": 0, "min": 0, "max": 0, "total": 0 }, "wait_duration_until_accepted": { "avg": 0, "min": 0, "max": 0, "total": 0 }, "split_by_wait_time": { "5": { "above": { "tasks_canceled": 0, "reservations_accepted": 0 }, "below": { "tasks_canceled": 0, "reservations_accepted": 0 } }, "10": { "above": { "tasks_canceled": 0, "reservations_accepted": 0 }, "below": { "tasks_canceled": 0, "reservations_accepted": 0 } } }, "reservations_created": 100, "reservations_rejected": 100, "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchWorkspaceCumulativeStatistics" } }, "/v1/Workspaces/{WorkspaceSid}/RealTimeStatistics": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "longest_task_waiting_age", "longest_task_waiting_sid", "total_tasks" ], "parent": "/Workspaces/{Sid}", "className": "workspace_real_time_statistics", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1WorkspaceRealTimeStatistics" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "TaskChannel", "in": "query", "description": "Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.", "schema": { "type": "string" }, "examples": { "fetch": { "value": "voice" } } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.workspace_real_time_statistics" }, "examples": { "fetch": { "value": { "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics", "tasks_by_priority": {}, "activity_statistics": [ { "friendly_name": "Idle", "workers": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, { "friendly_name": "Busy", "workers": 9, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, { "friendly_name": "Offline", "workers": 6, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, { "friendly_name": "Reserved", "workers": 0, "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ], "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "longest_task_waiting_age": 100, "longest_task_waiting_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "total_workers": 100, "total_tasks": 100, "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "tasks_by_status": {} } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchWorkspaceRealTimeStatistics" } }, "/v1/Workspaces/{WorkspaceSid}/Statistics": { "servers": [ { "url": "https://taskrouter.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "cumulative" ], "parent": "/Workspaces/{Sid}", "className": "workspace_statistics", "pathType": "instance" }, "get": { "description": "", "tags": [ "TaskrouterV1WorkspaceStatistics" ], "parameters": [ { "name": "WorkspaceSid", "in": "path", "description": "The SID of the Workspace to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Minutes", "in": "query", "description": "Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.", "schema": { "type": "integer" }, "examples": { "fetch": { "value": 1 } } }, { "name": "StartDate", "in": "query", "description": "Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2008-01-02T00:00:00Z" } } }, { "name": "EndDate", "in": "query", "description": "Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.", "schema": { "type": "string", "format": "date-time" }, "examples": { "fetch": { "value": "2008-01-02T00:00:00Z" } } }, { "name": "TaskChannel", "in": "query", "description": "Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.", "schema": { "type": "string" } }, { "name": "SplitByWaitTime", "in": "query", "description": "A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taskrouter.v1.workspace.workspace_statistics" }, "examples": { "fetch": { "value": { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics", "cumulative": { "avg_task_acceptance_time": 0.0, "start_time": "2008-01-02T00:00:00Z", "reservations_accepted": 0, "reservations_canceled": 0, "reservations_created": 0, "reservations_rejected": 0, "reservations_rescinded": 0, "reservations_timed_out": 0, "end_time": "2008-01-02T00:00:00Z", "tasks_canceled": 0, "tasks_created": 0, "tasks_deleted": 0, "tasks_moved": 0, "tasks_timed_out_in_workflow": 0 }, "realtime": { "activity_statistics": [ { "friendly_name": "Offline", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 1 }, { "friendly_name": "Idle", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 }, { "friendly_name": "80fa2beb-3a05-11e5-8fc8-98e0d9a1eb73", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 }, { "friendly_name": "Reserved", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 }, { "friendly_name": "Busy", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 }, { "friendly_name": "817ca1c5-3a05-11e5-9292-98e0d9a1eb73", "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workers": 0 } ], "longest_task_waiting_age": 0, "longest_task_waiting_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "tasks_by_status": { "assigned": 0, "pending": 0, "reserved": 0, "wrapping": 0 }, "total_tasks": 0, "total_workers": 1 }, "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "X-Rate-Limit-Limit": { "schema": { "type": "string" } }, "X-Rate-Limit-Remaining": { "schema": { "type": "string" } }, "X-Rate-Limit-Config": { "schema": { "type": "string" } }, "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchWorkspaceStatistics" } } }, "servers": [ { "url": "https://taskrouter.twilio.com" } ], "tags": [ { "name": "TaskrouterV1Activity" }, { "name": "TaskrouterV1AttentionProfile" }, { "name": "TaskrouterV1AttentionProfileChannel" }, { "name": "TaskrouterV1Event" }, { "name": "TaskrouterV1OperatingUnit" }, { "name": "TaskrouterV1Task" }, { "name": "TaskrouterV1TaskChannel" }, { "name": "TaskrouterV1TaskQueue" }, { "name": "TaskrouterV1TaskQueueBulkRealTimeStatistics" }, { "name": "TaskrouterV1TaskQueueCumulativeStatistics" }, { "name": "TaskrouterV1TaskQueueRealTimeStatistics" }, { "name": "TaskrouterV1TaskQueueStatistics" }, { "name": "TaskrouterV1TaskQueuesStatistics" }, { "name": "TaskrouterV1TaskReservation" }, { "name": "TaskrouterV1Worker" }, { "name": "TaskrouterV1WorkerChannel" }, { "name": "TaskrouterV1WorkerReservation" }, { "name": "TaskrouterV1WorkerStatistics" }, { "name": "TaskrouterV1WorkersCumulativeStatistics" }, { "name": "TaskrouterV1WorkersRealTimeStatistics" }, { "name": "TaskrouterV1WorkersStatistics" }, { "name": "TaskrouterV1Workflow" }, { "name": "TaskrouterV1WorkflowCumulativeStatistics" }, { "name": "TaskrouterV1WorkflowRealTimeStatistics" }, { "name": "TaskrouterV1WorkflowStatistics" }, { "name": "TaskrouterV1Workspace" }, { "name": "TaskrouterV1WorkspaceCumulativeStatistics" }, { "name": "TaskrouterV1WorkspaceRealTimeStatistics" }, { "name": "TaskrouterV1WorkspaceStatistics" } ], "security": [ { "accountSid_authToken": [] } ] }