# Create iMessage group

> Draft an iMessage group from contacts.

Source: https://docs.mycrmsim.com/docs/groups/create-imessage-group

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

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

The chat does not exist in Messages yet: the group is `pending_create` and the Mac creates it when the first message is sent to it (*Send to group*). Each contact's phone, or its email when it has none, becomes a participant; a contact with neither is refused. The same participants on the same Mac twice returns the existing group (**200**). Needs an iMessage device connected to the workspace.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | body | number | yes | A workspace of the installer. Example: `7` |
| `contact_ids` | body | array<number> | yes | At least 2 contacts of the workspace. Example: `[1234, 1235]` |
| `name` | body | string | no | The group name (up to 255 characters). Example: `Family` |
| `device_id` | body | string | no | The Mac to create it on. Default: the workspace's default Mac. |

## Request body

```json
{
  "workspace_id": 7,
  "contact_ids": [
    1234,
    1235
  ],
  "name": "Family"
}
```

## Response 201

Created (pending the first message)

```json
{
  "success": true,
  "message": "Group created — send the first message to start it in Messages",
  "data": {
    "id": "imsg_group:10",
    "channel": "imessage",
    "workspace_id": 7,
    "name": "Family",
    "participant_count": 2,
    "is_active": true,
    "crm_bridged": false,
    "crm_phone": null,
    "last_synced_at": null,
    "created_at": "2026-10-20T00:00:00.000Z",
    "updated_at": "2026-11-04T00:00:00.000Z",
    "status": "pending_create",
    "source": "dashboard",
    "device_id": "A1B2C3D4-MAC",
    "participants": [
      {
        "handle": "+61412345678",
        "name": "Ann Lee"
      },
      {
        "handle": "bob@icloud.com",
        "name": "Bob"
      }
    ],
    "last_message_at": null
  }
}
```

## Response 200

A group with these participants already exists on that Mac

```json
{
  "success": true,
  "message": "A group with these participants already exists",
  "data": {
    "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

Fewer than 2 contacts, a contact with no handle, or no Mac

```json
{
  "success": false,
  "message": "No iMessage device is connected to this workspace"
}
```

## 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

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"
}
```
