---
title: "create group"
method: POST
path: "/instances/{id}/client/action/create-group"
tags: ["group"]
---

# create group

`POST /instances/{id}/client/action/create-group`

## Request

- Base URL: `https://waapi.app/api/v1`
- URL: `https://waapi.app/api/v1/instances/{id}/client/action/create-group`
- Auth: HTTP bearer

Creates a new group with specified name and participants

## Path parameters

- `id` integer, required

## Request body

- object
  - `groupName` string, required: Name of the group to be created
  - `groupParticipants` string[], required: Participants to add to the group, each as a phone number ID (`<number>@c.us`) or a LID (`<lid>@lid`). A LID is resolved to its phone number before the group is created; one that cannot be resolved is not added and is reported with statusCode 404. A person given more than once (also by number and by LID) is added once.

## Response `200`

Request reached the instance. `data.status` reports whether the action was carried out; on error `data` carries `message` and `explanation`. Payload: Group created successfully.

- object
  - `status` 'success' | 'error': Whether the request reached the instance. `success` here does **not** mean the action was carried out — that is reported by `data.status`, which is the authoritative one. A malformed input arrives as `status: success` with `data.status: error`.
  - `data` union: The action's outcome. `status: success` carries the payload; `status: error` is an `actionError`.
    - object
      - `status` 'success', required: Whether the instance carried the action out — the authoritative field. In this branch it is always `success`; when the instance refused the action the whole `data` object is an `actionError` with `status: error`, `message` and `explanation`.
      - `instanceId` union
        - integer
        - string
      - `data` object
        - `title` string: Name of the created group
        - `gid` object: Group ID details
          - `server` string: group server identifier
          - `user` string: Unique group identifier
          - `_serialized` string: Complete group ID in serialized format
        - `participants` object: Outcome per participant, keyed by the ID passed in groupParticipants; the group creator is included under the instance's own phone number ID. statusCode 200: added. 403: can only be added by private invitation; isInviteV4Sent tells whether one was sent. 404: not registered, or a LID that could not be resolved.
    - ActionError: Shape of `data` when the instance refused the action. HTTP status is still 200 and the outer `status` is still `success`.
      - `status` 'error', required
      - `message` string
      - `explanation` string
      - `instanceId` union
        - integer
        - string
  - `links` object
    - `self` string: API endpoint URL

## Other responses

- `401`: Unauthorized — invalid or missing bearer token
- `403`: Forbidden — insufficient permissions or account blocked
- `404`: Not found — instance does not exist or does not belong to you
- `409`: Conflict — instance is not ready
- `422`: Validation error — invalid or missing request parameters
- `429`: Too many requests — rate limit exceeded

---

[API](https://skmtc.dev/waapi/apis/waapi-api-2.md) · [All operations](https://skmtc.dev/waapi/apis/waapi-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/waapi/apis/waapi-api-2/revisions/490302f75576?raw)
