> ## 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 Python SDK

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

Common fields on every call:

| Field            | Type     | Required | Description     |
| ---------------- | -------- | -------- | --------------- |
| `instance_id`    | `string` | Yes      | Instance ID.    |
| `instance_token` | `string` | Yes      | Instance token. |

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

## `client.groups.list(...)`

Lists groups with pagination.

```python theme={null}
groups = client.groups.list(
    instance_id="VZ...",
    instance_token="instance-token",
    page=1,
    page_size=20,
)
print(groups)
```

**Return:** envelope `{ code, success, data.groups[] }` with pagination when applicable.

## `client.groups.get(...)`

Gets group metadata.

```python theme={null}
group = client.groups.get(
    instance_id="VZ...",
    instance_token="instance-token",
    group_id="120363012345678901@g.us",
)
print(group)
```

**Return:** envelope `{ code, success, data }` with group metadata (`jid`, `name`, `topic`, participants, etc.).

## `client.groups.invite_link(...)`

Gets or resets the invite link.

```python theme={null}
invite = client.groups.invite_link(
    instance_id="VZ...",
    instance_token="instance-token",
    group_id="120363012345678901@g.us",
    reset=False,
)
print(invite)
```

**Return:** envelope `{ code, success, data.invite_link }`.

With reset:

```python theme={null}
new_invite = client.groups.invite_link(
    instance_id="VZ...",
    instance_token="instance-token",
    group_id="120363012345678901@g.us",
    reset=True,
)
```

## `client.groups.set_photo(...)`

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

```python theme={null}
client.groups.set_photo(
    instance_id="VZ...",
    instance_token="instance-token",
    group_id="120363012345678901@g.us",
    image="https://cdn.example.com/groups/photo.jpg",
)
```

**Return:** envelope `{ code, success, data.details }` confirming the change.

## `client.groups.set_name(...)`

Changes the group name.

```python theme={null}
client.groups.set_name(
    instance_id="VZ...",
    instance_token="instance-token",
    group_id="120363012345678901@g.us",
    name="VIP Support",
)
```

**Return:** envelope `{ code, success, data.details }` confirming the change.

## `client.groups.set_description(...)`

Changes the group description.

```python theme={null}
client.groups.set_description(
    instance_id="VZ...",
    instance_token="instance-token",
    group_id="120363012345678901@g.us",
    description="Official support channel",
)
```

**Return:** envelope `{ code, success, data.details }` confirming the change.

## `client.groups.set_settings(...)`

Changes group settings.

```python theme={null}
client.groups.set_settings(
    instance_id="VZ...",
    instance_token="instance-token",
    group_id="120363012345678901@g.us",
    admin_only_message=True,
    admin_only_settings=False,
    delay_message=0,
)
```

**Return:** envelope `{ code, success, data.details }` confirming the change.

## `client.groups.create(...)`

Creates a group with participants.

```python theme={null}
client.groups.create(
    instance_id="VZ...",
    instance_token="instance-token",
    group_name="VIP Support",
    group_description="Support channel",
    group_image="https://cdn.example.com/groups/photo.jpg",
    participants=["5511999999999", "5511888888888"],
)
```

**Return:** envelope `{ code, success, data }` with created group fields.

## `client.groups.add_admin(...)`

Promotes participants to admin.

```python theme={null}
client.groups.add_admin(
    instance_id="VZ...",
    instance_token="instance-token",
    group_id="120363012345678901@g.us",
    participants=["5511999999999"],
)
```

**Return:** envelope `{ code, success, data.details }` confirming the change.

## `client.groups.remove_admin(...)`

Removes admins from the group.

```python theme={null}
client.groups.remove_admin(
    instance_id="VZ...",
    instance_token="instance-token",
    group_id="120363012345678901@g.us",
    participants=["5511999999999"],
)
```

**Return:** envelope `{ code, success, data.details }` confirming the change.
