> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Group

> Create a new WhatsApp group with participants, description, picture, and initial permissions

**Auth:** `TokenAccount` or `TokenInstance` • **Rate-limit:** `Global` (100/min) • **Idempotent:** no

## Description

Creates a WhatsApp group and optionally links it to an existing community (`communityJid`). You can set the name, description, picture, and initial permissions (`groupSettings`) in the same call. The picture and description are applied in subsequent calls after the group is created.

## Examples

### Minimum

Creates a "Dev Team" group with 2 initial participants (`5511999999999`, `5521988888888`), with no description, picture, community, or custom permissions.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/group/create/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Dev Team",
      "participants": ["5511999999999", "5521988888888"]
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/group/create/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      name:         "Dev Team",
      participants: ["5511999999999", "5521988888888"]
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/group/create/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "name":         "Dev Team",
          "participants": ["5511999999999", "5521988888888"]
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "name": "Dev Team",
          "participants": ["5511999999999", "5521988888888"]
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/group/create/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### With description and picture

Creates the group with the description "Technical discussions" and a picture from a public URL. Description and image are applied in subsequent calls after the group is created.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/group/create/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Dev Team",
      "description": "Technical discussions",
      "image": "https://example.com/logo.png",
      "participants": ["5511999999999", "5521988888888"]
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/group/create/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      name:         "Dev Team",
      description:  "Technical discussions",
      image:        "https://example.com/logo.png",
      participants: ["5511999999999", "5521988888888"]
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/group/create/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "name":         "Dev Team",
          "description":  "Technical discussions",
          "image":        "https://example.com/logo.png",
          "participants": ["5511999999999", "5521988888888"]
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "name": "Dev Team",
          "description": "Technical discussions",
          "image": "https://example.com/logo.png",
          "participants": ["5511999999999", "5521988888888"]
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/group/create/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### With permissions

Creates an "Announcements" group with initial restrictions: only admins can send messages (`membersCanSendMessages: false`) and new joins require approval (`requireAdminApproval: true`).

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/group/create/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Announcements",
      "participants": ["5511999999999"],
      "groupSettings": {
        "membersCanSendMessages": false,
        "requireAdminApproval": true
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/group/create/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      name:         "Announcements",
      participants: ["5511999999999"],
      groupSettings: {
        membersCanSendMessages: false,
        requireAdminApproval:   true
      }
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/group/create/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "name":         "Announcements",
          "participants": ["5511999999999"],
          "groupSettings": {
              "membersCanSendMessages": False,
              "requireAdminApproval":   True
          }
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "name": "Announcements",
          "participants": ["5511999999999"],
          "groupSettings": {
              "membersCanSendMessages": false,
              "requireAdminApproval": true
          }
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/group/create/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### Linked to a community

Creates the "General Subgroup" already linked to the community `120363406289005073@g.us` via `communityJid`, avoiding the extra step of calling `/community/link` after creation.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/group/create/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "General Subgroup",
      "participants": ["5511999999999"],
      "communityJid": "120363406289005073@g.us"
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/group/create/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      name:         "General Subgroup",
      participants: ["5511999999999"],
      communityJid: "120363406289005073@g.us"
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/group/create/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "name":         "General Subgroup",
          "participants": ["5511999999999"],
          "communityJid": "120363406289005073@g.us"
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "name": "General Subgroup",
          "participants": ["5511999999999"],
          "communityJid": "120363406289005073@g.us"
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/group/create/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

## Success response

The response includes the freshly created `group.jid` (use it as the `identifier` in subsequent calls), the `inviteCode` and `inviteLink` ready to share, and the `participants` list already flagged with `isAdmin`/`isSuperAdmin`. The creator joins automatically as super-admin. The `groupSettings` fields reflect the initial permissions (defaults or whatever you sent).

```json 200 OK theme={null}
{
  "success": true,
  "message": "Group created successfully",
  "group": {
    "name": "Dev Team",
    "jid": "120363406289005073@g.us",
    "description": "Technical discussions",
    "inviteCode": "ABC123XYZ",
    "inviteLink": "https://chat.whatsapp.com/ABC123XYZ",
    "createdBy": "5511999999999@s.whatsapp.net",
    "participantCount": 3,
    "participants": [
      { "jid": "5511999999999@s.whatsapp.net", "isAdmin": true, "isSuperAdmin": false }
    ],
    "groupSettings": {
      "membersCanEditInfo": true,
      "membersCanSendMessages": true,
      "membersCanAddOthers": false,
      "requireAdminApproval": false
    },
    "isCommunity": false,
    "isParent": false,
    "linkedParentJid": null
  }
}
```

## Path parameters

<ParamField path="instance" type="string" required>
  Instance name (e.g., `$Instance_Name`).
</ParamField>

## Headers

<ParamField header="token" type="string" required>
  `TokenAccount` or `TokenInstance`.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `application/json`
</ParamField>

## Request body

<ParamField body="name" type="string" required>
  Group name. Max **25 characters**.
</ParamField>

<ParamField body="participants" type="string[]" required>
  List of numbers (`5511999999999`) or JIDs (`5511999999999@s.whatsapp.net`). At least **1** item.
</ParamField>

<ParamField body="description" type="string">
  Group description (topic). Applied via `SetGroupTopic` after creation.
</ParamField>

<ParamField body="image" type="string">
  Public URL or base64 data URI. The image is converted to JPEG.
</ParamField>

<ParamField body="communityJid" type="string">
  Creates the group already linked to a community (parent group).
</ParamField>

<ParamField body="groupSettings" type="object">
  Initial permissions. Subfields: `membersCanEditInfo`, `membersCanSendMessages`, `membersCanAddOthers`, `requireAdminApproval`.
</ParamField>

## Notes

<Note>
  * The group creator joins automatically as **super-admin**.
  * Invalid numbers (not registered on WhatsApp) are rejected; the error indicates which participant failed.
  * If `image` is provided and the upload fails, group creation continues normally, the image error is not fatal on this route. Use [`PUT /update`](/en/api/groups/update) to reapply the picture.
</Note>

## Errors

| HTTP | Message                                                 |
| ---- | ------------------------------------------------------- |
| 400  | `The 'name' field is required`                          |
| 400  | `At least one participant is required`                  |
| 400  | `group name must be 25 characters or less`              |
| 400  | `invalid participant <number>: <reason>`                |
| 400  | `Instance is not connected to WhatsApp`                 |
| 429  | `rate limit exceeded (429): wait before creating again` |

Envelope:

```json theme={null}
{
  "success": false,
  "error": { "message": "The 'name' field is required" }
}
```
