---
title: 사용자 생성
description: 새 사용자를 생성합니다. Datadog 역할을 사용자에게 할당하려면 value 필드에 역할 UUID가 포함된 roles 배열을 포함합니다.
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/Users     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/scim/Users |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/scim/Users |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/scim/Users      |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/scim/Users |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/scim/Users |
| uk1.datadoghq.com | POST https://api.uk1.datadoghq.com/api/v2/scim/Users |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/scim/Users      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/scim/Users  |

### Overview

새 사용자를 생성합니다.
Datadog 역할을 사용자에게 할당하려면 `value` 필드에 역할 UUID가 포함된 `roles` 배열을 포함합니다.

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                                                                                                            |
| ------------ | ------------------ | --------- | ---------------------------------------------------------------------------------------------------------------------- |
|              | active             | boolean   | 사용자에 대한 정의입니다.                                                                                                         |
|              | emails             | [object]  | Email addresses for the user.                                                                                          |
| emails       | primary            | boolean   | Boolean indicating if this email is the primary email address.                                                         |
| emails       | type               | enum      | The type of email. Allowed enum values: `work`.                                                                        |
| emails       | value              | string    | Email addresses for the user.                                                                                          |
|              | id                 | string    | The identifier of the resource. Not required when creating a user.                                                     |
|              | meta               | object    | Metadata associated with a user.                                                                                       |
| meta         | created            | date-time | The date and time the user was created.                                                                                |
| meta         | lastModified       | date-time | The date and time the user was last changed.                                                                           |
| meta         | location           | string    | URL identifying the resource.                                                                                          |
| meta         | resourceType       | string    | Type of resource.                                                                                                      |
|              | name               | object    | The components of user's real name                                                                                     |
| name         | formatted          | string    | The full name, including all middle names, titles, and suffixes as appropriate, formatted for display.                 |
|              | roles              | [object]  | Datadog roles assigned to the user. Provide the role UUID in `value` when provisioning or updating roles through SCIM. |
| roles        | value [*required*] | string    | Datadog role UUID.                                                                                                     |
|              | schemas            | [string]  | User JSON Schemas.                                                                                                     |
|              | title              | string    | The user's title.                                                                                                      |
|              | userName           | string    | Unique identifier for the User.                                                                                        |
{% /tab %}

{% tab label="Example" %}
```json
{
  "active": false,
  "emails": [
    {
      "primary": false,
      "type": "string",
      "value": "string"
    }
  ],
  "id": "string",
  "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/Users/13a95654-b76d-478d-8636-157a7e461d7c",
    "resourceType": "User"
  },
  "name": {
    "formatted": "string"
  },
  "roles": [
    {
      "value": "00000000-0000-0000-0000-000000000001"
    }
  ],
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "title": "string",
  "userName": "string"
}
```
{% /tab %}
{% /tabs %}

### Response

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

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

| Parent field | Field              | Type      | Description                                                                                                            |
| ------------ | ------------------ | --------- | ---------------------------------------------------------------------------------------------------------------------- |
|              | active             | boolean   | A Boolean value indicating the User's administrative status.                                                           |
|              | emails             | [object]  | Email addresses for the user.                                                                                          |
| emails       | primary            | boolean   | Boolean indicating if this email is the primary email address.                                                         |
| emails       | type               | enum      | The type of email. Allowed enum values: `work`.                                                                        |
| emails       | value              | string    | Email addresses for the user.                                                                                          |
|              | id                 | string    | The identifier of the resource. Not required when creating a user.                                                     |
|              | meta               | object    | Metadata associated with a user.                                                                                       |
| meta         | created            | date-time | The date and time the user was created.                                                                                |
| meta         | lastModified       | date-time | The date and time the user was last changed.                                                                           |
| meta         | location           | string    | URL identifying the resource.                                                                                          |
| meta         | resourceType       | string    | Type of resource.                                                                                                      |
|              | name               | object    | The components of user's real name                                                                                     |
| name         | formatted          | string    | The full name, including all middle names, titles, and suffixes as appropriate, formatted for display.                 |
|              | roles              | [object]  | Datadog roles assigned to the user. Provide the role UUID in `value` when provisioning or updating roles through SCIM. |
| roles        | display            | string    | Human-readable Datadog role name returned in responses. Read-only.                                                     |
| roles        | value [*required*] | string    | Datadog role UUID.                                                                                                     |
|              | schemas            | [string]  | User JSON Schemas.                                                                                                     |
|              | title              | string    | The user's title.                                                                                                      |
|              | userName           | string    | Unique identifier for the User.                                                                                        |
{% /tab %}

{% tab label="Example" %}
```json
{
  "active": false,
  "emails": [
    {
      "primary": false,
      "type": "string",
      "value": "string"
    }
  ],
  "id": "string",
  "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/Users/13a95654-b76d-478d-8636-157a7e461d7c",
    "resourceType": "User"
  },
  "name": {
    "formatted": "string"
  },
  "roles": [
    {
      "display": "Datadog Read Only Role",
      "value": "00000000-0000-0000-0000-000000000001"
    }
  ],
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "title": "string",
  "userName": "string"
}
```
{% /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/Users" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "active": true,
  "emails": [
    {
      "primary": true,
      "type": "work",
      "value": "john.doe@datadoghq.com"
    }
  ],
  "name": {
    "formatted": "John Doe"
  },
  "roles": [
    {
      "value": "00000000-0000-0000-0000-000000000001"
    }
  ],
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "title": "Mr.",
  "userName": "john.doe@datadoghq.com"
}
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/Users" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "active": true,
  "emails": [
    {
      "primary": true,
      "type": "work",
      "value": "john.doe@datadoghq.com"
    }
  ],
  "name": {
    "formatted": "John Doe"
  },
  "roles": [
    {
      "value": "00000000-0000-0000-0000-000000000001"
    }
  ],
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "title": "Mr.",
  "userName": "john.doe@datadoghq.com"
}
EOF
```
{% /tab %}
{% /tabs %}
