# List groups

> The WhatsApp and iMessage group chats of a workspace.

Source: https://docs.mycrmsim.com/docs/groups/list-groups

```http
GET https://backend.mysmsgateway.app/api/v1/ext/groups
```

- Category: myCRMSIM Conversations / Group Chats
- Auth: Bearer access token
- Scope: `groups.read`

A group's `id` is the key its messages are stored under (`conversation_messages.phone`): a WhatsApp group JID or an iMessage group key. WhatsApp groups come from *Sync groups*; iMessage groups from the Mac's own chats (sync) or *Create iMessage group*. `crm_bridged` groups appear in the connected CRM as a contact with `crm_phone`. Inactive groups (left, or no longer on the line) are left out unless `include_inactive=1`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | query | number | yes | A workspace of the installer. Example: `7` |
| `channel` | query | enum | no | One channel only. One of: `whatsapp`, `imessage`. |
| `include_inactive` | query | boolean | no | 1 = include groups that were left or retired. |

## Response 200

OK

```json
{
  "success": true,
  "data": [
    {
      "id": "120363000000000001@g.us",
      "channel": "whatsapp",
      "workspace_id": 7,
      "name": "Builders",
      "participant_count": 12,
      "is_active": true,
      "crm_bridged": false,
      "crm_phone": null,
      "last_synced_at": "2026-11-04T00:10:00.000Z",
      "created_at": "2026-10-01T00:00:00.000Z",
      "updated_at": "2026-11-04T00:10:00.000Z",
      "line_number": "+61400000099"
    },
    {
      "id": "imsg_group:7",
      "channel": "imessage",
      "workspace_id": 7,
      "name": "Family",
      "participant_count": 2,
      "is_active": true,
      "crm_bridged": true,
      "crm_phone": "+881700000007",
      "last_synced_at": null,
      "created_at": "2026-10-20T00:00:00.000Z",
      "updated_at": "2026-11-04T00:00:00.000Z",
      "status": "active",
      "source": "dashboard",
      "device_id": "A1B2C3D4-MAC",
      "participants": [
        {
          "handle": "+61412345678",
          "name": "Ann Lee"
        },
        {
          "handle": "bob@icloud.com",
          "name": "Bob"
        }
      ],
      "last_message_at": "2026-11-03T09:00:00.000Z"
    }
  ]
}
```

## Response 400

No workspace_id

```json
{
  "success": false,
  "message": "workspace_id is required."
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): groups.read. This integration was granted: …"
}
```

## Response 404

Workspace does not exist or is not the installer's (same response for both)

```json
{
  "success": false,
  "message": "Workspace not found or not accessible to this token"
}
```
