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

# Groups

> List, create, and manage WhatsApp groups with the .NET SDK

Use `client.Groups` for WhatsApp group operations on an instance.

Common fields on every call:

| Field           | Type     | Required | Description     |
| --------------- | -------- | -------- | --------------- |
| `InstanceId`    | `string` | Yes      | Instance ID.    |
| `InstanceToken` | `string` | Yes      | Instance token. |

Group-specific operations also require `GroupId` in the payload.

## `client.Groups.ListAsync<TResponse>(request)`

Lists groups with pagination.

```csharp theme={null}
var groups = await client.Groups.ListAsync<object>(new GroupListRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    Page = 1,
    PageSize = 20,
});

Console.WriteLine(groups);
```

**Return:** envelope `{ Code, Success, Data.Groups[] }` with pagination when applicable.

## `client.Groups.GetAsync<TResponse>(request)`

Gets group metadata.

```csharp theme={null}
var group = await client.Groups.GetAsync<object>(new GroupInfoRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    GroupId = "120363012345678901@g.us",
});

Console.WriteLine(group);
```

**Return:** envelope `{ Code, Success, Data }` with group metadata (`Jid`, `Name`, `Topic`, participants, etc.).

## `client.Groups.InviteLinkAsync<TResponse>(request)`

Gets or resets the invite link.

```csharp theme={null}
var invite = await client.Groups.InviteLinkAsync<object>(new GroupInviteLinkRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    GroupId = "120363012345678901@g.us",
    Reset = false,
});

Console.WriteLine(invite);
```

**Return:** envelope `{ Code, Success, Data.InviteLink }`.

With reset:

```csharp theme={null}
var newInvite = await client.Groups.InviteLinkAsync<object>(new GroupInviteLinkRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    GroupId = "120363012345678901@g.us",
    Reset = true,
});
```

## `client.Groups.SetPhotoAsync<TResponse>(request)`

Changes the group photo. Accepts a public URL or base64 data URL.

```csharp theme={null}
await client.Groups.SetPhotoAsync<object>(new GroupMutationRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    GroupId = "120363012345678901@g.us",
    Image = "https://cdn.example.com/groups/photo.jpg",
});
```

**Return:** envelope `{ Code, Success, Data.Details }` confirming the change.

## `client.Groups.SetNameAsync<TResponse>(request)`

Changes the group name.

```csharp theme={null}
await client.Groups.SetNameAsync<object>(new GroupMutationRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    GroupId = "120363012345678901@g.us",
    Name = "VIP Support",
});
```

**Return:** envelope `{ Code, Success, Data.Details }` confirming the change.

## `client.Groups.SetDescriptionAsync<TResponse>(request)`

Changes the group description.

```csharp theme={null}
await client.Groups.SetDescriptionAsync<object>(new GroupMutationRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    GroupId = "120363012345678901@g.us",
    Description = "Official support channel",
});
```

**Return:** envelope `{ Code, Success, Data.Details }` confirming the change.

## `client.Groups.SetSettingsAsync<TResponse>(request)`

Changes group settings.

```csharp theme={null}
await client.Groups.SetSettingsAsync<object>(new GroupMutationRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    GroupId = "120363012345678901@g.us",
    AdminOnlyMessage = true,
    AdminOnlySettings = false,
    DelayMessage = 0,
});
```

**Return:** envelope `{ Code, Success, Data.Details }` confirming the change.

## `client.Groups.CreateAsync<TResponse>(request)`

Creates a group with participants.

```csharp theme={null}
await client.Groups.CreateAsync<object>(new GroupMutationRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    GroupName = "VIP Support",
    GroupDescription = "Support channel",
    GroupImage = "https://cdn.example.com/groups/photo.jpg",
    Participants = new[] { "5511999999999", "5511888888888" },
});
```

**Return:** envelope `{ Code, Success, Data }` with created group fields.

## `client.Groups.AddAdminAsync<TResponse>(request)`

Promotes participants to admin.

```csharp theme={null}
await client.Groups.AddAdminAsync<object>(new GroupMutationRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    GroupId = "120363012345678901@g.us",
    Participants = new[] { "5511999999999" },
});
```

**Return:** envelope `{ Code, Success, Data.Details }` confirming the change.

## `client.Groups.RemoveAdminAsync<TResponse>(request)`

Removes admins from the group.

```csharp theme={null}
await client.Groups.RemoveAdminAsync<object>(new GroupMutationRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    GroupId = "120363012345678901@g.us",
    Participants = new[] { "5511999999999" },
});
```

**Return:** envelope `{ Code, Success, Data.Details }` confirming the change.
