github.com/twilio/twilio-go@v1.20.1/rest/taskrouter/v1/docs/WorkspacesWorkflowsApi.md (about) 1 # WorkspacesWorkflowsApi 2 3 All URIs are relative to *https://taskrouter.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateWorkflow**](WorkspacesWorkflowsApi.md#CreateWorkflow) | **Post** /v1/Workspaces/{WorkspaceSid}/Workflows | 8 [**DeleteWorkflow**](WorkspacesWorkflowsApi.md#DeleteWorkflow) | **Delete** /v1/Workspaces/{WorkspaceSid}/Workflows/{Sid} | 9 [**FetchWorkflow**](WorkspacesWorkflowsApi.md#FetchWorkflow) | **Get** /v1/Workspaces/{WorkspaceSid}/Workflows/{Sid} | 10 [**ListWorkflow**](WorkspacesWorkflowsApi.md#ListWorkflow) | **Get** /v1/Workspaces/{WorkspaceSid}/Workflows | 11 [**UpdateWorkflow**](WorkspacesWorkflowsApi.md#UpdateWorkflow) | **Post** /v1/Workspaces/{WorkspaceSid}/Workflows/{Sid} | 12 13 14 15 ## CreateWorkflow 16 17 > TaskrouterV1Workflow CreateWorkflow(ctx, WorkspaceSidoptional) 18 19 20 21 22 23 ### Path Parameters 24 25 26 Name | Type | Description 27 ------------- | ------------- | ------------- 28 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 29 **WorkspaceSid** | **string** | The SID of the Workspace that the new Workflow to create belongs to. 30 31 ### Other Parameters 32 33 Other parameters are passed through a pointer to a CreateWorkflowParams struct 34 35 36 Name | Type | Description 37 ------------- | ------------- | ------------- 38 **FriendlyName** | **string** | A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`. 39 **Configuration** | **string** | 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. 40 **AssignmentCallbackUrl** | **string** | 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. 41 **FallbackAssignmentCallbackUrl** | **string** | The URL that we should call when a call to the `assignment_callback_url` fails. 42 **TaskReservationTimeout** | **int** | 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`. 43 44 ### Return type 45 46 [**TaskrouterV1Workflow**](TaskrouterV1Workflow.md) 47 48 ### Authorization 49 50 [accountSid_authToken](../README.md#accountSid_authToken) 51 52 ### HTTP request headers 53 54 - **Content-Type**: application/x-www-form-urlencoded 55 - **Accept**: application/json 56 57 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 58 [[Back to Model list]](../README.md#documentation-for-models) 59 [[Back to README]](../README.md) 60 61 62 ## DeleteWorkflow 63 64 > DeleteWorkflow(ctx, WorkspaceSidSid) 65 66 67 68 69 70 ### Path Parameters 71 72 73 Name | Type | Description 74 ------------- | ------------- | ------------- 75 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 76 **WorkspaceSid** | **string** | The SID of the Workspace with the Workflow to delete. 77 **Sid** | **string** | The SID of the Workflow resource to delete. 78 79 ### Other Parameters 80 81 Other parameters are passed through a pointer to a DeleteWorkflowParams struct 82 83 84 Name | Type | Description 85 ------------- | ------------- | ------------- 86 87 ### Return type 88 89 (empty response body) 90 91 ### Authorization 92 93 [accountSid_authToken](../README.md#accountSid_authToken) 94 95 ### HTTP request headers 96 97 - **Content-Type**: Not defined 98 - **Accept**: Not defined 99 100 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 101 [[Back to Model list]](../README.md#documentation-for-models) 102 [[Back to README]](../README.md) 103 104 105 ## FetchWorkflow 106 107 > TaskrouterV1Workflow FetchWorkflow(ctx, WorkspaceSidSid) 108 109 110 111 112 113 ### Path Parameters 114 115 116 Name | Type | Description 117 ------------- | ------------- | ------------- 118 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 119 **WorkspaceSid** | **string** | The SID of the Workspace with the Workflow to fetch. 120 **Sid** | **string** | The SID of the Workflow resource to fetch. 121 122 ### Other Parameters 123 124 Other parameters are passed through a pointer to a FetchWorkflowParams struct 125 126 127 Name | Type | Description 128 ------------- | ------------- | ------------- 129 130 ### Return type 131 132 [**TaskrouterV1Workflow**](TaskrouterV1Workflow.md) 133 134 ### Authorization 135 136 [accountSid_authToken](../README.md#accountSid_authToken) 137 138 ### HTTP request headers 139 140 - **Content-Type**: Not defined 141 - **Accept**: application/json 142 143 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 144 [[Back to Model list]](../README.md#documentation-for-models) 145 [[Back to README]](../README.md) 146 147 148 ## ListWorkflow 149 150 > []TaskrouterV1Workflow ListWorkflow(ctx, WorkspaceSidoptional) 151 152 153 154 155 156 ### Path Parameters 157 158 159 Name | Type | Description 160 ------------- | ------------- | ------------- 161 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 162 **WorkspaceSid** | **string** | The SID of the Workspace with the Workflow to read. 163 164 ### Other Parameters 165 166 Other parameters are passed through a pointer to a ListWorkflowParams struct 167 168 169 Name | Type | Description 170 ------------- | ------------- | ------------- 171 **FriendlyName** | **string** | The `friendly_name` of the Workflow resources to read. 172 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 173 **Limit** | **int** | Max number of records to return. 174 175 ### Return type 176 177 [**[]TaskrouterV1Workflow**](TaskrouterV1Workflow.md) 178 179 ### Authorization 180 181 [accountSid_authToken](../README.md#accountSid_authToken) 182 183 ### HTTP request headers 184 185 - **Content-Type**: Not defined 186 - **Accept**: application/json 187 188 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 189 [[Back to Model list]](../README.md#documentation-for-models) 190 [[Back to README]](../README.md) 191 192 193 ## UpdateWorkflow 194 195 > TaskrouterV1Workflow UpdateWorkflow(ctx, WorkspaceSidSidoptional) 196 197 198 199 200 201 ### Path Parameters 202 203 204 Name | Type | Description 205 ------------- | ------------- | ------------- 206 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 207 **WorkspaceSid** | **string** | The SID of the Workspace with the Workflow to update. 208 **Sid** | **string** | The SID of the Workflow resource to update. 209 210 ### Other Parameters 211 212 Other parameters are passed through a pointer to a UpdateWorkflowParams struct 213 214 215 Name | Type | Description 216 ------------- | ------------- | ------------- 217 **FriendlyName** | **string** | A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`. 218 **AssignmentCallbackUrl** | **string** | 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. 219 **FallbackAssignmentCallbackUrl** | **string** | The URL that we should call when a call to the `assignment_callback_url` fails. 220 **Configuration** | **string** | 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. 221 **TaskReservationTimeout** | **int** | 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`. 222 **ReEvaluateTasks** | **string** | 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. 223 224 ### Return type 225 226 [**TaskrouterV1Workflow**](TaskrouterV1Workflow.md) 227 228 ### Authorization 229 230 [accountSid_authToken](../README.md#accountSid_authToken) 231 232 ### HTTP request headers 233 234 - **Content-Type**: application/x-www-form-urlencoded 235 - **Accept**: application/json 236 237 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 238 [[Back to Model list]](../README.md#documentation-for-models) 239 [[Back to README]](../README.md) 240