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

# Grup Yönetimi

> Gruplar oluşturun, katılımcıları ve yöneticileri yönetin, katılma isteklerini işleyin, ayarları değiştirin ve gruplara mesaj gönderin.

Tüm grup yolları cihaza özeldir: `X-Device-Id` gönderin. Grup kimlikleri, `120363025246125486@g.us` gibi `@g.us` ile biten JID'lerdir. Yönetici işlemleri için hesabın grup yöneticisi olması gerekir.

```bash theme={null}
export GOWA=http://localhost:3000 AUTH=admin:changeme DEVICE=my-device
```

## Oluşturma ve inceleme

```bash theme={null}
# create (participants: numbers or JIDs)
curl -u $AUTH -X POST $GOWA/group -H "X-Device-Id: $DEVICE" \
  -H "Content-Type: application/json" \
  -d '{"title": "Project Team", "participants": ["628111111111", "628222222222"]}'

# info and participants
curl -u $AUTH -H "X-Device-Id: $DEVICE" "$GOWA/group/info?group_id=120363025246125486@g.us"
curl -u $AUTH -H "X-Device-Id: $DEVICE" "$GOWA/group/participants?group_id=120363025246125486@g.us"

# participants as CSV
curl -u $AUTH -H "X-Device-Id: $DEVICE" "$GOWA/group/participants/export?group_id=120363025246125486@g.us" -o members.csv

# groups this account is in
curl -u $AUTH -H "X-Device-Id: $DEVICE" $GOWA/user/my/groups
```

## Katılımcılar

Aynı gövde; ekleme, kaldırma, yönetici yapma ve yöneticilikten çıkarma işlemlerinde kullanılabilir:

```bash theme={null}
BODY='{"group_id": "120363025246125486@g.us", "participants": ["628333333333"]}'

curl -u $AUTH -X POST $GOWA/group/participants          -H "X-Device-Id: $DEVICE" -H "Content-Type: application/json" -d "$BODY"  # add
curl -u $AUTH -X POST $GOWA/group/participants/remove   -H "X-Device-Id: $DEVICE" -H "Content-Type: application/json" -d "$BODY"
curl -u $AUTH -X POST $GOWA/group/participants/promote  -H "X-Device-Id: $DEVICE" -H "Content-Type: application/json" -d "$BODY"
curl -u $AUTH -X POST $GOWA/group/participants/demote   -H "X-Device-Id: $DEVICE" -H "Content-Type: application/json" -d "$BODY"
```

WhatsApp, gizlilik ayarları nedeniyle bir kişiyi doğrudan eklemeyi reddedebilir. Bunun yerine kişiye davet bağlantısını gönderin.

## Katılma istekleri

Yönetici onayı gerektiren gruplar için:

```bash theme={null}
curl -u $AUTH -H "X-Device-Id: $DEVICE" \
  "$GOWA/group/participant-requests?group_id=120363025246125486@g.us"

curl -u $AUTH -X POST $GOWA/group/participant-requests/approve \
  -H "X-Device-Id: $DEVICE" -H "Content-Type: application/json" \
  -d '{"group_id": "120363025246125486@g.us", "participants": ["628444444444"]}'
# reject: /group/participant-requests/reject with the same body
```

## Ayarlar

| Ayar | Uç nokta | Gövde |
| - | - | - |
| Ad | `POST /group/name` | `{"group_id": "...", "name": "New name"}` |
| Açıklama | `POST /group/topic` | `{"group_id": "...", "topic": "About this group"}` (boş bırakılırsa kaldırılır) |
| Fotoğraf | `POST /group/photo` | multipart: `group_id`, `photo` (kaldırmak için `photo` alanını göndermeyin) |
| Bilgileri yalnızca yöneticiler düzenleyebilir | `POST /group/locked` | `{"group_id": "...", "locked": true}` |
| Yalnızca yöneticiler mesaj gönderebilir | `POST /group/announce` | `{"group_id": "...", "announce": true}` |

```bash theme={null}
curl -u $AUTH -X POST $GOWA/group/announce -H "X-Device-Id: $DEVICE" \
  -H "Content-Type: application/json" \
  -d '{"group_id": "120363025246125486@g.us", "announce": true}'
```

## Davet bağlantıları

```bash theme={null}
# get the link (reset=true revokes the old one and creates a new one)
curl -u $AUTH -H "X-Device-Id: $DEVICE" \
  "$GOWA/group/invite-link?group_id=120363025246125486@g.us&reset=false"

# preview a group from a link without joining
curl -u $AUTH -H "X-Device-Id: $DEVICE" \
  "$GOWA/group/info-from-link?link=https://chat.whatsapp.com/AbCdEfGhIjKl"

# join
curl -u $AUTH -X POST $GOWA/group/join-with-link -H "X-Device-Id: $DEVICE" \
  -H "Content-Type: application/json" -d '{"link": "https://chat.whatsapp.com/AbCdEfGhIjKl"}'

# leave
curl -u $AUTH -X POST $GOWA/group/leave -H "X-Device-Id: $DEVICE" \
  -H "Content-Type: application/json" -d '{"group_id": "120363025246125486@g.us"}'
```

## Bir gruba mesaj gönderme

Herhangi bir `/send/*` uç noktasında `phone` olarak grup JID'sini kullanın. `mentions` ile üyelerden veya `"@everyone"` ile herkesten bahsedin:

```bash theme={null}
curl -u $AUTH -X POST $GOWA/send/message -H "X-Device-Id: $DEVICE" \
  -H "Content-Type: application/json" \
  -d '{"phone": "120363025246125486@g.us", "message": "Standup in 5 minutes", "mentions": ["@everyone"]}'
```

## Grup olayları

`group.participants` (katılma, ayrılma, yönetici yapma, yöneticilikten çıkarma) ve `group.joined` (gruba eklendiniz) webhook'larına abone olun. Yük örneği:

```json theme={null}
{
  "event": "group.participants",
  "device_id": "628123456789@s.whatsapp.net",
  "payload": {"chat_id": "120363025246125486@g.us", "type": "join", "jids": ["628333333333@s.whatsapp.net"]}
}
```


## Related topics

- [Grup bilgileri](https://gowa-docs.mintlify.site/tr/api-reference/group/grup-bilgileri.md)
- [Grup konusunu ayarla](https://gowa-docs.mintlify.site/tr/api-reference/group/grup-konusunu-ayarla.md)
- [Grup Davet Bağlantısı](https://gowa-docs.mintlify.site/tr/api-reference/group/grup-davet-bağlantısı.md)
- [Grup adını ayarla](https://gowa-docs.mintlify.site/tr/api-reference/group/grup-adını-ayarla.md)
- [Grup fotoğrafını ayarla](https://gowa-docs.mintlify.site/tr/api-reference/group/grup-fotoğrafını-ayarla.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.