---
title: "POST /CreateGroup"
method: POST
path: "/CreateGroup"
---

# POST /CreateGroup

`POST /CreateGroup`

Creates a group resource with a name and a filter expression.

## Request body

- object
  - `GroupName` string, required — The case-sensitive name of the new group. Default is a reserved name and names must be unique.
  - `FilterExpression` string — The filter expression defining criteria by which to group traces.
  - `InsightsConfiguration` object — The structure containing configurations related to insights.
    - `InsightsEnabled` boolean — Set the InsightsEnabled value to true to enable insights or false to disable insights.
    - `NotificationsEnabled` boolean — Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.
  - `Tags` Tag[] — <p>A map that contains one or more tag keys and tag values to attach to an X-Ray group. For more information about ways to use tags, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference</i>.</p> <p>The following restrictions apply to tags:</p> <ul> <li> <p>Maximum number of user-applied tags per resource: 50</p> </li> <li> <p>Maximum tag key length: 128 Unicode characters</p> </li> <li> <p>Maximum tag value length: 256 Unicode characters</p> </li> <li> <p>Valid values for key and value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and @</p> </li> <li> <p>Tag keys and values are case sensitive.</p> </li> <li> <p>Don't use <code>aws:</code> as a prefix for keys; it's reserved for Amazon Web Services use.</p> </li> </ul>
    - `Key` string, required — A tag key, such as <code>Stage</code> or <code>Name</code>. A tag key cannot be empty. The key can be a maximum of 128 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: <code>+ - = . _ : /</code>
    - `Value` string, required — An optional tag value, such as <code>Production</code> or <code>test-only</code>. The value can be a maximum of 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: <code>+ - = . _ : /</code>

## Response `200`

Success

- CreateGroupResult
  - `Group` object — The group that was created. Contains the name of the group that was created, the Amazon Resource Name (ARN) of the group that was generated based on the group name, the filter expression, and the insight configuration that was assigned to the group.
    - `GroupName` string — The unique case-sensitive name of the group.
    - `GroupARN` string — The Amazon Resource Name (ARN) of the group generated based on the GroupName.
    - `FilterExpression` string — The filter expression defining the parameters to include traces.
    - `InsightsConfiguration` object — <p>The structure containing configurations related to insights.</p> <ul> <li> <p>The InsightsEnabled boolean can be set to true to enable insights for the group or false to disable insights for the group.</p> </li> <li> <p>The NotificationsEnabled boolean can be set to true to enable insights notifications through Amazon EventBridge for the group.</p> </li> </ul>
      - `InsightsEnabled` boolean — Set the InsightsEnabled value to true to enable insights or false to disable insights.
      - `NotificationsEnabled` boolean — Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.

## Other responses

- `480` — InvalidRequestException
- `481` — ThrottledException

---

[API](https://skmtc.net/aws/apis/xray.md) · [All operations](https://skmtc.net/aws/apis/xray/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/xray/versions/4970909a360e/schema)
