github.com/twilio/twilio-go@v1.20.1/rest/chat/v2/docs/ServicesChannelsMembersApi.md (about) 1 # ServicesChannelsMembersApi 2 3 All URIs are relative to *https://chat.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateMember**](ServicesChannelsMembersApi.md#CreateMember) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members | 8 [**DeleteMember**](ServicesChannelsMembersApi.md#DeleteMember) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | 9 [**FetchMember**](ServicesChannelsMembersApi.md#FetchMember) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | 10 [**ListMember**](ServicesChannelsMembersApi.md#ListMember) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members | 11 [**UpdateMember**](ServicesChannelsMembersApi.md#UpdateMember) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | 12 13 14 15 ## CreateMember 16 17 > ChatV2Member CreateMember(ctx, ServiceSidChannelSidoptional) 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/chat/rest/service-resource) to create the Member resource under. 30 **ChannelSid** | **string** | The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Member resource belongs to. This value can be the Channel resource's `sid` or `unique_name`. 31 32 ### Other Parameters 33 34 Other parameters are passed through a pointer to a CreateMemberParams struct 35 36 37 Name | Type | Description 38 ------------- | ------------- | ------------- 39 **XTwilioWebhookEnabled** | **string** | The X-Twilio-Webhook-Enabled HTTP request header 40 **Identity** | **string** | The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info. 41 **RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). 42 **LastConsumedMessageIndex** | **int** | The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. This parameter should only be used when recreating a Member from a backup/separate source. 43 **LastConsumptionTimestamp** | **time.Time** | The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). 44 **DateCreated** | **time.Time** | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source. 45 **DateUpdated** | **time.Time** | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used when a Member is being recreated from a backup/separate source and where a Member was previously updated. 46 **Attributes** | **string** | A valid JSON string that contains application-specific data. 47 48 ### Return type 49 50 [**ChatV2Member**](ChatV2Member.md) 51 52 ### Authorization 53 54 [accountSid_authToken](../README.md#accountSid_authToken) 55 56 ### HTTP request headers 57 58 - **Content-Type**: application/x-www-form-urlencoded 59 - **Accept**: application/json 60 61 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 62 [[Back to Model list]](../README.md#documentation-for-models) 63 [[Back to README]](../README.md) 64 65 66 ## DeleteMember 67 68 > DeleteMember(ctx, ServiceSidChannelSidSidoptional) 69 70 71 72 73 74 ### Path Parameters 75 76 77 Name | Type | Description 78 ------------- | ------------- | ------------- 79 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 80 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Member resource from. 81 **ChannelSid** | **string** | The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`. 82 **Sid** | **string** | The SID of the Member resource to delete. This value can be either the Member's `sid` or its `identity` value. 83 84 ### Other Parameters 85 86 Other parameters are passed through a pointer to a DeleteMemberParams struct 87 88 89 Name | Type | Description 90 ------------- | ------------- | ------------- 91 **XTwilioWebhookEnabled** | **string** | The X-Twilio-Webhook-Enabled HTTP request header 92 93 ### Return type 94 95 (empty response body) 96 97 ### Authorization 98 99 [accountSid_authToken](../README.md#accountSid_authToken) 100 101 ### HTTP request headers 102 103 - **Content-Type**: Not defined 104 - **Accept**: Not defined 105 106 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 107 [[Back to Model list]](../README.md#documentation-for-models) 108 [[Back to README]](../README.md) 109 110 111 ## FetchMember 112 113 > ChatV2Member FetchMember(ctx, ServiceSidChannelSidSid) 114 115 116 117 118 119 ### Path Parameters 120 121 122 Name | Type | Description 123 ------------- | ------------- | ------------- 124 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 125 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Member resource from. 126 **ChannelSid** | **string** | The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. 127 **Sid** | **string** | The SID of the Member resource to fetch. This value can be either the Member's `sid` or its `identity` value. 128 129 ### Other Parameters 130 131 Other parameters are passed through a pointer to a FetchMemberParams struct 132 133 134 Name | Type | Description 135 ------------- | ------------- | ------------- 136 137 ### Return type 138 139 [**ChatV2Member**](ChatV2Member.md) 140 141 ### Authorization 142 143 [accountSid_authToken](../README.md#accountSid_authToken) 144 145 ### HTTP request headers 146 147 - **Content-Type**: Not defined 148 - **Accept**: application/json 149 150 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 151 [[Back to Model list]](../README.md#documentation-for-models) 152 [[Back to README]](../README.md) 153 154 155 ## ListMember 156 157 > []ChatV2Member ListMember(ctx, ServiceSidChannelSidoptional) 158 159 160 161 162 163 ### Path Parameters 164 165 166 Name | Type | Description 167 ------------- | ------------- | ------------- 168 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 169 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Member resources from. 170 **ChannelSid** | **string** | The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resources to read belong to. This value can be the Channel resource's `sid` or `unique_name`. 171 172 ### Other Parameters 173 174 Other parameters are passed through a pointer to a ListMemberParams struct 175 176 177 Name | Type | Description 178 ------------- | ------------- | ------------- 179 **Identity** | **[]string** | The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the Member resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. 180 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 181 **Limit** | **int** | Max number of records to return. 182 183 ### Return type 184 185 [**[]ChatV2Member**](ChatV2Member.md) 186 187 ### Authorization 188 189 [accountSid_authToken](../README.md#accountSid_authToken) 190 191 ### HTTP request headers 192 193 - **Content-Type**: Not defined 194 - **Accept**: application/json 195 196 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 197 [[Back to Model list]](../README.md#documentation-for-models) 198 [[Back to README]](../README.md) 199 200 201 ## UpdateMember 202 203 > ChatV2Member UpdateMember(ctx, ServiceSidChannelSidSidoptional) 204 205 206 207 208 209 ### Path Parameters 210 211 212 Name | Type | Description 213 ------------- | ------------- | ------------- 214 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 215 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the Member resource in. 216 **ChannelSid** | **string** | The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resource to update belongs to. This value can be the Channel resource's `sid` or `unique_name`. 217 **Sid** | **string** | The SID of the Member resource to update. This value can be either the Member's `sid` or its `identity` value. 218 219 ### Other Parameters 220 221 Other parameters are passed through a pointer to a UpdateMemberParams struct 222 223 224 Name | Type | Description 225 ------------- | ------------- | ------------- 226 **XTwilioWebhookEnabled** | **string** | The X-Twilio-Webhook-Enabled HTTP request header 227 **RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). 228 **LastConsumedMessageIndex** | **int** | The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) that the Member has read within the [Channel](https://www.twilio.com/docs/chat/channels). 229 **LastConsumptionTimestamp** | **time.Time** | The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). 230 **DateCreated** | **time.Time** | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source. 231 **DateUpdated** | **time.Time** | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. 232 **Attributes** | **string** | A valid JSON string that contains application-specific data. 233 234 ### Return type 235 236 [**ChatV2Member**](ChatV2Member.md) 237 238 ### Authorization 239 240 [accountSid_authToken](../README.md#accountSid_authToken) 241 242 ### HTTP request headers 243 244 - **Content-Type**: application/x-www-form-urlencoded 245 - **Accept**: application/json 246 247 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 248 [[Back to Model list]](../README.md#documentation-for-models) 249 [[Back to README]](../README.md) 250