Update worker channel

POST /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}

TODO: Resource-level docs

Path parameters

  • WorkspaceSid string Required

    The SID of the Workspace with the WorkerChannel to update.

  • WorkerSid string Required

    The SID of the Worker with the WorkerChannel to update.

  • Sid string Required

    The SID of the WorkerChannel to update.

Body

  • Available boolean

    Whether the WorkerChannel is available. Set to false to prevent the Worker from receiving any new Tasks of this TaskChannel type.

  • Capacity integer

    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.

Responses

  • OK

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account that created the resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • assigned_tasks integer | null

      The total number of Tasks assigned to Worker for the TaskChannel type

    • available boolean | null

      Whether the Worker should receive Tasks of the TaskChannel type

    • The current available capacity between 0 to 100 for the TaskChannel

    • configured_capacity integer | null

      The current configured capacity for the WorkerChannel

    • date_created string(date-time) | null

      The RFC 2822 date and time in GMT when the resource was created

    • date_updated string(date-time) | null

      The RFC 2822 date and time in GMT when the resource was last updated

    • sid string | null

      The unique string that identifies the resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WC[0-9a-fA-F]{32}$.

    • task_channel_sid string | null

      The SID of the TaskChannel

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^TC[0-9a-fA-F]{32}$.

    • The unique name of the TaskChannel, such as 'voice' or 'sms'

    • url string(uri) | null

      The absolute URL of the WorkerChannel resource

    • worker_sid string | null

      The SID of the Worker that contains the WorkerChannel

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WK[0-9a-fA-F]{32}$.

    • workspace_sid string | null

      The SID of the Workspace that contains the WorkerChannel

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WS[0-9a-fA-F]{32}$.

POST /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}
curl \
 -X POST https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid} \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'Available=true&Capacity=42'
Request example
{
  "Available": true,
  "Capacity": 42
}
Request examples
{
  "Available": true,
  "Capacity": 42
}
Response examples (200)
{
  "account_sid": "string",
  "assigned_tasks": 42,
  "available": true,
  "available_capacity_percentage": 42,
  "configured_capacity": 42,
  "date_created": "2023-05-04T09:42:00+00:00",
  "date_updated": "2023-05-04T09:42:00+00:00",
  "sid": "string",
  "task_channel_sid": "string",
  "task_channel_unique_name": "string",
  "url": "https://example.com",
  "worker_sid": "string",
  "workspace_sid": "string"
}
Response examples (200)
{
  "account_sid": "string",
  "assigned_tasks": 42,
  "available": true,
  "available_capacity_percentage": 42,
  "configured_capacity": 42,
  "date_created": "2024-05-04T09:42:00+00:00",
  "date_updated": "2024-05-04T09:42:00+00:00",
  "sid": "string",
  "task_channel_sid": "string",
  "task_channel_unique_name": "string",
  "url": "https://example.com",
  "worker_sid": "string",
  "workspace_sid": "string"
}