---
title: "Create a group"
method: PUT
path: "/groups"
tags: ["Groups"]
---

# Create a group

`PUT /groups`

Create a new group based in provided parameters

## Request body

- GroupNew
  - `source` string, uuid — The id of the group the clone will be based onto. If this parameter if provided, the new group will be a clone of this source. Other value will override values from the source.
  - `category` string, uuid, required — Id of the new group's category
  - `id` string, uuid — Group id, only provide it when needed.
  - `displayName` string, required — Name of the group
  - `description` string — Group description
  - `query` object — The criteria defining the group. If not provided, the group will be empty.
    - `select` string — What kind of data we want to include. Here we can get policy servers/relay by setting `nodeAndPolicyServer`. Only used if `where` is defined.
    - `composition` 'and' | 'or' — Boolean operator to use between each `where` criteria.
    - `where` object[] — List of criteria
      - `objectType` string — Type of the object
      - `attribute` string — Attribute to compare
      - `comparator` string — Comparator to use
      - `value` string — Value to compare against
  - `dynamic` boolean — Should the group be dynamically refreshed (if not, it is a static group)
  - `enabled` boolean — Enable or disable the group
  - `properties` object[] — Group properties
    - `name` string, required — Property name
    - `value` string, string or JSON, required — Property value (can be a string or JSON object)

## Response `200`

Group information

- object
  - `result` 'success' | 'error', required — Result of the request
  - `action` 'createGroup', required — The id of the action
  - `data` object, required
    - `groups` Group[], required
      - `id` string, uuid — Group id
      - `displayName` string — Name of the group
      - `description` string — Group description
      - `query` object — The criteria defining the group
        - `select` string — What kind of data we want to include. Here we can get policy servers/relay by setting `nodeAndPolicyServer`. Only used if `where` is defined.
        - `composition` 'and' | 'or' — Boolean operator to use between each `where` criteria.
        - `where` object[] — List of criteria
          - `objectType` string — Type of the object
          - `attribute` string — Attribute to compare
          - `comparator` string — Comparator to use
          - `value` string — Value to compare against
      - `nodeIds` string[] — List of nodes in the group
      - `dynamic` boolean — Should the group be dynamically refreshed (if not, it is a static group)
      - `enabled` boolean — Enable or disable the group
      - `groupClass` string[]
      - `properties` object[] — Group properties
        - `name` string, required — Property name
        - `value` string, string or JSON, required — Property value (can be a string or JSON object)

---

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