github.com/twilio/twilio-go@v1.20.1/rest/taskrouter/v1/docs/WorkspacesApi.md (about)

     1  # WorkspacesApi
     2  
     3  All URIs are relative to *https://taskrouter.twilio.com*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**CreateWorkspace**](WorkspacesApi.md#CreateWorkspace) | **Post** /v1/Workspaces | 
     8  [**DeleteWorkspace**](WorkspacesApi.md#DeleteWorkspace) | **Delete** /v1/Workspaces/{Sid} | 
     9  [**FetchWorkspace**](WorkspacesApi.md#FetchWorkspace) | **Get** /v1/Workspaces/{Sid} | 
    10  [**ListWorkspace**](WorkspacesApi.md#ListWorkspace) | **Get** /v1/Workspaces | 
    11  [**UpdateWorkspace**](WorkspacesApi.md#UpdateWorkspace) | **Post** /v1/Workspaces/{Sid} | 
    12  
    13  
    14  
    15  ## CreateWorkspace
    16  
    17  > TaskrouterV1Workspace CreateWorkspace(ctx, optional)
    18  
    19  
    20  
    21  
    22  
    23  ### Path Parameters
    24  
    25  This endpoint does not need any path parameter.
    26  
    27  ### Other Parameters
    28  
    29  Other parameters are passed through a pointer to a CreateWorkspaceParams struct
    30  
    31  
    32  Name | Type | Description
    33  ------------- | ------------- | -------------
    34  **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`.
    35  **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](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).
    36  **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.
    37  **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](https://www.twilio.com/docs/taskrouter/multitasking).
    38  **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.
    39  **PrioritizeQueueOrder** | **string** | 
    40  
    41  ### Return type
    42  
    43  [**TaskrouterV1Workspace**](TaskrouterV1Workspace.md)
    44  
    45  ### Authorization
    46  
    47  [accountSid_authToken](../README.md#accountSid_authToken)
    48  
    49  ### HTTP request headers
    50  
    51  - **Content-Type**: application/x-www-form-urlencoded
    52  - **Accept**: application/json
    53  
    54  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    55  [[Back to Model list]](../README.md#documentation-for-models)
    56  [[Back to README]](../README.md)
    57  
    58  
    59  ## DeleteWorkspace
    60  
    61  > DeleteWorkspace(ctx, Sid)
    62  
    63  
    64  
    65  
    66  
    67  ### Path Parameters
    68  
    69  
    70  Name | Type | Description
    71  ------------- | ------------- | -------------
    72  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    73  **Sid** | **string** | The SID of the Workspace resource to delete.
    74  
    75  ### Other Parameters
    76  
    77  Other parameters are passed through a pointer to a DeleteWorkspaceParams struct
    78  
    79  
    80  Name | Type | Description
    81  ------------- | ------------- | -------------
    82  
    83  ### Return type
    84  
    85   (empty response body)
    86  
    87  ### Authorization
    88  
    89  [accountSid_authToken](../README.md#accountSid_authToken)
    90  
    91  ### HTTP request headers
    92  
    93  - **Content-Type**: Not defined
    94  - **Accept**: Not defined
    95  
    96  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    97  [[Back to Model list]](../README.md#documentation-for-models)
    98  [[Back to README]](../README.md)
    99  
   100  
   101  ## FetchWorkspace
   102  
   103  > TaskrouterV1Workspace FetchWorkspace(ctx, Sid)
   104  
   105  
   106  
   107  
   108  
   109  ### Path Parameters
   110  
   111  
   112  Name | Type | Description
   113  ------------- | ------------- | -------------
   114  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   115  **Sid** | **string** | The SID of the Workspace resource to fetch.
   116  
   117  ### Other Parameters
   118  
   119  Other parameters are passed through a pointer to a FetchWorkspaceParams struct
   120  
   121  
   122  Name | Type | Description
   123  ------------- | ------------- | -------------
   124  
   125  ### Return type
   126  
   127  [**TaskrouterV1Workspace**](TaskrouterV1Workspace.md)
   128  
   129  ### Authorization
   130  
   131  [accountSid_authToken](../README.md#accountSid_authToken)
   132  
   133  ### HTTP request headers
   134  
   135  - **Content-Type**: Not defined
   136  - **Accept**: application/json
   137  
   138  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   139  [[Back to Model list]](../README.md#documentation-for-models)
   140  [[Back to README]](../README.md)
   141  
   142  
   143  ## ListWorkspace
   144  
   145  > []TaskrouterV1Workspace ListWorkspace(ctx, optional)
   146  
   147  
   148  
   149  
   150  
   151  ### Path Parameters
   152  
   153  This endpoint does not need any path parameter.
   154  
   155  ### Other Parameters
   156  
   157  Other parameters are passed through a pointer to a ListWorkspaceParams struct
   158  
   159  
   160  Name | Type | Description
   161  ------------- | ------------- | -------------
   162  **FriendlyName** | **string** | The `friendly_name` of the Workspace resources to read. For example `Customer Support` or `2014 Election Campaign`.
   163  **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000.
   164  **Limit** | **int** | Max number of records to return.
   165  
   166  ### Return type
   167  
   168  [**[]TaskrouterV1Workspace**](TaskrouterV1Workspace.md)
   169  
   170  ### Authorization
   171  
   172  [accountSid_authToken](../README.md#accountSid_authToken)
   173  
   174  ### HTTP request headers
   175  
   176  - **Content-Type**: Not defined
   177  - **Accept**: application/json
   178  
   179  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   180  [[Back to Model list]](../README.md#documentation-for-models)
   181  [[Back to README]](../README.md)
   182  
   183  
   184  ## UpdateWorkspace
   185  
   186  > TaskrouterV1Workspace UpdateWorkspace(ctx, Sidoptional)
   187  
   188  
   189  
   190  
   191  
   192  ### Path Parameters
   193  
   194  
   195  Name | Type | Description
   196  ------------- | ------------- | -------------
   197  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   198  **Sid** | **string** | The SID of the Workspace resource to update.
   199  
   200  ### Other Parameters
   201  
   202  Other parameters are passed through a pointer to a UpdateWorkspaceParams struct
   203  
   204  
   205  Name | Type | Description
   206  ------------- | ------------- | -------------
   207  **DefaultActivitySid** | **string** | The SID of the Activity that will be used when new Workers are created in the Workspace.
   208  **EventCallbackUrl** | **string** | 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).
   209  **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.
   210  **FriendlyName** | **string** | A descriptive string that you create to describe the Workspace resource. For example: `Sales Call Center` or `Customer Support Team`.
   211  **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](https://www.twilio.com/docs/taskrouter/multitasking).
   212  **TimeoutActivitySid** | **string** | The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response.
   213  **PrioritizeQueueOrder** | **string** | 
   214  
   215  ### Return type
   216  
   217  [**TaskrouterV1Workspace**](TaskrouterV1Workspace.md)
   218  
   219  ### Authorization
   220  
   221  [accountSid_authToken](../README.md#accountSid_authToken)
   222  
   223  ### HTTP request headers
   224  
   225  - **Content-Type**: application/x-www-form-urlencoded
   226  - **Accept**: application/json
   227  
   228  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   229  [[Back to Model list]](../README.md#documentation-for-models)
   230  [[Back to README]](../README.md)
   231