group

create group

Creates a new group with specified name and participants

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

Path parameters

idinteger required

Instance ID of the client

Request body

groupNamestring required

Name of the group to be created

groupParticipantsstring[] 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.

Example request

{
  "groupName": "My Group Name",
  "groupParticipants": [
    "123456789@c.us",
    "123456789012345@lid"
  ]
}

Response

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

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.

Example response

{
  "status": "success",
  "data": {
    "status": "success",
    "data": {
      "title": "My Group Name",
      "gid": {
        "server": "g.us",
        "user": "123456789123456789",
        "_serialized": "123456789123456789@g.us"
      },
      "participants": {
        "123456789@c.us": {
          "statusCode": 200,
          "message": "The participant was added successfully",
          "isGroupCreator": false,
          "isInviteV4Sent": false
        }
      }
    }
  },
  "links": {
    "self": "https://waapi.app/api/v1/instances/1/client/action/create-group"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.