---
title: "Add Group"
method: POST
path: "/userGroup2"
---

# Add Group

`POST /userGroup2`

Lets you create a new user group. Groups you create will be added to the default loyalty program of the org automatically.

## Request body

- object
  - `externalId` string, required — External ID of the group.
  - `groupName` string — Name of the group. The maximum allowed number of characters is 50.
  - `maxGroupSize` integer, required — Maximum size (members) of the group.
  - `extendedFields` string[] — Array containing the extended fields and their values. **Note**: Extended fields are supported only for the `usergroup2` entity.

## Response `200`

200

- union
  - object
    - `entity` integer
    - `warnings` unknown[]
      - unknown
  - object
    - `entity` integer
    - `warnings` unknown[]
      - unknown

## Other responses

- `400` — 400

---

[API](https://skmtc.net/capillarytech/apis/sample-api.md) · [All operations](https://skmtc.net/capillarytech/apis/sample-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/capillarytech/sample-api/revisions/de241f2ed9b3/schema)
