# List group join / leave events

`GET https://app.whatsetter.com/api/v1/groups/{id}/events`

Membership audit log of one group (joins and leaves), newest first,
as observed from live WhatsApp events and sync passes. Filter by
`type`, `since`, `until`. Requires scope `groups:read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes |  |
| `type` | query | join \| leave | no |  |
| `since` | query | string | no | ISO-8601 — only events at or after this instant. |
| `until` | query | string | no | ISO-8601 — only events at or before this instant. |
| `limit` | query | integer | no |  |
| `cursor` | query | string | no | Opaque cursor from the previous page's `pagination.next_cursor`. |

## Example request

```bash
curl --request GET \
  --url 'https://app.whatsetter.com/api/v1/groups/{id}/events' \
  --header 'Authorization: Bearer ws_live_…'
```

## Responses

### 200: Page of events

```json
{
  "data": [
    {
      "id": "",
      "type": "join",
      "phone": "",
      "name": "",
      "occurred_at": "",
      "source": "event",
      "actor_phone": ""
    }
  ],
  "pagination": {
    "has_more": false,
    "next_cursor": ""
  }
}
```

### 401: Missing, unknown or revoked API key

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```

### 404: Resource not found in this workspace

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```

### 422: Invalid parameter or body (also an invalid or expired `cursor`)

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```


Source: https://docs.whatsetter.com/api-reference/operations/listgroupevents/
