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

# Manage communities

> Create communities, manage subgroups, participants, ownership, and community lifecycle.

## Create a community

```http theme={null}
POST /api/v1/sessions/{sessionId}/communities
Authorization: Bearer <api_key>
Content-Type: application/json
```

```json theme={null}
{
  "subject": "Customer community",
  "description": "Product announcements and support",
  "membershipApprovalMode": "request_required",
  "createGeneralChat": true
}
```

## List subgroups

```http theme={null}
GET /api/v1/sessions/{sessionId}/communities/{communityJid}/subgroups
Authorization: Bearer <api_key>
```

## Link, unlink, or join a subgroup

```http theme={null}
POST /api/v1/sessions/{sessionId}/communities/{communityJid}/subgroups
Authorization: Bearer <api_key>
Content-Type: application/json
```

Link existing groups:

```json theme={null}
{
  "action": "link",
  "subGroupJids": ["120363000000000001@g.us"]
}
```

Unlink groups:

```json theme={null}
{
  "action": "unlink",
  "subGroupJids": ["120363000000000001@g.us"],
  "removeOrphanedMembers": true
}
```

Join a linked subgroup:

```json theme={null}
{
  "action": "join",
  "subGroupJid": "120363000000000001@g.us"
}
```

## List community participants

```http theme={null}
GET /api/v1/sessions/{sessionId}/communities/{communityJid}/participants
Authorization: Bearer <api_key>
```

## Transfer ownership

```http theme={null}
POST /api/v1/sessions/{sessionId}/communities/{communityJid}/ownership
Authorization: Bearer <api_key>
Content-Type: application/json
```

```json theme={null}
{
  "newOwnerJid": "15551234567@s.whatsapp.net"
}
```

## Fetch subgroup suggestions

```http theme={null}
POST /api/v1/sessions/{sessionId}/communities/{communityJid}/subgroup-suggestions
Authorization: Bearer <api_key>
Content-Type: application/json
```

```json theme={null}
{
  "hintSubgroupJid": "120363000000000001@g.us"
}
```

## Deactivate a community

```http theme={null}
DELETE /api/v1/sessions/{sessionId}/communities/{communityJid}
Authorization: Bearer <api_key>
```

## Group support helpers

Check internal-group status:

```http theme={null}
GET /api/v1/sessions/{sessionId}/groups/{groupJid}/internal
Authorization: Bearer <api_key>
```

Submit a suspension appeal:

```http theme={null}
POST /api/v1/sessions/{sessionId}/groups/{groupJid}/suspension-appeal
Authorization: Bearer <api_key>
Content-Type: application/json
```

```json theme={null}
{
  "reason": "This group was suspended incorrectly."
}
```
