---
title: 그룹 생성
description: 새 그룹을 생성합니다. 그룹에는 멤버가 포함될 수 있습니다.
breadcrumbs: 문서 > API > 그룹 생성
---

> For the complete documentation index, see [llms.txt](https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/llms.txt).

# 그룹 생성

## v2 (latest)

| Datadog site      | API endpoint                                          |
| ----------------- | ----------------------------------------------------- |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/scim/Groups     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/scim/Groups |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/scim/Groups |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/scim/Groups      |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/scim/Groups |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/scim/Groups |
| uk1.datadoghq.com | POST https://api.uk1.datadoghq.com/api/v2/scim/Groups |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/scim/Groups      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/scim/Groups  |

### Overview

새 그룹을 생성합니다.
그룹에는 멤버가 포함될 수 있습니다.

This endpoint requires all of the following permissions:

- `user_access_invite`
- `user_access_manage`

### Request

#### Body Data (required)

{% tabs %}
{% tab label="Model" %}
| Parent field | Field        | Type      | Description                                                              |
| ------------ | ------------ | --------- | ------------------------------------------------------------------------ |
|              | displayName  | string    | 그룹의 정의입니다.                                                               |
|              | externalId   | string    | An identifier for the resource as defined by the provisioning client.    |
|              | id           | string    | The identifier of the resource. Not required when creating a group.      |
|              | members      | [object]  | Members of the group.                                                    |
| members      | $ref         | string    | The URI corresponding to a SCIM resource that is a member of this group. |
| members      | display      | string    | A human-readable name for the group member.                              |
| members      | type         | string    | A label indicating the type of resource.                                 |
| members      | value        | string    | The identifier of the member of this group.                              |
|              | meta         | object    | Metadata associated with a group.                                        |
| meta         | created      | date-time | The date and time the group was created.                                 |
| meta         | lastModified | date-time | The date and time the group was last changed.                            |
| meta         | location     | string    | URL identifying the resource.                                            |
| meta         | resourceType | string    | Type of resource.                                                        |
|              | schemas      | [string]  | Input JSON Schemas.                                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "displayName": "string",
  "externalId": "string",
  "id": "string",
  "members": [
    {
      "$ref": "https://app.datadoghq.com/api/scim/v2/Users/429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6",
      "display": "John Doe",
      "type": "User",
      "value": "429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6"
    }
  ],
  "meta": {
    "created": "2024-10-17 12:53:35.793883+00:00",
    "lastModified": "2024-10-19 12:53:35.793883+00:00",
    "location": "https://app.datadoghq.com/api/scim/v2/Groups/429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6",
    "resourceType": "Group"
  },
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:Group"
  ]
}
```
{% /tab %}
{% /tabs %}

### Response

{% tabs %}
{% tab label="201" %}
Created

{% tabs %}
{% tab label="Model" %}
Definition of a group.

| Parent field | Field        | Type      | Description                                                              |
| ------------ | ------------ | --------- | ------------------------------------------------------------------------ |
|              | displayName  | string    | A human-readable name for the group.                                     |
|              | externalId   | string    | An identifier for the resource as defined by the provisioning client.    |
|              | id           | string    | The identifier of the resource. Not required when creating a group.      |
|              | members      | [object]  | Members of the group.                                                    |
| members      | $ref         | string    | The URI corresponding to a SCIM resource that is a member of this group. |
| members      | display      | string    | A human-readable name for the group member.                              |
| members      | type         | string    | A label indicating the type of resource.                                 |
| members      | value        | string    | The identifier of the member of this group.                              |
|              | meta         | object    | Metadata associated with a group.                                        |
| meta         | created      | date-time | The date and time the group was created.                                 |
| meta         | lastModified | date-time | The date and time the group was last changed.                            |
| meta         | location     | string    | URL identifying the resource.                                            |
| meta         | resourceType | string    | Type of resource.                                                        |
|              | schemas      | [string]  | Input JSON Schemas.                                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "displayName": "string",
  "externalId": "string",
  "id": "string",
  "members": [
    {
      "$ref": "https://app.datadoghq.com/api/scim/v2/Users/429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6",
      "display": "John Doe",
      "type": "User",
      "value": "429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6"
    }
  ],
  "meta": {
    "created": "2024-10-17 12:53:35.793883+00:00",
    "lastModified": "2024-10-19 12:53:35.793883+00:00",
    "location": "https://app.datadoghq.com/api/scim/v2/Groups/429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6",
    "resourceType": "Group"
  },
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:Group"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="400" %}
Bad Request

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
## default

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/scim/Groups" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "displayName": "Group 1",
  "externalId": "group1",
  "members": [
    {
      "$ref": "https://app.datadoghq.com/api/scim/v2/Users/d34a5f93-5690-4d3f-a293-f2ad5c7a82a4",
      "display": "John Doe",
      "type": "User",
      "value": "d34a5f93-5690-4d3f-a293-f2ad5c7a82a4"
    },
    {
      "$ref": "https://app.datadoghq.com/api/scim/v2/Users/429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6",
      "display": "Jane Doe",
      "type": "User",
      "value": "429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6"
    }
  ],
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:Group"
  ]
}
EOF

## json-request-body

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
export DD_BEARER_TOKEN="<DD_BEARER_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/scim/Groups" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "displayName": "Group 1",
  "externalId": "group1",
  "members": [
    {
      "$ref": "https://app.datadoghq.com/api/scim/v2/Users/d34a5f93-5690-4d3f-a293-f2ad5c7a82a4",
      "display": "John Doe",
      "type": "User",
      "value": "d34a5f93-5690-4d3f-a293-f2ad5c7a82a4"
    },
    {
      "$ref": "https://app.datadoghq.com/api/scim/v2/Users/429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6",
      "display": "Jane Doe",
      "type": "User",
      "value": "429ebce5-8ed3-4da9-9f1e-662f2dbc2fe6"
    }
  ],
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:Group"
  ]
}
EOF
```
{% /tab %}
{% /tabs %}
