github.com/twilio/twilio-go@v1.20.1/rest/chat/v1/docs/ServicesUsersApi.md (about) 1 # ServicesUsersApi 2 3 All URIs are relative to *https://chat.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateUser**](ServicesUsersApi.md#CreateUser) | **Post** /v1/Services/{ServiceSid}/Users | 8 [**DeleteUser**](ServicesUsersApi.md#DeleteUser) | **Delete** /v1/Services/{ServiceSid}/Users/{Sid} | 9 [**FetchUser**](ServicesUsersApi.md#FetchUser) | **Get** /v1/Services/{ServiceSid}/Users/{Sid} | 10 [**ListUser**](ServicesUsersApi.md#ListUser) | **Get** /v1/Services/{ServiceSid}/Users | 11 [**UpdateUser**](ServicesUsersApi.md#UpdateUser) | **Post** /v1/Services/{ServiceSid}/Users/{Sid} | 12 13 14 15 ## CreateUser 16 17 > ChatV1User CreateUser(ctx, ServiceSidoptional) 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 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under. 30 31 ### Other Parameters 32 33 Other parameters are passed through a pointer to a CreateUserParams struct 34 35 36 Name | Type | Description 37 ------------- | ------------- | ------------- 38 **Identity** | **string** | The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). This value is often a username or email address. See the Identity documentation for more details. 39 **RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new User. 40 **Attributes** | **string** | A valid JSON string that contains application-specific data. 41 **FriendlyName** | **string** | A descriptive string that you create to describe the new resource. This value is often used for display purposes. 42 43 ### Return type 44 45 [**ChatV1User**](ChatV1User.md) 46 47 ### Authorization 48 49 [accountSid_authToken](../README.md#accountSid_authToken) 50 51 ### HTTP request headers 52 53 - **Content-Type**: application/x-www-form-urlencoded 54 - **Accept**: application/json 55 56 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 57 [[Back to Model list]](../README.md#documentation-for-models) 58 [[Back to README]](../README.md) 59 60 61 ## DeleteUser 62 63 > DeleteUser(ctx, ServiceSidSid) 64 65 66 67 68 69 ### Path Parameters 70 71 72 Name | Type | Description 73 ------------- | ------------- | ------------- 74 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 75 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. 76 **Sid** | **string** | The Twilio-provided string that uniquely identifies the User resource to delete. 77 78 ### Other Parameters 79 80 Other parameters are passed through a pointer to a DeleteUserParams struct 81 82 83 Name | Type | Description 84 ------------- | ------------- | ------------- 85 86 ### Return type 87 88 (empty response body) 89 90 ### Authorization 91 92 [accountSid_authToken](../README.md#accountSid_authToken) 93 94 ### HTTP request headers 95 96 - **Content-Type**: Not defined 97 - **Accept**: Not defined 98 99 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 100 [[Back to Model list]](../README.md#documentation-for-models) 101 [[Back to README]](../README.md) 102 103 104 ## FetchUser 105 106 > ChatV1User FetchUser(ctx, ServiceSidSid) 107 108 109 110 111 112 ### Path Parameters 113 114 115 Name | Type | Description 116 ------------- | ------------- | ------------- 117 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 118 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. 119 **Sid** | **string** | The Twilio-provided string that uniquely identifies the User resource to fetch. 120 121 ### Other Parameters 122 123 Other parameters are passed through a pointer to a FetchUserParams struct 124 125 126 Name | Type | Description 127 ------------- | ------------- | ------------- 128 129 ### Return type 130 131 [**ChatV1User**](ChatV1User.md) 132 133 ### Authorization 134 135 [accountSid_authToken](../README.md#accountSid_authToken) 136 137 ### HTTP request headers 138 139 - **Content-Type**: Not defined 140 - **Accept**: application/json 141 142 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 143 [[Back to Model list]](../README.md#documentation-for-models) 144 [[Back to README]](../README.md) 145 146 147 ## ListUser 148 149 > []ChatV1User ListUser(ctx, ServiceSidoptional) 150 151 152 153 154 155 ### Path Parameters 156 157 158 Name | Type | Description 159 ------------- | ------------- | ------------- 160 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 161 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. 162 163 ### Other Parameters 164 165 Other parameters are passed through a pointer to a ListUserParams struct 166 167 168 Name | Type | Description 169 ------------- | ------------- | ------------- 170 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 171 **Limit** | **int** | Max number of records to return. 172 173 ### Return type 174 175 [**[]ChatV1User**](ChatV1User.md) 176 177 ### Authorization 178 179 [accountSid_authToken](../README.md#accountSid_authToken) 180 181 ### HTTP request headers 182 183 - **Content-Type**: Not defined 184 - **Accept**: application/json 185 186 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 187 [[Back to Model list]](../README.md#documentation-for-models) 188 [[Back to README]](../README.md) 189 190 191 ## UpdateUser 192 193 > ChatV1User UpdateUser(ctx, ServiceSidSidoptional) 194 195 196 197 198 199 ### Path Parameters 200 201 202 Name | Type | Description 203 ------------- | ------------- | ------------- 204 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 205 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from. 206 **Sid** | **string** | The Twilio-provided string that uniquely identifies the User resource to update. 207 208 ### Other Parameters 209 210 Other parameters are passed through a pointer to a UpdateUserParams struct 211 212 213 Name | Type | Description 214 ------------- | ------------- | ------------- 215 **RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user. 216 **Attributes** | **string** | A valid JSON string that contains application-specific data. 217 **FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is often used for display purposes. 218 219 ### Return type 220 221 [**ChatV1User**](ChatV1User.md) 222 223 ### Authorization 224 225 [accountSid_authToken](../README.md#accountSid_authToken) 226 227 ### HTTP request headers 228 229 - **Content-Type**: application/x-www-form-urlencoded 230 - **Accept**: application/json 231 232 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 233 [[Back to Model list]](../README.md#documentation-for-models) 234 [[Back to README]](../README.md) 235