# `Twilio.Chat.V2.Service.Channel.MemberService`
[🔗](https://github.com/jeffhuen/twilio_elixir/blob/main/lib/twilio/chat/v2/service/channel/member_service.ex#L2)

Users joined to specific channels

Operations: `list`, `create`, `fetch`, `update`, `delete`

# `create`

```elixir
@spec create(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Chat.V2.Service.Channel.Member.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `CreateMember` | Tags: ChatV2Member

## Required Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `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. |
## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `Attributes` | string | A valid JSON string that contains application-specific data. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `DateCreated` | string (date-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. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `DateUpdated` | string (date-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. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `LastConsumedMessageIndex` | integer | 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. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `LastConsumptionTimestamp` | string (date-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). |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `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). |

# `delete`

```elixir
@spec delete(Twilio.Client.t(), String.t(), String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}
```

Operation: `DeleteMember` | Tags: ChatV2Member

# `fetch`

```elixir
@spec fetch(Twilio.Client.t(), String.t(), String.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Chat.V2.Service.Channel.Member.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `FetchMember` | Tags: ChatV2Member

# `list`

```elixir
@spec list(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Page.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `ListMember` | Tags: ChatV2Member

## Query Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `Identity` | array | 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. |

# `stream`

```elixir
@spec stream(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  Enumerable.t()
```

Stream:  (lazy auto-pagination).

# `update`

```elixir
@spec update(Twilio.Client.t(), String.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Chat.V2.Service.Channel.Member.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `UpdateMember` | Tags: ChatV2Member

## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `Attributes` | string | A valid JSON string that contains application-specific data. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `DateCreated` | string (date-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. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `DateUpdated` | string (date-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. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `LastConsumedMessageIndex` | integer | 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). |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `LastConsumptionTimestamp` | string (date-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). |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `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). |

---

*Consult [api-reference.md](api-reference.md) for complete listing*
