Skip to content

Latest commit

 

History

History
231 lines (124 loc) · 9 KB

WorkspacesApi.md

File metadata and controls

231 lines (124 loc) · 9 KB

WorkspacesApi

All URIs are relative to https://taskrouter.twilio.com

Method HTTP request Description
CreateWorkspace Post /v1/Workspaces
DeleteWorkspace Delete /v1/Workspaces/{Sid}
FetchWorkspace Get /v1/Workspaces/{Sid}
ListWorkspace Get /v1/Workspaces
UpdateWorkspace Post /v1/Workspaces/{Sid}

CreateWorkspace

TaskrouterV1Workspace CreateWorkspace(ctx, optional)

Path Parameters

This endpoint does not need any path parameter.

Other Parameters

Other parameters are passed through a pointer to a CreateWorkspaceParams struct

Name Type Description
FriendlyName string 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 string 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 for more information. This parameter supports Twilio's Webhooks (HTTP callbacks) Connection Overrides.
EventsFilter string 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 bool 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.
Template string 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 string

Return type

TaskrouterV1Workspace

Authorization

accountSid_authToken

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteWorkspace

DeleteWorkspace(ctx, Sid)

Path Parameters

Name Type Description
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
Sid string The SID of the Workspace resource to delete.

Other Parameters

Other parameters are passed through a pointer to a DeleteWorkspaceParams struct

Name Type Description

Return type

(empty response body)

Authorization

accountSid_authToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FetchWorkspace

TaskrouterV1Workspace FetchWorkspace(ctx, Sid)

Path Parameters

Name Type Description
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
Sid string The SID of the Workspace resource to fetch.

Other Parameters

Other parameters are passed through a pointer to a FetchWorkspaceParams struct

Name Type Description

Return type

TaskrouterV1Workspace

Authorization

accountSid_authToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListWorkspace

[]TaskrouterV1Workspace ListWorkspace(ctx, optional)

Path Parameters

This endpoint does not need any path parameter.

Other Parameters

Other parameters are passed through a pointer to a ListWorkspaceParams struct

Name Type Description
FriendlyName string The friendly_name of the Workspace resources to read. For example Customer Support or 2014 Election Campaign.
PageSize int How many resources to return in each list page. The default is 50, and the maximum is 1000.
Limit int Max number of records to return.

Return type

[]TaskrouterV1Workspace

Authorization

accountSid_authToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateWorkspace

TaskrouterV1Workspace UpdateWorkspace(ctx, Sidoptional)

Path Parameters

Name Type Description
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
Sid string The SID of the Workspace resource to update.

Other Parameters

Other parameters are passed through a pointer to a UpdateWorkspaceParams struct

Name Type Description
DefaultActivitySid string The SID of the Activity that will be used when new Workers are created in the Workspace.
EventCallbackUrl string The URL we should call when an event occurs. See Workspace Events for more information. This parameter supports Twilio's Webhooks (HTTP callbacks) Connection Overrides.
EventsFilter string 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 string A descriptive string that you create to describe the Workspace resource. For example: Sales Call Center or Customer Support Team.
MultiTaskEnabled bool 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.
TimeoutActivitySid string The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response.
PrioritizeQueueOrder string

Return type

TaskrouterV1Workspace

Authorization

accountSid_authToken

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]