> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ChatClient

> Methods for X API v2 Chat endpoints.

Access **Chat** endpoints via `client.Chat` (`ChatClient`).

## Methods

| Method | Endpoint | Behavior | Summary |
| :- | :- | :- | :- |
| [`AcceptMessageRequestAsync`](#acceptmessagerequestasync) | `POST /2/chat/message_requests/{id}/accept` | Standard | Accept a Chat Message Request |
| [`AddConversationKeysAsync`](#addconversationkeysasync) | `POST /2/chat/conversations/{id}/keys` | Standard | Add Conversation Keys |
| [`AddGroupAdminsAsync`](#addgroupadminsasync) | `POST /2/chat/conversations/{id}/admins` | Standard | Add Admins to a Chat Group Conversation |
| [`AddGroupMembersAsync`](#addgroupmembersasync) | `POST /2/chat/conversations/{id}/members` | Standard | Add Members to a Chat Group Conversation |
| [`AddUserPublicKeyAsync`](#adduserpublickeyasync) | `POST /2/users/{id}/public_keys` | Standard | Add Public Key |
| [`ApproveGroupAdminRequestAsync`](#approvegroupadminrequestasync) | `POST /2/chat/conversations/{id}/admin_requests/{user_id}/approve` | Standard | Approve an Admin Request in a Chat Group Conversation |
| [`ArchiveConversationAsync`](#archiveconversationasync) | `POST /2/chat/conversations/{id}/archive` | Standard | Archive a Chat Conversation |
| [`CreateConversationAsync`](#createconversationasync) | `POST /2/chat/conversations/group` | Standard | Create Chat Group Conversation |
| [`CreateGroupAdminRequestAsync`](#creategroupadminrequestasync) | `POST /2/chat/conversations/{id}/admin_requests` | Standard | Request Admin Permissions in a Chat Group Conversation |
| [`CreateGroupJoinRequestAsync`](#creategroupjoinrequestasync) | `POST /2/chat/conversations/{id}/join_requests` | Standard | Request to Join a Chat Group |
| [`DeleteConversationAsync`](#deleteconversationasync) | `DELETE /2/chat/conversations/{id}` | Standard | Delete a Chat Conversation |
| [`DeleteConversationMessageTtlAsync`](#deleteconversationmessagettlasync) | `DELETE /2/chat/conversations/{id}/message_ttl` | Standard | Turn Off Disappearing Messages in a Chat Conversation |
| [`DeleteMessagesAsync`](#deletemessagesasync) | `POST /2/chat/conversations/{id}/messages/delete` | Standard | Delete Chat Messages |
| [`DisableGroupInviteAsync`](#disablegroupinviteasync) | `DELETE /2/chat/conversations/{id}/invite` | Standard | Disable a Chat Group Invite Link |
| [`EnableGroupInviteAsync`](#enablegroupinviteasync) | `POST /2/chat/conversations/{id}/invite` | Standard | Enable a Chat Group Invite Link |
| [`GetConversationAsync`](#getconversationasync) | `GET /2/chat/conversations/{id}` | Standard | Get Chat Conversation |
| [`GetConversationEventsAsync`](#getconversationeventsasync) | `GET /2/chat/conversations/{id}/events` | Paginated | Get Chat Conversation Events |
| [`GetConversationPinnedMessagesAsync`](#getconversationpinnedmessagesasync) | `GET /2/chat/conversations/{id}/pinned_messages` | Paginated | Get Chat Conversation Pinned Messages |
| [`GetConversationsAsync`](#getconversationsasync) | `GET /2/chat/conversations` | Paginated | Get Chat Conversations |
| [`GetGroupAdminRequestsAsync`](#getgroupadminrequestsasync) | `GET /2/chat/conversations/{id}/admin_requests` | Paginated | Get Pending Admin Requests for a Chat Group Conversation |
| [`GetGroupInviteAsync`](#getgroupinviteasync) | `GET /2/chat/conversations/{id}/invites/{token}` | Standard | Get a Chat Group Invite Link |
| [`GetMessageRequestAsync`](#getmessagerequestasync) | `GET /2/chat/message_requests/{id}` | Standard | Get Chat Message Request |
| [`GetMessageRequestsAsync`](#getmessagerequestsasync) | `GET /2/chat/message_requests` | Paginated | Get Chat Message Requests |
| [`GetSettingsAsync`](#getsettingsasync) | `GET /2/chat/settings` | Standard | Get Chat Settings |
| [`InitializeGroupAsync`](#initializegroupasync) | `POST /2/chat/conversations/group/initialize` | Standard | Initialize Chat Group |
| [`MarkConversationReadAsync`](#markconversationreadasync) | `POST /2/chat/conversations/{id}/read` | Standard | Mark Conversation as Read |
| [`MarkConversationUnreadAsync`](#markconversationunreadasync) | `POST /2/chat/conversations/{id}/unread` | Standard | Mark Conversation as Unread |
| [`MediaDownloadAsync`](#mediadownloadasync) | `GET /2/chat/media/{id}/{media_hash_key}` | Standard | Download Chat Media |
| [`MediaUploadAppendAsync`](#mediauploadappendasync) | `POST /2/chat/media/upload/{id}/append` | Standard | Append Chat Media Upload |
| [`MediaUploadFinalizeAsync`](#mediauploadfinalizeasync) | `POST /2/chat/media/upload/{id}/finalize` | Standard | Finalize Chat Media Upload |
| [`MediaUploadInitializeAsync`](#mediauploadinitializeasync) | `POST /2/chat/media/upload/initialize` | Standard | Initialize Chat Media Upload |
| [`MuteConversationAsync`](#muteconversationasync) | `POST /2/chat/conversations/{id}/mute` | Standard | Mute a Chat Conversation |
| [`RejectGroupAdminRequestAsync`](#rejectgroupadminrequestasync) | `POST /2/chat/conversations/{id}/admin_requests/{user_id}/reject` | Standard | Reject an Admin Request in a Chat Group Conversation |
| [`RejectGroupJoinRequestsAsync`](#rejectgroupjoinrequestsasync) | `POST /2/chat/conversations/{id}/join_requests/reject` | Standard | Reject Join Requests for a Chat Group Conversation |
| [`RemoveGroupAdminsAsync`](#removegroupadminsasync) | `POST /2/chat/conversations/{id}/admins/remove` | Standard | Remove Admins from a Chat Group Conversation |
| [`RemoveGroupMembersAsync`](#removegroupmembersasync) | `POST /2/chat/conversations/{id}/members/remove` | Standard | Remove Members from a Chat Group Conversation |
| [`SendMessageAsync`](#sendmessageasync) | `POST /2/chat/conversations/{id}/messages` | Standard | Send Chat Message |
| [`SendTypingIndicatorAsync`](#sendtypingindicatorasync) | `POST /2/chat/conversations/{id}/typing` | Standard | Send Typing Indicator |
| [`UnarchiveConversationAsync`](#unarchiveconversationasync) | `DELETE /2/chat/conversations/{id}/archive` | Standard | Unarchive a Chat Conversation |
| [`UnmuteConversationAsync`](#unmuteconversationasync) | `DELETE /2/chat/conversations/{id}/mute` | Standard | Unmute a Chat Conversation |
| [`UpdateConversationMessageTtlAsync`](#updateconversationmessagettlasync) | `PUT /2/chat/conversations/{id}/message_ttl` | Standard | Turn On Disappearing Messages in a Chat Conversation |
| [`UpdateConversationScreenCaptureAsync`](#updateconversationscreencaptureasync) | `PUT /2/chat/conversations/{id}/screen_capture` | Standard | Update Screen Capture Settings for a Chat Conversation |
| [`UpdateGroupAsync`](#updategroupasync) | `PUT /2/chat/conversations/{id}` | Standard | Update a Chat Group Conversation |
| [`UpdateGroupAdminSettingsAsync`](#updategroupadminsettingsasync) | `PUT /2/chat/conversations/{id}/admin_settings` | Standard | Update the Admin-Only Settings of a Chat Group Conversation |
| [`UpdateSettingsAsync`](#updatesettingsasync) | `PUT /2/chat/settings` | Standard | Update Chat Settings |

## `AcceptMessageRequestAsync`

POST `/2/chat/message_requests/{id}/accept`

**Accept a Chat Message Request**

Accepts the other user's pending message request in a 1:1 Chat conversation, which moves to the authenticated user's inbox. Without a pending request, including after a successful accept, the response is 404. Replying to a request does not accept it.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.AcceptMessageRequestAsync("1895000000000000000");
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The other user's ID, or both user IDs joined by a hyphen.

**Returns:** `Task<AcceptChatMessageRequestResponse>`

***

## `AddConversationKeysAsync`

POST `/2/chat/conversations/{id}/keys`

**Add Conversation Keys**

Adds (initializes or rotates) the encryption keys for a Chat conversation. Call this before sending messages in a new 1:1 conversation, and again with a newer key version to rotate the conversation key. For 1:1 conversations, provide the recipient's user ID as the conversation id; the server constructs the canonical conversation ID from the authenticated user and recipient. The request body must contain the conversation key version and participant keys (the conversation key encrypted for each participant using their public key).

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.AddConversationKeysAsync(
    "1895000000000000000",
    new AddConversationKeysRequest { ConversationKeyVersion = "example" }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**body** `AddConversationKeysRequest` *required*

Request payload.

**Returns:** `Task<AddConversationKeysResponse>`

***

## `AddGroupAdminsAsync`

POST `/2/chat/conversations/{id}/admins`

**Add Admins to a Chat Group Conversation**

Grants admin rights to one or more members of an existing encrypted Chat group conversation.

```csharp theme={null}
using System;
using System.Collections.Generic;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.AddGroupAdminsAsync(
    "1895000000000000000",
    new AddChatGroupAdminsRequest { UserIds = new List<string> { "2244994945" } }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the group conversation, starting with `g`.

**body** `AddChatGroupAdminsRequest` *required*

Request payload.

**Returns:** `Task<AddChatGroupAdminsResponse>`

***

## `AddGroupMembersAsync`

POST `/2/chat/conversations/{id}/members`

**Add Members to a Chat Group Conversation**

Adds one or more members to an existing encrypted Chat group conversation, rotating the conversation key. Adding a user who has a pending join request approves that request; approval needs the same key-rotation body as adding any member.

```csharp theme={null}
using System;
using System.Collections.Generic;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.AddGroupMembersAsync(
    "1895000000000000000",
    new AddChatGroupMembersRequest { UserIds = new List<string> { "2244994945" } }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**body** `AddChatGroupMembersRequest` *required*

Request payload.

**Returns:** `Task<AddChatGroupMembersResponse>`

***

## `AddUserPublicKeyAsync`

POST `/2/users/{id}/public_keys`

**Add Public Key**

Registers a user's public key for X Chat encryption.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.AddUserPublicKeyAsync("2244994945", new AddUserPublicKeyRequest());
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**body** `AddUserPublicKeyRequest` *required*

Request payload.

**Returns:** `Task<AddUserPublicKeyResponse>`

***

## `ApproveGroupAdminRequestAsync`

POST `/2/chat/conversations/{id}/admin_requests/{user_id}/approve`

**Approve an Admin Request in a Chat Group Conversation**

Makes the user who requested admin permissions an admin of an encrypted Chat group conversation. Only a group admin can approve.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.ApproveGroupAdminRequestAsync(
    "1895000000000000000",
    "2244994945",
    new ApproveChatGroupAdminRequestRequest()
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the group conversation, starting with `g`.

**userId** `string` *required*

The ID of the user who requested admin permissions.

**body** `ApproveChatGroupAdminRequestRequest` *required*

Request payload.

**Returns:** `Task<ApproveChatGroupAdminRequestResponse>`

***

## `ArchiveConversationAsync`

POST `/2/chat/conversations/{id}/archive`

**Archive a Chat Conversation**

Archives a Chat conversation for the authenticated user only. Archiving an archived conversation changes nothing. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.ArchiveConversationAsync("1895000000000000000", new ArchiveChatConversationRequest());
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen.

**body** `ArchiveChatConversationRequest` *required*

Request payload.

**Returns:** `Task<ArchiveChatConversationResponse>`

***

## `CreateConversationAsync`

POST `/2/chat/conversations/group`

**Create Chat Group Conversation**

Creates a new encrypted Chat group conversation on behalf of the authenticated user.

```csharp theme={null}
using System;
using System.Collections.Generic;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.CreateConversationAsync(
    new CreateChatConversationRequest { ConversationId = "1500000000000000000", ConversationKeyVersion = "example", GroupMembers = new List<string> { "example" } }
);
Console.WriteLine(response);
```

### Parameters

**body** `CreateChatConversationRequest` *required*

Request payload.

**Returns:** `Task<CreateChatConversationResponse>`

***

## `CreateGroupAdminRequestAsync`

POST `/2/chat/conversations/{id}/admin_requests`

**Request Admin Permissions in a Chat Group Conversation**

Asks the admins of an encrypted Chat group conversation to make the authenticated user an admin. An admin approves or rejects the request.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.CreateGroupAdminRequestAsync("1895000000000000000", new CreateChatGroupAdminRequestRequest());
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the group conversation, starting with `g`.

**body** `CreateChatGroupAdminRequestRequest` *required*

Request payload.

**Returns:** `Task<CreateChatGroupAdminRequestResponse>`

***

## `CreateGroupJoinRequestAsync`

POST `/2/chat/conversations/{id}/join_requests`

**Request to Join a Chat Group**

Asks to join an encrypted Chat group conversation through its invite link. The request stays pending until a group admin adds the user to the group.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.CreateGroupJoinRequestAsync(
    "1895000000000000000",
    new CreateChatGroupJoinRequestRequest { Token = "example" }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the group conversation, starting with `g`.

**body** `CreateChatGroupJoinRequestRequest` *required*

Request payload.

**Returns:** `Task<CreateChatGroupJoinRequestResponse>`

***

## `DeleteConversationAsync`

DELETE `/2/chat/conversations/{id}`

**Delete a Chat Conversation**

Deletes a Chat conversation for the authenticated user only; other participants keep it. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Deleting a pending message request's conversation deletes the request, like Delete in the X app.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.DeleteConversationAsync("1895000000000000000", new DeleteChatConversationRequest());
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen.

**body** `DeleteChatConversationRequest` *required*

Request payload.

**Returns:** `Task<DeleteChatConversationResponse>`

***

## `DeleteConversationMessageTtlAsync`

DELETE `/2/chat/conversations/{id}/message_ttl`

**Turn Off Disappearing Messages in a Chat Conversation**

Stops new messages in a 1:1 or group Chat conversation from disappearing, for every participant. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.DeleteConversationMessageTtlAsync("1895000000000000000", new DeleteChatConversationMessageTtlRequest());
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen.

**body** `DeleteChatConversationMessageTtlRequest` *required*

Request payload.

**Returns:** `Task<DeleteChatConversationMessageTtlResponse>`

***

## `DeleteMessagesAsync`

POST `/2/chat/conversations/{id}/messages/delete`

**Delete Chat Messages**

Deletes one or more messages from a Chat conversation. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Delete for all removes a message you sent (or, in groups you administer, any message) for every participant; delete for self removes any message only from your own view.

```csharp theme={null}
using System;
using System.Collections.Generic;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.DeleteMessagesAsync(
    "1895000000000000000",
    new DeleteChatMessagesRequest { SequenceIds = new List<string> { "1895000000000000000" }, DeleteMessageAction = "delete_for_all" }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**body** `DeleteChatMessagesRequest` *required*

Request payload.

**Returns:** `Task<DeleteChatMessagesResponse>`

***

## `DisableGroupInviteAsync`

DELETE `/2/chat/conversations/{id}/invite`

**Disable a Chat Group Invite Link**

Turns off the invite link for an encrypted Chat group conversation. The existing link stops working.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.DisableGroupInviteAsync("1895000000000000000", new DisableChatGroupInviteRequest());
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the group conversation, starting with `g`.

**body** `DisableChatGroupInviteRequest` *required*

Request payload.

**Returns:** `Task<DisableChatGroupInviteResponse>`

***

## `EnableGroupInviteAsync`

POST `/2/chat/conversations/{id}/invite`

**Enable a Chat Group Invite Link**

Turns on the invite link for an encrypted Chat group conversation and returns the link details. The client builds the link and sends it as invite\_url, in the form [https://x.com/i/chat/group\_join/\&lt;conversation\_id\&gt;/\&lt;token](https://x.com/i/chat/group_join/\&lt;conversation_id\&gt;/\&lt;token)>, where the token is exactly 10 letters, digits, '-' or '\_'. invite\_url is required when action\_signatures is sent. To make the link expire, send validity\_duration\_msec or validity\_expiry\_timestamp\_msec. With action\_signatures, send validity\_expiry\_timestamp\_msec, because the signed payload carries the expiry. The group name and avatar sent here are stored unencrypted and shown to anyone who opens the link.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.EnableGroupInviteAsync("1895000000000000000", new EnableChatGroupInviteRequest());
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the group conversation, starting with `g`.

**body** `EnableChatGroupInviteRequest` *required*

Request payload.

**Returns:** `Task<EnableChatGroupInviteResponse>`

***

## `GetConversationAsync`

GET `/2/chat/conversations/{id}`

**Get Chat Conversation**

Returns metadata for a Chat conversation including type, muted status, group details, and your unread state. For the unread state, request chat\_conversation.fields=unread,last\_read\_event\_id,newest\_event\_id: those fields give your read state, computed from your latest read receipt and the conversation's latest notifying message. Use chat\_conversation.fields to select which fields are returned. Use expansions to hydrate member, admin, or participant user objects. Use user.fields to control which profile fields are returned for expanded users; in a 1:1 chat, user.fields=receives\_your\_chat on the participant says how you can message them: encrypted, unencrypted, or none.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.GetConversationAsync("1895000000000000000");
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**Optional parameters (ChatClient.GetConversationOptions — 3)**

**options.ChatConversationFields** `List\<string\>`

A comma separated list of ChatConversation fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**Returns:** `Task<GetChatConversationResponse>`

***

## `GetConversationEventsAsync`

GET `/2/chat/conversations/{id}/events` Paginated

**Get Chat Conversation Events**

Retrieves the events of a specific Chat conversation, newest first, with pagination support: messages, key changes, group changes, and read receipts. Events with an id above the conversation's last\_read\_event\_id are unread: they come after the point you read up to. To collect them, page until an event's id is at or below it. Only `id` and `encoded_event` are always present. Events are either end-to-end encrypted or unencrypted, such as messages sent before the conversation was encrypted. Encrypted events carry `conversation_key_version`, and usually `conversation_token` and `message_event_signature`; treat an encrypted event without `message_event_signature` as unverified. An event without `conversation_key_version` is unencrypted. Decode each `encoded_event` client-side, and decrypt it with the conversation key named by `conversation_key_version` when that is present. A page holds up to `max_results` events and can hold fewer while `has_more` is true. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

await foreach (var page in client.Chat.GetConversationEventsPages("1895000000000000000"))
{
    Console.WriteLine(page);
}
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**Optional parameters (ChatClient.GetConversationEventsOptions — 3)**

**options.MaxResults** `int`

The maximum number of events to return.

**options.PaginationToken** `string`

The next\_token from a previous response, to fetch the next page.

**options.ChatMessageEventFields** `List\<string\>`

A comma separated list of ChatMessageEvent fields to display.

**Returns:** `Task<GetChatConversationEventsResponse>` (use `GetConversationEventsPages(...)` for `IAsyncEnumerable` page iteration)

***

## `GetConversationPinnedMessagesAsync`

GET `/2/chat/conversations/{id}/pinned_messages` Paginated

**Get Chat Conversation Pinned Messages**

Retrieves the pinned message events of a Chat conversation with pagination support. Each event is a Base64-encoded Thrift pin event whose contents are end-to-end encrypted; decode and decrypt it client-side. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

await foreach (var page in client.Chat.GetConversationPinnedMessagesPages("1895000000000000000"))
{
    Console.WriteLine(page);
}
```

### Parameters

**id** `string` *required*

The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen.

**Optional parameters (ChatClient.GetConversationPinnedMessagesOptions — 2)**

**options.PaginationToken** `string`

The next\_token from a previous response, to fetch the next page.

**options.ChatPinnedMessageFields** `List\<string\>`

A comma separated list of ChatPinnedMessage fields to display.

**Returns:** `Task<GetChatConversationPinnedMessagesResponse>` (use `GetConversationPinnedMessagesPages(...)` for `IAsyncEnumerable` page iteration)

***

## `GetConversationsAsync`

GET `/2/chat/conversations` Paginated

**Get Chat Conversations**

Retrieves a list of Chat conversations for the authenticated user's inbox, newest first: the most recently active conversation comes first. To find the chat with a particular person, start with participant\_query set to their @username or name; with expansions=participant\_ids, user.fields=receives\_your\_chat says how you can message each match. The unread, last\_read\_event\_id and newest\_event\_id fields give your read state, computed from your latest read receipt and each conversation's latest notifying message. Request them with chat\_conversation.fields=unread,last\_read\_event\_id,newest\_event\_id.

The filters unread\_only, type, is\_archived, is\_muted, participant\_ids, participant\_query, start\_time and end\_time are optional, and all filters must match (AND). participant\_query keeps conversations where another participant's username, or a word of their display name, starts with the query, ignoring case and accents; with a leading @ it matches usernames only. It considers the 100 people who best match the query, uses only public profile information, and never matches group names, nicknames or messages. start\_time and end\_time apply to the time of each conversation's latest message.

Each page covers max\_results conversations and returns those that match, so a page can hold fewer than max\_results, or none, while meta.next\_token is set and has\_more is true: keep paging, passing meta.next\_token as pagination\_token. Once a page reaches a conversation whose latest message is older than start\_time, has\_more is false. A pagination\_token only works with the same filters as the request that returned it; with other filters, the request fails with a 400.

When both are provided, `start_time` must be earlier than `end_time`.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

await foreach (var page in client.Chat.GetConversationsPages())
{
    Console.WriteLine(page);
}
```

### Parameters

**Optional parameters (ChatClient.GetConversationsOptions — 13)**

**options.MaxResults** `int`

Conversations covered per page (1-1000, default 200). Filtered pages can return fewer.

**options.PaginationToken** `string`

meta.next\_token from the previous page. Send the same filters with it, or the request fails.

**options.UnreadOnly** `bool`

Return only unread conversations. A page can be short; keep paging while has\_more.

**options.Type** `string`

Only direct (1:1) or only group conversations. Omit for both.

**options.IsArchived** `bool`

true: only archived; false: only not archived. Omit for both.

**options.IsMuted** `bool`

true: only muted; false: only not muted. Omit for both.

**options.ParticipantIds** `List\<string\>`

Comma-separated numeric user IDs (1-10), all in the chat. Names or @handles: use participant\_query.

**options.ParticipantQuery** `string`

Start here to find someone's chat: their @username or a word of their name (1-50 chars).

**options.StartTime** `string`

ISO 8601, e.g. 2026-10-16T00:00:00Z. Chats whose latest message is at or after this time.

**options.EndTime** `string`

ISO 8601, e.g. 2026-10-17T00:00:00Z. Chats whose latest message is before this time.

**options.ChatConversationFields** `List\<string\>`

A comma separated list of ChatConversation fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**Returns:** `Task<GetChatConversationsResponse>` (use `GetConversationsPages(...)` for `IAsyncEnumerable` page iteration)

***

## `GetGroupAdminRequestsAsync`

GET `/2/chat/conversations/{id}/admin_requests` Paginated

**Get Pending Admin Requests for a Chat Group Conversation**

Returns the users who have asked to become admins of an encrypted Chat group conversation. Only a group admin can list admin requests. Use user.fields to select which profile fields are returned.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

await foreach (var page in client.Chat.GetGroupAdminRequestsPages("1895000000000000000"))
{
    Console.WriteLine(page);
}
```

### Parameters

**id** `string` *required*

The ID of the group conversation, starting with `g`.

**Optional parameters (ChatClient.GetGroupAdminRequestsOptions — 4)**

**options.PaginationToken** `string`

The next\_token from a previous response, to fetch the next page.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.PostFields** `List\<string\>`

A comma separated list of Post fields to display.

**Returns:** `Task<GetChatGroupAdminRequestsResponse>` (use `GetGroupAdminRequestsPages(...)` for `IAsyncEnumerable` page iteration)

***

## `GetGroupInviteAsync`

GET `/2/chat/conversations/{id}/invites/{token}`

**Get a Chat Group Invite Link**

Returns the preview of an encrypted Chat group conversation from its invite link: group name, avatar, member count, and the authenticated user's join state. The conversation ID and the token both come from the invite link.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.GetGroupInviteAsync("1895000000000000000", "example");
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the group conversation, starting with `g`.

**token** `string` *required*

The 10-character invite token from the group's invite link.

**Optional parameters (ChatClient.GetGroupInviteOptions — 1)**

**options.ChatGroupInviteFields** `List\<string\>`

A comma separated list of ChatGroupInvite fields to display.

**Returns:** `Task<GetChatGroupInviteResponse>`

***

## `GetMessageRequestAsync`

GET `/2/chat/message_requests/{id}`

**Get Chat Message Request**

Retrieves the message request state of a 1:1 Chat conversation and its newest message events. Like opening the request in an X app, reading it marks the returned messages as delivered and updates the unread badge.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.GetMessageRequestAsync("1895000000000000000");
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The other user's ID, or both user IDs joined by a hyphen.

**Optional parameters (ChatClient.GetMessageRequestOptions — 1)**

**options.ChatMessageRequestDetailFields** `List\<string\>`

A comma separated list of ChatMessageRequestDetail fields to display.

**Returns:** `Task<GetChatMessageRequestResponse>`

***

## `GetMessageRequestsAsync`

GET `/2/chat/message_requests` Paginated

**Get Chat Message Requests**

Retrieves the authenticated user's pending Chat message requests from one inbox. Message contents are end-to-end encrypted unless the conversation is unencrypted. Accepting or deleting requests between pages can skip or repeat requests, and a page can be empty while `next_token` is set.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

await foreach (var page in client.Chat.GetMessageRequestsPages())
{
    Console.WriteLine(page);
}
```

### Parameters

**Optional parameters (ChatClient.GetMessageRequestsOptions — 4)**

**options.InboxType** `string`

Which message request inbox to list: `you_may_know` (the apps' Priority tab) or `low_quality` (the apps' Hidden tab).

**options.MaxResults** `int`

The maximum number of message requests to return.

**options.PaginationToken** `string`

The next\_token from a previous response, to fetch the next page.

**options.ChatMessageRequestFields** `List\<string\>`

A comma separated list of ChatMessageRequest fields to display.

**Returns:** `Task<GetChatMessageRequestsResponse>` (use `GetMessageRequestsPages(...)` for `IAsyncEnumerable` page iteration)

***

## `GetSettingsAsync`

GET `/2/chat/settings`

**Get Chat Settings**

Returns the authenticated user's Chat privacy settings: who can message them, read receipts, the message quality filter, and audio/video call permissions.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.GetSettingsAsync();
Console.WriteLine(response);
```

### Parameters

**Optional parameters (ChatClient.GetSettingsOptions — 1)**

**options.ChatSettingsFields** `List\<string\>`

A comma separated list of ChatSettings fields to display.

**Returns:** `Task<GetChatSettingsResponse>`

***

## `InitializeGroupAsync`

POST `/2/chat/conversations/group/initialize`

**Initialize Chat Group**

Initializes a new Chat group conversation and returns a unique conversation ID. Use the returned conversation\_id in a subsequent POST /chat/conversations/group call to fully create and configure the group.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.InitializeGroupAsync();
Console.WriteLine(response);
```

**Returns:** `Task<InitializeChatGroupResponse>`

***

## `MarkConversationReadAsync`

POST `/2/chat/conversations/{id}/read`

**Mark Conversation as Read**

Marks a specific Chat conversation as read on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Without action\_signatures the conversation is marked read up to its newest event and the read receipt is unsigned. With one action signature over a MarkConversationReadEvent, the server sends that signed read receipt, marking the conversation read up to the event it names.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.MarkConversationReadAsync("1895000000000000000", new MarkChatConversationReadRequest());
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**body** `MarkChatConversationReadRequest` *required*

Request payload.

**Returns:** `Task<MarkChatConversationReadResponse>`

***

## `MarkConversationUnreadAsync`

POST `/2/chat/conversations/{id}/unread`

**Mark Conversation as Unread**

Marks a specific Chat conversation as unread on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.MarkConversationUnreadAsync("1895000000000000000");
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**Returns:** `Task<MarkChatConversationUnreadResponse>`

***

## `MediaDownloadAsync`

GET `/2/chat/media/{id}/{media_hash_key}`

**Download Chat Media**

Downloads encrypted media bytes from an XChat conversation. The response body contains raw binary bytes. A media item too large to return in one response fails with a 413 problem of type `https://api.x.com/2/problems/response-too-large`, and a retry fails the same way.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.MediaDownloadAsync("1895000000000000000", "example");
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**mediaHashKey** `string` *required*

`media_hash_key` (path parameter).

**Returns:** `Task<byte[]>`

***

## `MediaUploadAppendAsync`

POST `/2/chat/media/upload/{id}/append`

**Append Chat Media Upload**

Appends media data to an XChat upload session.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.MediaUploadAppendAsync(
    "1895000000000000000",
    new ChatMediaUploadAppendRequest { Media = "example", SegmentIndex = 1, ConversationId = "1500000000000000000", MediaHashKey = "example" }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**body** `ChatMediaUploadAppendRequest` *required*

Request payload.

**Returns:** `Task<ChatMediaUploadAppendResponse>`

***

## `MediaUploadFinalizeAsync`

POST `/2/chat/media/upload/{id}/finalize`

**Finalize Chat Media Upload**

Finalizes an XChat media upload session.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.MediaUploadFinalizeAsync(
    "1895000000000000000",
    new ChatMediaUploadFinalizeRequest { ConversationId = "1500000000000000000", MediaHashKey = "example", NumParts = "example" }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**body** `ChatMediaUploadFinalizeRequest` *required*

Request payload.

**Returns:** `Task<ChatMediaUploadFinalizeResponse>`

***

## `MediaUploadInitializeAsync`

POST `/2/chat/media/upload/initialize`

**Initialize Chat Media Upload**

Initializes an XChat media upload session.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.MediaUploadInitializeAsync(
    new ChatMediaUploadInitializeRequest { ConversationId = "1500000000000000000", TotalBytes = 1 }
);
Console.WriteLine(response);
```

### Parameters

**body** `ChatMediaUploadInitializeRequest` *required*

Request payload.

**Returns:** `Task<ChatMediaUploadInitializeResponse>`

***

## `MuteConversationAsync`

POST `/2/chat/conversations/{id}/mute`

**Mute a Chat Conversation**

Mutes notifications for a Chat conversation for the authenticated user only. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.MuteConversationAsync("1895000000000000000", new MuteChatConversationRequest());
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen.

**body** `MuteChatConversationRequest` *required*

Request payload.

**Returns:** `Task<MuteChatConversationResponse>`

***

## `RejectGroupAdminRequestAsync`

POST `/2/chat/conversations/{id}/admin_requests/{user_id}/reject`

**Reject an Admin Request in a Chat Group Conversation**

Declines a user's pending request for admin permissions in an encrypted Chat group conversation. Only a group admin can reject.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.RejectGroupAdminRequestAsync(
    "1895000000000000000",
    "2244994945",
    new RejectChatGroupAdminRequestRequest()
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the group conversation, starting with `g`.

**userId** `string` *required*

The ID of the user who requested admin permissions.

**body** `RejectChatGroupAdminRequestRequest` *required*

Request payload.

**Returns:** `Task<RejectChatGroupAdminRequestResponse>`

***

## `RejectGroupJoinRequestsAsync`

POST `/2/chat/conversations/{id}/join_requests/reject`

**Reject Join Requests for a Chat Group Conversation**

Rejects pending requests to join an encrypted Chat group conversation. Only group admins can reject requests. To approve a request instead, add the requesting users with addChatGroupMembers; adding a user clears their pending request.

```csharp theme={null}
using System;
using System.Collections.Generic;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.RejectGroupJoinRequestsAsync(
    "1895000000000000000",
    new RejectChatGroupJoinRequestsRequest { UserIds = new List<string> { "2244994945" } }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the group conversation, starting with `g`.

**body** `RejectChatGroupJoinRequestsRequest` *required*

Request payload.

**Returns:** `Task<RejectChatGroupJoinRequestsResponse>`

***

## `RemoveGroupAdminsAsync`

POST `/2/chat/conversations/{id}/admins/remove`

**Remove Admins from a Chat Group Conversation**

Revokes admin rights from one or more admins of an existing encrypted Chat group conversation. They stay members of the group.

```csharp theme={null}
using System;
using System.Collections.Generic;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.RemoveGroupAdminsAsync(
    "1895000000000000000",
    new RemoveChatGroupAdminsRequest { UserIds = new List<string> { "2244994945" } }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the group conversation, starting with `g`.

**body** `RemoveChatGroupAdminsRequest` *required*

Request payload.

**Returns:** `Task<RemoveChatGroupAdminsResponse>`

***

## `RemoveGroupMembersAsync`

POST `/2/chat/conversations/{id}/members/remove`

**Remove Members from a Chat Group Conversation**

Removes one or more members from an existing encrypted Chat group conversation. To leave a group, pass your own user ID. Leaving does not delete the conversation for the caller. When the removal rotates the conversation key, send group\_key\_rotation\_data and the action signatures for the removal and the key change, in that order.

```csharp theme={null}
using System;
using System.Collections.Generic;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.RemoveGroupMembersAsync(
    "1895000000000000000",
    new RemoveChatGroupMembersRequest { UserIds = new List<string> { "2244994945" } }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**body** `RemoveChatGroupMembersRequest` *required*

Request payload.

**Returns:** `Task<RemoveChatGroupMembersResponse>`

***

## `SendMessageAsync`

POST `/2/chat/conversations/{id}/messages`

**Send Chat Message**

Sends a message or reaction to a Chat conversation, which you can find with `participant_query` on Get Chat Conversations. Send it end-to-end encrypted by default: `encoded_message_create_event`, built with the Chat XDK. Plaintext `content` is only a fallback for a 1:1 chat that X Chat can't encrypt: use it only when the recipient's `receives_your_chat` user field (`user.fields=receives_your_chat`) is `unencrypted`. When `content` is refused, nothing is sent and the problem's `detail` says why; HTTP 400 [https://api.x.com/2/problems/encryption-required](https://api.x.com/2/problems/encryption-required) means the chat can be encrypted or is a group, so send it encrypted instead. A recipient you can't message (closed inbox, system account, or a block) returns HTTP 403 [https://api.x.com/2/problems/recipient-not-messageable](https://api.x.com/2/problems/recipient-not-messageable).

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.SendMessageAsync(
    "1895000000000000000",
    new SendChatMessageRequest { MessageId = "1895000000000000000" }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

A conversation's id from Get Chat Conversations, or the recipient's user ID for a 1:1 chat.

**body** `SendChatMessageRequest` *required*

At least one of `encoded_message_create_event`, `content` is required.

**Returns:** `Task<SendChatMessageResponse>`

***

## `SendTypingIndicatorAsync`

POST `/2/chat/conversations/{id}/typing`

**Send Typing Indicator**

Sends a typing indicator to a specific Chat conversation on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.SendTypingIndicatorAsync("1895000000000000000");
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**Returns:** `Task<SendChatTypingIndicatorResponse>`

***

## `UnarchiveConversationAsync`

DELETE `/2/chat/conversations/{id}/archive`

**Unarchive a Chat Conversation**

Unarchives a Chat conversation for the authenticated user only. Unarchiving a conversation that is not archived changes nothing. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.UnarchiveConversationAsync("1895000000000000000", new UnarchiveChatConversationRequest());
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen.

**body** `UnarchiveChatConversationRequest` *required*

Request payload.

**Returns:** `Task<UnarchiveChatConversationResponse>`

***

## `UnmuteConversationAsync`

DELETE `/2/chat/conversations/{id}/mute`

**Unmute a Chat Conversation**

Unmutes notifications for a Chat conversation for the authenticated user only. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.UnmuteConversationAsync("1895000000000000000", new UnmuteChatConversationRequest());
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen.

**body** `UnmuteChatConversationRequest` *required*

Request payload.

**Returns:** `Task<UnmuteChatConversationResponse>`

***

## `UpdateConversationMessageTtlAsync`

PUT `/2/chat/conversations/{id}/message_ttl`

**Turn On Disappearing Messages in a Chat Conversation**

Sets how long new messages in a 1:1 or group Chat conversation last before they disappear, for every participant. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.UpdateConversationMessageTtlAsync(
    "1895000000000000000",
    new UpdateChatConversationMessageTtlRequest { MessageTtlMs = "example" }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen.

**body** `UpdateChatConversationMessageTtlRequest` *required*

Request payload.

**Returns:** `Task<UpdateChatConversationMessageTtlResponse>`

***

## `UpdateConversationScreenCaptureAsync`

PUT `/2/chat/conversations/{id}/screen_capture`

**Update Screen Capture Settings for a Chat Conversation**

Turns screenshot blocking or screenshot detection on or off in a Chat conversation, for every participant. In a group conversation, only admins can change these settings. Each request changes one setting: send either blocking or detection. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.UpdateConversationScreenCaptureAsync(
    "1895000000000000000",
    new UpdateChatConversationScreenCaptureRequest { Blocking = true }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen.

**body** `UpdateChatConversationScreenCaptureRequest` *required*

At least one of `blocking`, `detection` is required.

**Returns:** `Task<UpdateChatConversationScreenCaptureResponse>`

***

## `UpdateGroupAsync`

PUT `/2/chat/conversations/{id}`

**Update a Chat Group Conversation**

Renames an encrypted Chat group conversation, changes its avatar, or sets its description. The client encrypts each value with the conversation key and lists the values it changed in modified\_fields.

```csharp theme={null}
using System;
using System.Collections.Generic;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.UpdateGroupAsync(
    "1895000000000000000",
    new UpdateChatGroupRequest { ModifiedFields = new List<string> { "group_name" }, ConversationKeyVersion = "example" }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the group conversation, starting with `g`.

**body** `UpdateChatGroupRequest` *required*

Request payload.

**Returns:** `Task<UpdateChatGroupResponse>`

***

## `UpdateGroupAdminSettingsAsync`

PUT `/2/chat/conversations/{id}/admin_settings`

**Update the Admin-Only Settings of a Chat Group Conversation**

Sets which actions only admins can perform in an existing encrypted Chat group conversation. A setting set to true restricts that action to admins, and false opens it to all members. Setting `send_message` to true makes the group announcement-only. Omitted settings keep their stored value. When sending `action_signatures`, sign over the full merged settings: the stored values with this request's changes applied, not only the settings in the request.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.UpdateGroupAdminSettingsAsync("1895000000000000000", new UpdateChatGroupAdminSettingsRequest());
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

The ID of the group conversation, starting with `g`.

**body** `UpdateChatGroupAdminSettingsRequest` *required*

At least one of `add_member`, `edit_group_info`, `send_message`, `start_call`, `edit_message_ttl`, `block_screen_capture` is required.

**Returns:** `Task<UpdateChatGroupAdminSettingsResponse>`

***

## `UpdateSettingsAsync`

PUT `/2/chat/settings`

**Update Chat Settings**

Updates the authenticated user's Chat privacy settings: who can message them, read receipts, the message quality filter, and audio/video call permissions. allow\_dms\_from, dm\_receipt\_settings, and dm\_quality\_filter accept only their listed values, matched exactly and case-sensitively; anything else is a 400. av\_settings must set at least one of its settings. Whether settings omitted from a partial av\_settings keep their values or are reset is not yet confirmed; send every av\_settings field you want to keep.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Chat.UpdateSettingsAsync(new UpdateChatSettingsRequest { AllowDmsFrom = "all" });
Console.WriteLine(response);
```

### Parameters

**body** `UpdateChatSettingsRequest` *required*

At least one of `allow_dms_from`, `always_allow_dms_from_subscribers`, `dm_quality_filter`, `dm_receipt_settings`, `av_settings` is required.

**Returns:** `Task<UpdateChatSettingsResponse>`

***
