# Send to group

> Send a message to a group chat.

Source: https://docs.mycrmsim.com/docs/groups/send-group-message

```http
POST https://backend.mysmsgateway.app/api/v1/ext/groups/{channel}/{id}/messages
```

- Category: myCRMSIM Conversations / Group Chats
- Auth: Bearer access token
- Scope: `groups.write`
- Limits: One attachment per message, 5 MB.

The same send pipeline as *Send message*, with the group as the thread: the message is stored on the group's conversation and delivered by the line the group is on (the WhatsApp line, or the group's Mac). A `pending_create` iMessage group is created in Messages by this first send. One attachment (an https URL, up to 5 MB) per message. Delivery is asynchronous: the row starts `pending`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `channel` | path | enum | yes | The group's channel. One of: `whatsapp`, `imessage`. Example: `imessage` |
| `id` | path | string | yes | The group id: a WhatsApp group JID (…@g.us) or an iMessage group key (imsg_group:<n>). Example: `imsg_group:7` |
| `message` | body | string | no | The text. Required when there is no attachment. Example: `Meeting moved to 3pm.` |
| `attachments` | body | string | no | One https URL (image, video, audio or document). Example: `https://cdn.example.com/agenda.pdf` |

## Request body

```json
{
  "message": "Meeting moved to 3pm."
}
```

## Response 200

Queued

```json
{
  "success": true,
  "message": "Message queued for delivery.",
  "data": {
    "id": 84290,
    "status": "pending",
    "message_id": "84290",
    "group_id": "imsg_group:7",
    "channel": "imessage",
    "queued_at": "2026-11-04T05:00:00.000Z"
  }
}
```

## Response 400

Nothing to send, or a bad attachment

```json
{
  "success": false,
  "message": "message or attachments 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.write. This integration was granted: …"
}
```

## Response 404

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

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

## Response 409

The group was left or retired

```json
{
  "success": false,
  "code": "group_inactive",
  "message": "This group is no longer active."
}
```

## Response 502

The gateway refused the message; the attempt is recorded as failed

```json
{
  "success": false,
  "message": "No WhatsApp line is connected to this workspace.",
  "data": {
    "id": 84290,
    "status": "failed"
  }
}
```
