---
title: Org Groups
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Org Groups
---

# Org Groups

Manage organization groups, memberships, policies, policy overrides, and policy configurations.

## List org groups{% #list-org-groups %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                        |
| ----------------- | --------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/org_groups |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/org_groups |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/org_groups      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/org_groups      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/org_groups     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/org_groups |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/org_groups |

### Overview

List all organization groups that the requesting organization has access to. This endpoint requires the `org_group_read` permission.

### Arguments

#### Query Strings

| Name         | Type    | Description                                                                                                                                         |
| ------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| page[number] | integer | The page number to return.                                                                                                                          |
| page[size]   | integer | The number of items per page. Maximum is 1000.                                                                                                      |
| sort         | enum    | Field to sort org groups by. Supported values: `name`, `uuid`, `-name`, `-uuid`. Defaults to `uuid`.Allowed enum values: `name, -name, uuid, -uuid` |
| include      | array   | List of related resources to include.                                                                                                               |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a list of org groups.

| Parent field  | Field                            | Type      | Description                                                                             |
| ------------- | -------------------------------- | --------- | --------------------------------------------------------------------------------------- |
|               | data [*required*]           | [object]  | An array of org groups.                                                                 |
| data          | attributes [*required*]     | object    | Attributes of an org group.                                                             |
| attributes    | created_at [*required*]     | date-time | Timestamp when the org group was created.                                               |
| attributes    | modified_at [*required*]    | date-time | Timestamp when the org group was last modified.                                         |
| attributes    | name [*required*]           | string    | The name of the org group.                                                              |
| attributes    | owner_org_site [*required*] | string    | The site of the organization that owns this org group.                                  |
| attributes    | owner_org_uuid [*required*] | uuid      | The UUID of the organization that owns this org group.                                  |
| data          | id [*required*]             | uuid      | The ID of the org group.                                                                |
| data          | relationships                    | object    | Relationships of an org group.                                                          |
| relationships | memberships                      | object    | Relationship to org group memberships.                                                  |
| memberships   | data [*required*]           | [object]  | An array of membership relationship references.                                         |
| data          | id [*required*]             | uuid      | The ID of the membership.                                                               |
| data          | type [*required*]           | enum      | Org group memberships resource type. Allowed enum values: `org_group_memberships`       |
| data          | type [*required*]           | enum      | Org groups resource type. Allowed enum values: `org_groups`                             |
|               | included                         | [object]  | Related resources included in the response when requested with the `include` parameter. |
| included      | attributes [*required*]     | object    | Attributes of an org group membership.                                                  |
| attributes    | created_at [*required*]     | date-time | Timestamp when the membership was created.                                              |
| attributes    | modified_at [*required*]    | date-time | Timestamp when the membership was last modified.                                        |
| attributes    | org_name [*required*]       | string    | The name of the member organization.                                                    |
| attributes    | org_site [*required*]       | string    | The site of the member organization.                                                    |
| attributes    | org_uuid [*required*]       | uuid      | The UUID of the member organization.                                                    |
| included      | id [*required*]             | uuid      | The ID of the org group membership.                                                     |
| included      | relationships                    | object    | Relationships of an org group membership.                                               |
| relationships | org_group                        | object    | Relationship to a single org group.                                                     |
| org_group     | data [*required*]           | object    | A reference to an org group.                                                            |
| data          | id [*required*]             | uuid      | The ID of the org group.                                                                |
| data          | type [*required*]           | enum      | Org groups resource type. Allowed enum values: `org_groups`                             |
| included      | type [*required*]           | enum      | Org group memberships resource type. Allowed enum values: `org_group_memberships`       |
|               | meta                             | object    | Pagination metadata.                                                                    |
| meta          | page [*required*]           | object    | Page-based pagination details.                                                          |
| page          | total_count [*required*]    | int64     | The total number of items.                                                              |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "created_at": "2024-01-15T10:30:00Z",
        "modified_at": "2024-01-15T10:30:00Z",
        "name": "My Org Group",
        "owner_org_site": "datadoghq.com",
        "owner_org_uuid": "b2c3d4e5-f6a7-8901-bcde-f01234567890"
      },
      "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
      "relationships": {
        "memberships": {
          "data": [
            {
              "id": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
              "type": "org_group_memberships"
            }
          ]
        }
      },
      "type": "org_groups"
    }
  ],
  "included": [
    {
      "attributes": {
        "created_at": "2024-01-15T10:30:00Z",
        "modified_at": "2024-01-15T10:30:00Z",
        "org_name": "Acme Corp",
        "org_site": "datadoghq.com",
        "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"
      },
      "id": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
      "relationships": {
        "org_group": {
          "data": {
            "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
            "type": "org_groups"
          }
        }
      },
      "type": "org_group_memberships"
    }
  ],
  "meta": {
    "page": {
      "total_count": 42
    }
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_groups" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Get an org group{% #get-an-org-group %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                       |
| ----------------- | ------------------------------------------------------------------ |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/org_groups/{org_group_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/org_groups/{org_group_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/org_groups/{org_group_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/org_groups/{org_group_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/org_groups/{org_group_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/org_groups/{org_group_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/org_groups/{org_group_id} |

### Overview

Get a specific organization group by its ID. This endpoint requires the `org_group_read` permission.

### Arguments

#### Path Parameters

| Name                           | Type   | Description              |
| ------------------------------ | ------ | ------------------------ |
| org_group_id [*required*] | string | The ID of the org group. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a single org group.

| Parent field  | Field                            | Type      | Description                                                                       |
| ------------- | -------------------------------- | --------- | --------------------------------------------------------------------------------- |
|               | data [*required*]           | object    | An org group resource.                                                            |
| data          | attributes [*required*]     | object    | Attributes of an org group.                                                       |
| attributes    | created_at [*required*]     | date-time | Timestamp when the org group was created.                                         |
| attributes    | modified_at [*required*]    | date-time | Timestamp when the org group was last modified.                                   |
| attributes    | name [*required*]           | string    | The name of the org group.                                                        |
| attributes    | owner_org_site [*required*] | string    | The site of the organization that owns this org group.                            |
| attributes    | owner_org_uuid [*required*] | uuid      | The UUID of the organization that owns this org group.                            |
| data          | id [*required*]             | uuid      | The ID of the org group.                                                          |
| data          | relationships                    | object    | Relationships of an org group.                                                    |
| relationships | memberships                      | object    | Relationship to org group memberships.                                            |
| memberships   | data [*required*]           | [object]  | An array of membership relationship references.                                   |
| data          | id [*required*]             | uuid      | The ID of the membership.                                                         |
| data          | type [*required*]           | enum      | Org group memberships resource type. Allowed enum values: `org_group_memberships` |
| data          | type [*required*]           | enum      | Org groups resource type. Allowed enum values: `org_groups`                       |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "created_at": "2024-01-15T10:30:00Z",
      "modified_at": "2024-01-15T10:30:00Z",
      "name": "My Org Group",
      "owner_org_site": "datadoghq.com",
      "owner_org_uuid": "b2c3d4e5-f6a7-8901-bcde-f01234567890"
    },
    "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
    "relationships": {
      "memberships": {
        "data": [
          {
            "id": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
            "type": "org_group_memberships"
          }
        ]
      }
    },
    "type": "org_groups"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport org_group_id="a1b2c3d4-e5f6-7890-abcd-ef0123456789"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_groups/${org_group_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Create an org group{% #create-an-org-group %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                         |
| ----------------- | ---------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/org_groups |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/org_groups |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/org_groups      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/org_groups      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/org_groups     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/org_groups |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/org_groups |

### Overview

Create a new organization group. This endpoint requires the `org_group_write` permission.

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field | Field                        | Type   | Description                                                 |
| ------------ | ---------------------------- | ------ | ----------------------------------------------------------- |
|              | data [*required*]       | object | Data for creating an org group.                             |
| data         | attributes [*required*] | object | Attributes for creating an org group.                       |
| attributes   | name [*required*]       | string | The name of the org group.                                  |
| data         | type [*required*]       | enum   | Org groups resource type. Allowed enum values: `org_groups` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "name": "My Org Group"
    },
    "type": "org_groups"
  }
}
```

{% /tab %}

### Response

{% tab title="201" %}
Created
{% tab title="Model" %}
Response containing a single org group.

| Parent field  | Field                            | Type      | Description                                                                       |
| ------------- | -------------------------------- | --------- | --------------------------------------------------------------------------------- |
|               | data [*required*]           | object    | An org group resource.                                                            |
| data          | attributes [*required*]     | object    | Attributes of an org group.                                                       |
| attributes    | created_at [*required*]     | date-time | Timestamp when the org group was created.                                         |
| attributes    | modified_at [*required*]    | date-time | Timestamp when the org group was last modified.                                   |
| attributes    | name [*required*]           | string    | The name of the org group.                                                        |
| attributes    | owner_org_site [*required*] | string    | The site of the organization that owns this org group.                            |
| attributes    | owner_org_uuid [*required*] | uuid      | The UUID of the organization that owns this org group.                            |
| data          | id [*required*]             | uuid      | The ID of the org group.                                                          |
| data          | relationships                    | object    | Relationships of an org group.                                                    |
| relationships | memberships                      | object    | Relationship to org group memberships.                                            |
| memberships   | data [*required*]           | [object]  | An array of membership relationship references.                                   |
| data          | id [*required*]             | uuid      | The ID of the membership.                                                         |
| data          | type [*required*]           | enum      | Org group memberships resource type. Allowed enum values: `org_group_memberships` |
| data          | type [*required*]           | enum      | Org groups resource type. Allowed enum values: `org_groups`                       |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "created_at": "2024-01-15T10:30:00Z",
      "modified_at": "2024-01-15T10:30:00Z",
      "name": "My Org Group",
      "owner_org_site": "datadoghq.com",
      "owner_org_uuid": "b2c3d4e5-f6a7-8901-bcde-f01234567890"
    },
    "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
    "relationships": {
      "memberships": {
        "data": [
          {
            "id": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
            "type": "org_group_memberships"
          }
        ]
      }
    },
    "type": "org_groups"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="409" %}
Conflict
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_groups" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "My Org Group"
    },
    "type": "org_groups"
  }
}
EOF
                
{% /tab %}

## Update an org group{% #update-an-org-group %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                         |
| ----------------- | -------------------------------------------------------------------- |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v2/org_groups/{org_group_id} |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v2/org_groups/{org_group_id} |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v2/org_groups/{org_group_id}      |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v2/org_groups/{org_group_id}      |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v2/org_groups/{org_group_id}     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v2/org_groups/{org_group_id} |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v2/org_groups/{org_group_id} |

### Overview

Update the name of an existing organization group. This endpoint requires the `org_group_write` permission.

### Arguments

#### Path Parameters

| Name                           | Type   | Description              |
| ------------------------------ | ------ | ------------------------ |
| org_group_id [*required*] | string | The ID of the org group. |

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field | Field                        | Type   | Description                                                 |
| ------------ | ---------------------------- | ------ | ----------------------------------------------------------- |
|              | data [*required*]       | object | Data for updating an org group.                             |
| data         | attributes [*required*] | object | Attributes for updating an org group.                       |
| attributes   | name [*required*]       | string | The name of the org group.                                  |
| data         | id [*required*]         | uuid   | The ID of the org group.                                    |
| data         | type [*required*]       | enum   | Org groups resource type. Allowed enum values: `org_groups` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "name": "Updated Org Group Name"
    },
    "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
    "type": "org_groups"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a single org group.

| Parent field  | Field                            | Type      | Description                                                                       |
| ------------- | -------------------------------- | --------- | --------------------------------------------------------------------------------- |
|               | data [*required*]           | object    | An org group resource.                                                            |
| data          | attributes [*required*]     | object    | Attributes of an org group.                                                       |
| attributes    | created_at [*required*]     | date-time | Timestamp when the org group was created.                                         |
| attributes    | modified_at [*required*]    | date-time | Timestamp when the org group was last modified.                                   |
| attributes    | name [*required*]           | string    | The name of the org group.                                                        |
| attributes    | owner_org_site [*required*] | string    | The site of the organization that owns this org group.                            |
| attributes    | owner_org_uuid [*required*] | uuid      | The UUID of the organization that owns this org group.                            |
| data          | id [*required*]             | uuid      | The ID of the org group.                                                          |
| data          | relationships                    | object    | Relationships of an org group.                                                    |
| relationships | memberships                      | object    | Relationship to org group memberships.                                            |
| memberships   | data [*required*]           | [object]  | An array of membership relationship references.                                   |
| data          | id [*required*]             | uuid      | The ID of the membership.                                                         |
| data          | type [*required*]           | enum      | Org group memberships resource type. Allowed enum values: `org_group_memberships` |
| data          | type [*required*]           | enum      | Org groups resource type. Allowed enum values: `org_groups`                       |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "created_at": "2024-01-15T10:30:00Z",
      "modified_at": "2024-01-15T10:30:00Z",
      "name": "My Org Group",
      "owner_org_site": "datadoghq.com",
      "owner_org_uuid": "b2c3d4e5-f6a7-8901-bcde-f01234567890"
    },
    "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
    "relationships": {
      "memberships": {
        "data": [
          {
            "id": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
            "type": "org_group_memberships"
          }
        ]
      }
    },
    "type": "org_groups"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport org_group_id="a1b2c3d4-e5f6-7890-abcd-ef0123456789"\# Curl commandcurl -X PATCH "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_groups/${org_group_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Updated Org Group Name"
    },
    "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
    "type": "org_groups"
  }
}
EOF
                
{% /tab %}

## Delete an org group{% #delete-an-org-group %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                          |
| ----------------- | --------------------------------------------------------------------- |
| ap1.datadoghq.com | DELETE https://api.ap1.datadoghq.com/api/v2/org_groups/{org_group_id} |
| ap2.datadoghq.com | DELETE https://api.ap2.datadoghq.com/api/v2/org_groups/{org_group_id} |
| app.datadoghq.eu  | DELETE https://api.datadoghq.eu/api/v2/org_groups/{org_group_id}      |
| app.ddog-gov.com  | DELETE https://api.ddog-gov.com/api/v2/org_groups/{org_group_id}      |
| app.datadoghq.com | DELETE https://api.datadoghq.com/api/v2/org_groups/{org_group_id}     |
| us3.datadoghq.com | DELETE https://api.us3.datadoghq.com/api/v2/org_groups/{org_group_id} |
| us5.datadoghq.com | DELETE https://api.us5.datadoghq.com/api/v2/org_groups/{org_group_id} |

### Overview

Delete an organization group by its ID. This endpoint requires the `org_group_write` permission.

### Arguments

#### Path Parameters

| Name                           | Type   | Description              |
| ------------------------------ | ------ | ------------------------ |
| org_group_id [*required*] | string | The ID of the org group. |

### Response

{% tab title="204" %}
No Content
{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport org_group_id="a1b2c3d4-e5f6-7890-abcd-ef0123456789"\# Curl commandcurl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_groups/${org_group_id}" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## List org group memberships{% #list-org-group-memberships %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                   |
| ----------------- | -------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/org_group_memberships |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/org_group_memberships |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/org_group_memberships      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/org_group_memberships      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/org_group_memberships     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/org_group_memberships |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/org_group_memberships |

### Overview

List organization group memberships. Filter by org group ID or org UUID. At least one of `filter[org_group_id]` or `filter[org_uuid]` must be provided. When filtering by org UUID, returns a single-item list with the membership for that org. This endpoint requires the `org_group_read` permission.

### Arguments

#### Query Strings

| Name                 | Type    | Description                                                                                                                                          |
| -------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| filter[org_group_id] | string  | Filter memberships by org group ID. Required when `filter[org_uuid]` is not provided.                                                                |
| filter[org_uuid]     | string  | Filter memberships by org UUID. Returns a single-item list.                                                                                          |
| page[number]         | integer | The page number to return.                                                                                                                           |
| page[size]           | integer | The number of items per page. Maximum is 1000.                                                                                                       |
| sort                 | enum    | Field to sort memberships by. Supported values: `name`, `uuid`, `-name`, `-uuid`. Defaults to `uuid`.Allowed enum values: `name, -name, uuid, -uuid` |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a list of org group memberships.

| Parent field  | Field                         | Type      | Description                                                                       |
| ------------- | ----------------------------- | --------- | --------------------------------------------------------------------------------- |
|               | data [*required*]        | [object]  | An array of org group memberships.                                                |
| data          | attributes [*required*]  | object    | Attributes of an org group membership.                                            |
| attributes    | created_at [*required*]  | date-time | Timestamp when the membership was created.                                        |
| attributes    | modified_at [*required*] | date-time | Timestamp when the membership was last modified.                                  |
| attributes    | org_name [*required*]    | string    | The name of the member organization.                                              |
| attributes    | org_site [*required*]    | string    | The site of the member organization.                                              |
| attributes    | org_uuid [*required*]    | uuid      | The UUID of the member organization.                                              |
| data          | id [*required*]          | uuid      | The ID of the org group membership.                                               |
| data          | relationships                 | object    | Relationships of an org group membership.                                         |
| relationships | org_group                     | object    | Relationship to a single org group.                                               |
| org_group     | data [*required*]        | object    | A reference to an org group.                                                      |
| data          | id [*required*]          | uuid      | The ID of the org group.                                                          |
| data          | type [*required*]        | enum      | Org groups resource type. Allowed enum values: `org_groups`                       |
| data          | type [*required*]        | enum      | Org group memberships resource type. Allowed enum values: `org_group_memberships` |
|               | meta                          | object    | Pagination metadata.                                                              |
| meta          | page [*required*]        | object    | Page-based pagination details.                                                    |
| page          | total_count [*required*] | int64     | The total number of items.                                                        |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "created_at": "2024-01-15T10:30:00Z",
        "modified_at": "2024-01-15T10:30:00Z",
        "org_name": "Acme Corp",
        "org_site": "datadoghq.com",
        "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"
      },
      "id": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
      "relationships": {
        "org_group": {
          "data": {
            "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
            "type": "org_groups"
          }
        }
      },
      "type": "org_group_memberships"
    }
  ],
  "meta": {
    "page": {
      "total_count": 42
    }
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_group_memberships" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Get an org group membership{% #get-an-org-group-membership %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                                             |
| ----------------- | ---------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/org_group_memberships/{org_group_membership_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/org_group_memberships/{org_group_membership_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/org_group_memberships/{org_group_membership_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/org_group_memberships/{org_group_membership_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/org_group_memberships/{org_group_membership_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/org_group_memberships/{org_group_membership_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/org_group_memberships/{org_group_membership_id} |

### Overview

Get a specific organization group membership by its ID. This endpoint requires the `org_group_read` permission.

### Arguments

#### Path Parameters

| Name                                      | Type   | Description                         |
| ----------------------------------------- | ------ | ----------------------------------- |
| org_group_membership_id [*required*] | string | The ID of the org group membership. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a single org group membership.

| Parent field  | Field                         | Type      | Description                                                                       |
| ------------- | ----------------------------- | --------- | --------------------------------------------------------------------------------- |
|               | data [*required*]        | object    | An org group membership resource.                                                 |
| data          | attributes [*required*]  | object    | Attributes of an org group membership.                                            |
| attributes    | created_at [*required*]  | date-time | Timestamp when the membership was created.                                        |
| attributes    | modified_at [*required*] | date-time | Timestamp when the membership was last modified.                                  |
| attributes    | org_name [*required*]    | string    | The name of the member organization.                                              |
| attributes    | org_site [*required*]    | string    | The site of the member organization.                                              |
| attributes    | org_uuid [*required*]    | uuid      | The UUID of the member organization.                                              |
| data          | id [*required*]          | uuid      | The ID of the org group membership.                                               |
| data          | relationships                 | object    | Relationships of an org group membership.                                         |
| relationships | org_group                     | object    | Relationship to a single org group.                                               |
| org_group     | data [*required*]        | object    | A reference to an org group.                                                      |
| data          | id [*required*]          | uuid      | The ID of the org group.                                                          |
| data          | type [*required*]        | enum      | Org groups resource type. Allowed enum values: `org_groups`                       |
| data          | type [*required*]        | enum      | Org group memberships resource type. Allowed enum values: `org_group_memberships` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "created_at": "2024-01-15T10:30:00Z",
      "modified_at": "2024-01-15T10:30:00Z",
      "org_name": "Acme Corp",
      "org_site": "datadoghq.com",
      "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"
    },
    "id": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
    "relationships": {
      "org_group": {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
          "type": "org_groups"
        }
      }
    },
    "type": "org_group_memberships"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport org_group_membership_id="f1e2d3c4-b5a6-7890-1234-567890abcdef"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_group_memberships/${org_group_membership_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Update an org group membership{% #update-an-org-group-membership %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                                               |
| ----------------- | ------------------------------------------------------------------------------------------ |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v2/org_group_memberships/{org_group_membership_id} |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v2/org_group_memberships/{org_group_membership_id} |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v2/org_group_memberships/{org_group_membership_id}      |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v2/org_group_memberships/{org_group_membership_id}      |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v2/org_group_memberships/{org_group_membership_id}     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v2/org_group_memberships/{org_group_membership_id} |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v2/org_group_memberships/{org_group_membership_id} |

### Overview

Move an organization to a different org group by updating its membership. This endpoint requires the `org_group_write` permission.

### Arguments

#### Path Parameters

| Name                                      | Type   | Description                         |
| ----------------------------------------- | ------ | ----------------------------------- |
| org_group_membership_id [*required*] | string | The ID of the org group membership. |

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field  | Field                           | Type   | Description                                                                       |
| ------------- | ------------------------------- | ------ | --------------------------------------------------------------------------------- |
|               | data [*required*]          | object | Data for updating an org group membership.                                        |
| data          | id [*required*]            | uuid   | The ID of the membership.                                                         |
| data          | relationships [*required*] | object | Relationships for updating a membership.                                          |
| relationships | org_group [*required*]     | object | Relationship to a single org group.                                               |
| org_group     | data [*required*]          | object | A reference to an org group.                                                      |
| data          | id [*required*]            | uuid   | The ID of the org group.                                                          |
| data          | type [*required*]          | enum   | Org groups resource type. Allowed enum values: `org_groups`                       |
| data          | type [*required*]          | enum   | Org group memberships resource type. Allowed enum values: `org_group_memberships` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "id": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
    "relationships": {
      "org_group": {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
          "type": "org_groups"
        }
      }
    },
    "type": "org_group_memberships"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a single org group membership.

| Parent field  | Field                         | Type      | Description                                                                       |
| ------------- | ----------------------------- | --------- | --------------------------------------------------------------------------------- |
|               | data [*required*]        | object    | An org group membership resource.                                                 |
| data          | attributes [*required*]  | object    | Attributes of an org group membership.                                            |
| attributes    | created_at [*required*]  | date-time | Timestamp when the membership was created.                                        |
| attributes    | modified_at [*required*] | date-time | Timestamp when the membership was last modified.                                  |
| attributes    | org_name [*required*]    | string    | The name of the member organization.                                              |
| attributes    | org_site [*required*]    | string    | The site of the member organization.                                              |
| attributes    | org_uuid [*required*]    | uuid      | The UUID of the member organization.                                              |
| data          | id [*required*]          | uuid      | The ID of the org group membership.                                               |
| data          | relationships                 | object    | Relationships of an org group membership.                                         |
| relationships | org_group                     | object    | Relationship to a single org group.                                               |
| org_group     | data [*required*]        | object    | A reference to an org group.                                                      |
| data          | id [*required*]          | uuid      | The ID of the org group.                                                          |
| data          | type [*required*]        | enum      | Org groups resource type. Allowed enum values: `org_groups`                       |
| data          | type [*required*]        | enum      | Org group memberships resource type. Allowed enum values: `org_group_memberships` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "created_at": "2024-01-15T10:30:00Z",
      "modified_at": "2024-01-15T10:30:00Z",
      "org_name": "Acme Corp",
      "org_site": "datadoghq.com",
      "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"
    },
    "id": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
    "relationships": {
      "org_group": {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
          "type": "org_groups"
        }
      }
    },
    "type": "org_group_memberships"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport org_group_membership_id="f1e2d3c4-b5a6-7890-1234-567890abcdef"\# Curl commandcurl -X PATCH "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_group_memberships/${org_group_membership_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "id": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
    "relationships": {
      "org_group": {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
          "type": "org_groups"
        }
      }
    },
    "type": "org_group_memberships"
  }
}
EOF
                
{% /tab %}

## Bulk update org group memberships{% #bulk-update-org-group-memberships %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                          |
| ----------------- | --------------------------------------------------------------------- |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v2/org_group_memberships/bulk |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v2/org_group_memberships/bulk |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v2/org_group_memberships/bulk      |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v2/org_group_memberships/bulk      |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v2/org_group_memberships/bulk     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v2/org_group_memberships/bulk |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v2/org_group_memberships/bulk |

### Overview

Move a batch of organizations from one org group to another. This is an atomic operation. Maximum 100 orgs per request. This endpoint requires the `org_group_write` permission.

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field     | Field                              | Type     | Description                                                                                              |
| ---------------- | ---------------------------------- | -------- | -------------------------------------------------------------------------------------------------------- |
|                  | data [*required*]             | object   | Data for bulk updating org group memberships.                                                            |
| data             | attributes [*required*]       | object   | Attributes for bulk updating org group memberships.                                                      |
| attributes       | orgs [*required*]             | [object] | List of organizations to move. Maximum 100 per request.                                                  |
| orgs             | org_site [*required*]         | string   | The site of the organization.                                                                            |
| orgs             | org_uuid [*required*]         | uuid     | The UUID of the organization.                                                                            |
| data             | relationships [*required*]    | object   | Relationships for bulk updating memberships.                                                             |
| relationships    | source_org_group [*required*] | object   | Relationship to a single org group.                                                                      |
| source_org_group | data [*required*]             | object   | A reference to an org group.                                                                             |
| data             | id [*required*]               | uuid     | The ID of the org group.                                                                                 |
| data             | type [*required*]             | enum     | Org groups resource type. Allowed enum values: `org_groups`                                              |
| relationships    | target_org_group [*required*] | object   | Relationship to a single org group.                                                                      |
| target_org_group | data [*required*]             | object   | A reference to an org group.                                                                             |
| data             | id [*required*]               | uuid     | The ID of the org group.                                                                                 |
| data             | type [*required*]             | enum     | Org groups resource type. Allowed enum values: `org_groups`                                              |
| data             | type [*required*]             | enum     | Org group membership bulk update resource type. Allowed enum values: `org_group_membership_bulk_updates` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "orgs": [
        {
          "org_site": "datadoghq.com",
          "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"
        }
      ]
    },
    "relationships": {
      "source_org_group": {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
          "type": "org_groups"
        }
      },
      "target_org_group": {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
          "type": "org_groups"
        }
      }
    },
    "type": "org_group_membership_bulk_updates"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a list of org group memberships.

| Parent field  | Field                         | Type      | Description                                                                       |
| ------------- | ----------------------------- | --------- | --------------------------------------------------------------------------------- |
|               | data [*required*]        | [object]  | An array of org group memberships.                                                |
| data          | attributes [*required*]  | object    | Attributes of an org group membership.                                            |
| attributes    | created_at [*required*]  | date-time | Timestamp when the membership was created.                                        |
| attributes    | modified_at [*required*] | date-time | Timestamp when the membership was last modified.                                  |
| attributes    | org_name [*required*]    | string    | The name of the member organization.                                              |
| attributes    | org_site [*required*]    | string    | The site of the member organization.                                              |
| attributes    | org_uuid [*required*]    | uuid      | The UUID of the member organization.                                              |
| data          | id [*required*]          | uuid      | The ID of the org group membership.                                               |
| data          | relationships                 | object    | Relationships of an org group membership.                                         |
| relationships | org_group                     | object    | Relationship to a single org group.                                               |
| org_group     | data [*required*]        | object    | A reference to an org group.                                                      |
| data          | id [*required*]          | uuid      | The ID of the org group.                                                          |
| data          | type [*required*]        | enum      | Org groups resource type. Allowed enum values: `org_groups`                       |
| data          | type [*required*]        | enum      | Org group memberships resource type. Allowed enum values: `org_group_memberships` |
|               | meta                          | object    | Pagination metadata.                                                              |
| meta          | page [*required*]        | object    | Page-based pagination details.                                                    |
| page          | total_count [*required*] | int64     | The total number of items.                                                        |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "created_at": "2024-01-15T10:30:00Z",
        "modified_at": "2024-01-15T10:30:00Z",
        "org_name": "Acme Corp",
        "org_site": "datadoghq.com",
        "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"
      },
      "id": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
      "relationships": {
        "org_group": {
          "data": {
            "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
            "type": "org_groups"
          }
        }
      },
      "type": "org_group_memberships"
    }
  ],
  "meta": {
    "page": {
      "total_count": 42
    }
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Curl commandcurl -X PATCH "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_group_memberships/bulk" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "orgs": [
        {
          "org_site": "datadoghq.com",
          "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"
        }
      ]
    },
    "relationships": {
      "source_org_group": {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
          "type": "org_groups"
        }
      },
      "target_org_group": {
        "data": {
          "id": "d4e5f6a7-b890-1234-cdef-567890abcdef",
          "type": "org_groups"
        }
      }
    },
    "type": "org_group_membership_bulk_updates"
  }
}
EOF
                
{% /tab %}

## List org group policies{% #list-org-group-policies %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                |
| ----------------- | ----------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/org_group_policies |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/org_group_policies |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/org_group_policies      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/org_group_policies      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/org_group_policies     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/org_group_policies |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/org_group_policies |

### Overview

List policies for an organization group. Requires a filter on org group ID. This endpoint requires the `org_group_read` permission.

### Arguments

#### Query Strings

| Name                                   | Type    | Description                                                                                                                             |
| -------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| filter[org_group_id] [*required*] | string  | Filter policies by org group ID.                                                                                                        |
| filter[policy_name]                    | string  | Filter policies by policy name.                                                                                                         |
| page[number]                           | integer | The page number to return.                                                                                                              |
| page[size]                             | integer | The number of items per page. Maximum is 1000.                                                                                          |
| sort                                   | enum    | Field to sort policies by. Supported values: `id`, `name`, `-id`, `-name`. Defaults to `id`.Allowed enum values: `id, -id, name, -name` |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a list of org group policies.

| Parent field  | Field                         | Type      | Description                                                                 |
| ------------- | ----------------------------- | --------- | --------------------------------------------------------------------------- |
|               | data [*required*]        | [object]  | An array of org group policies.                                             |
| data          | attributes [*required*]  | object    | Attributes of an org group policy.                                          |
| attributes    | content                       | object    | The policy content as key-value pairs.                                      |
| attributes    | enforced_at [*required*] | date-time | Timestamp when the policy was enforced.                                     |
| attributes    | modified_at [*required*] | date-time | Timestamp when the policy was last modified.                                |
| attributes    | policy_name [*required*] | string    | The name of the policy.                                                     |
| data          | id [*required*]          | uuid      | The ID of the org group policy.                                             |
| data          | relationships                 | object    | Relationships of an org group policy.                                       |
| relationships | org_group                     | object    | Relationship to a single org group.                                         |
| org_group     | data [*required*]        | object    | A reference to an org group.                                                |
| data          | id [*required*]          | uuid      | The ID of the org group.                                                    |
| data          | type [*required*]        | enum      | Org groups resource type. Allowed enum values: `org_groups`                 |
| data          | type [*required*]        | enum      | Org group policies resource type. Allowed enum values: `org_group_policies` |
|               | meta                          | object    | Pagination metadata.                                                        |
| meta          | page [*required*]        | object    | Page-based pagination details.                                              |
| page          | total_count [*required*] | int64     | The total number of items.                                                  |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "content": {
          "value": "UTC"
        },
        "enforced_at": "2024-01-15T10:30:00Z",
        "modified_at": "2024-01-15T10:30:00Z",
        "policy_name": "monitor_timezone"
      },
      "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
      "relationships": {
        "org_group": {
          "data": {
            "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
            "type": "org_groups"
          }
        }
      },
      "type": "org_group_policies"
    }
  ],
  "meta": {
    "page": {
      "total_count": 42
    }
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Required query argumentsexport filter[org_group_id]="a1b2c3d4-e5f6-7890-abcd-ef0123456789"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_group_policies?filter[org_group_id]=${filter[org_group_id]}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Create an org group policy{% #create-an-org-group-policy %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                 |
| ----------------- | ------------------------------------------------------------ |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/org_group_policies |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/org_group_policies |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/org_group_policies      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/org_group_policies      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/org_group_policies     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/org_group_policies |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/org_group_policies |

### Overview

Create a new policy for an organization group. This endpoint requires the `org_group_write` permission.

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field  | Field                           | Type   | Description                                                                 |
| ------------- | ------------------------------- | ------ | --------------------------------------------------------------------------- |
|               | data [*required*]          | object | Data for creating an org group policy.                                      |
| data          | attributes [*required*]    | object | Attributes for creating an org group policy.                                |
| attributes    | content [*required*]       | object | The policy content as key-value pairs.                                      |
| attributes    | policy_name [*required*]   | string | The name of the policy.                                                     |
| data          | relationships [*required*] | object | Relationships for creating a policy.                                        |
| relationships | org_group [*required*]     | object | Relationship to a single org group.                                         |
| org_group     | data [*required*]          | object | A reference to an org group.                                                |
| data          | id [*required*]            | uuid   | The ID of the org group.                                                    |
| data          | type [*required*]          | enum   | Org groups resource type. Allowed enum values: `org_groups`                 |
| data          | type [*required*]          | enum   | Org group policies resource type. Allowed enum values: `org_group_policies` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "content": {
        "value": "UTC"
      },
      "policy_name": "monitor_timezone"
    },
    "relationships": {
      "org_group": {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
          "type": "org_groups"
        }
      }
    },
    "type": "org_group_policies"
  }
}
```

{% /tab %}

### Response

{% tab title="201" %}
Created
{% tab title="Model" %}
Response containing a single org group policy.

| Parent field  | Field                         | Type      | Description                                                                 |
| ------------- | ----------------------------- | --------- | --------------------------------------------------------------------------- |
|               | data [*required*]        | object    | An org group policy resource.                                               |
| data          | attributes [*required*]  | object    | Attributes of an org group policy.                                          |
| attributes    | content                       | object    | The policy content as key-value pairs.                                      |
| attributes    | enforced_at [*required*] | date-time | Timestamp when the policy was enforced.                                     |
| attributes    | modified_at [*required*] | date-time | Timestamp when the policy was last modified.                                |
| attributes    | policy_name [*required*] | string    | The name of the policy.                                                     |
| data          | id [*required*]          | uuid      | The ID of the org group policy.                                             |
| data          | relationships                 | object    | Relationships of an org group policy.                                       |
| relationships | org_group                     | object    | Relationship to a single org group.                                         |
| org_group     | data [*required*]        | object    | A reference to an org group.                                                |
| data          | id [*required*]          | uuid      | The ID of the org group.                                                    |
| data          | type [*required*]        | enum      | Org groups resource type. Allowed enum values: `org_groups`                 |
| data          | type [*required*]        | enum      | Org group policies resource type. Allowed enum values: `org_group_policies` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "content": {
        "value": "UTC"
      },
      "enforced_at": "2024-01-15T10:30:00Z",
      "modified_at": "2024-01-15T10:30:00Z",
      "policy_name": "monitor_timezone"
    },
    "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
    "relationships": {
      "org_group": {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
          "type": "org_groups"
        }
      }
    },
    "type": "org_group_policies"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="409" %}
Conflict
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_group_policies" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "content": {
        "value": "UTC"
      },
      "policy_name": "monitor_timezone"
    },
    "relationships": {
      "org_group": {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
          "type": "org_groups"
        }
      }
    },
    "type": "org_group_policies"
  }
}
EOF
                
{% /tab %}

## Update an org group policy{% #update-an-org-group-policy %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                                        |
| ----------------- | ----------------------------------------------------------------------------------- |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v2/org_group_policies/{org_group_policy_id} |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v2/org_group_policies/{org_group_policy_id} |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v2/org_group_policies/{org_group_policy_id}      |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v2/org_group_policies/{org_group_policy_id}      |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v2/org_group_policies/{org_group_policy_id}     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v2/org_group_policies/{org_group_policy_id} |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v2/org_group_policies/{org_group_policy_id} |

### Overview

Update the content of an existing organization group policy. This endpoint requires the `org_group_write` permission.

### Arguments

#### Path Parameters

| Name                                  | Type   | Description                     |
| ------------------------------------- | ------ | ------------------------------- |
| org_group_policy_id [*required*] | string | The ID of the org group policy. |

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field | Field                        | Type   | Description                                                                 |
| ------------ | ---------------------------- | ------ | --------------------------------------------------------------------------- |
|              | data [*required*]       | object | Data for updating an org group policy.                                      |
| data         | attributes [*required*] | object | Attributes for updating an org group policy.                                |
| attributes   | content                      | object | The policy content as key-value pairs.                                      |
| data         | id [*required*]         | uuid   | The ID of the policy.                                                       |
| data         | type [*required*]       | enum   | Org group policies resource type. Allowed enum values: `org_group_policies` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "content": {
        "value": "UTC"
      }
    },
    "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
    "type": "org_group_policies"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a single org group policy.

| Parent field  | Field                         | Type      | Description                                                                 |
| ------------- | ----------------------------- | --------- | --------------------------------------------------------------------------- |
|               | data [*required*]        | object    | An org group policy resource.                                               |
| data          | attributes [*required*]  | object    | Attributes of an org group policy.                                          |
| attributes    | content                       | object    | The policy content as key-value pairs.                                      |
| attributes    | enforced_at [*required*] | date-time | Timestamp when the policy was enforced.                                     |
| attributes    | modified_at [*required*] | date-time | Timestamp when the policy was last modified.                                |
| attributes    | policy_name [*required*] | string    | The name of the policy.                                                     |
| data          | id [*required*]          | uuid      | The ID of the org group policy.                                             |
| data          | relationships                 | object    | Relationships of an org group policy.                                       |
| relationships | org_group                     | object    | Relationship to a single org group.                                         |
| org_group     | data [*required*]        | object    | A reference to an org group.                                                |
| data          | id [*required*]          | uuid      | The ID of the org group.                                                    |
| data          | type [*required*]        | enum      | Org groups resource type. Allowed enum values: `org_groups`                 |
| data          | type [*required*]        | enum      | Org group policies resource type. Allowed enum values: `org_group_policies` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "content": {
        "value": "UTC"
      },
      "enforced_at": "2024-01-15T10:30:00Z",
      "modified_at": "2024-01-15T10:30:00Z",
      "policy_name": "monitor_timezone"
    },
    "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
    "relationships": {
      "org_group": {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
          "type": "org_groups"
        }
      }
    },
    "type": "org_group_policies"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport org_group_policy_id="1a2b3c4d-5e6f-7890-abcd-ef0123456789"\# Curl commandcurl -X PATCH "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_group_policies/${org_group_policy_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "content": {
        "value": "US/Eastern"
      }
    },
    "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
    "type": "org_group_policies"
  }
}
EOF
                
{% /tab %}

## Delete an org group policy{% #delete-an-org-group-policy %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                                         |
| ----------------- | ------------------------------------------------------------------------------------ |
| ap1.datadoghq.com | DELETE https://api.ap1.datadoghq.com/api/v2/org_group_policies/{org_group_policy_id} |
| ap2.datadoghq.com | DELETE https://api.ap2.datadoghq.com/api/v2/org_group_policies/{org_group_policy_id} |
| app.datadoghq.eu  | DELETE https://api.datadoghq.eu/api/v2/org_group_policies/{org_group_policy_id}      |
| app.ddog-gov.com  | DELETE https://api.ddog-gov.com/api/v2/org_group_policies/{org_group_policy_id}      |
| app.datadoghq.com | DELETE https://api.datadoghq.com/api/v2/org_group_policies/{org_group_policy_id}     |
| us3.datadoghq.com | DELETE https://api.us3.datadoghq.com/api/v2/org_group_policies/{org_group_policy_id} |
| us5.datadoghq.com | DELETE https://api.us5.datadoghq.com/api/v2/org_group_policies/{org_group_policy_id} |

### Overview

Delete an organization group policy by its ID. This endpoint requires the `org_group_write` permission.

### Arguments

#### Path Parameters

| Name                                  | Type   | Description                     |
| ------------------------------------- | ------ | ------------------------------- |
| org_group_policy_id [*required*] | string | The ID of the org group policy. |

### Response

{% tab title="204" %}
No Content
{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport org_group_policy_id="1a2b3c4d-5e6f-7890-abcd-ef0123456789"\# Curl commandcurl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_group_policies/${org_group_policy_id}" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## List org group policy overrides{% #list-org-group-policy-overrides %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                        |
| ----------------- | ------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/org_group_policy_overrides |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/org_group_policy_overrides |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/org_group_policy_overrides      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/org_group_policy_overrides      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/org_group_policy_overrides     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/org_group_policy_overrides |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/org_group_policy_overrides |

### Overview

List policy overrides for an organization group. Requires a filter on org group ID. Optionally filter by policy ID. This endpoint requires the `org_group_read` permission.

### Arguments

#### Query Strings

| Name                                   | Type    | Description                                                                                                                                              |
| -------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| filter[org_group_id] [*required*] | string  | Filter policy overrides by org group ID.                                                                                                                 |
| filter[policy_id]                      | string  | Filter policy overrides by policy ID.                                                                                                                    |
| page[number]                           | integer | The page number to return.                                                                                                                               |
| page[size]                             | integer | The number of items per page. Maximum is 1000.                                                                                                           |
| sort                                   | enum    | Field to sort overrides by. Supported values: `id`, `org_uuid`, `-id`, `-org_uuid`. Defaults to `id`.Allowed enum values: `id, -id, org_uuid, -org_uuid` |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a list of org group policy overrides.

| Parent field     | Field                         | Type      | Description                                                                                 |
| ---------------- | ----------------------------- | --------- | ------------------------------------------------------------------------------------------- |
|                  | data [*required*]        | [object]  | An array of org group policy overrides.                                                     |
| data             | attributes [*required*]  | object    | Attributes of an org group policy override.                                                 |
| attributes       | content                       | object    | The override content as key-value pairs.                                                    |
| attributes       | created_at [*required*]  | date-time | Timestamp when the override was created.                                                    |
| attributes       | modified_at [*required*] | date-time | Timestamp when the override was last modified.                                              |
| attributes       | org_site [*required*]    | string    | The site of the organization that has the override.                                         |
| attributes       | org_uuid [*required*]    | uuid      | The UUID of the organization that has the override.                                         |
| data             | id [*required*]          | uuid      | The ID of the policy override.                                                              |
| data             | relationships                 | object    | Relationships of an org group policy override.                                              |
| relationships    | org_group                     | object    | Relationship to a single org group.                                                         |
| org_group        | data [*required*]        | object    | A reference to an org group.                                                                |
| data             | id [*required*]          | uuid      | The ID of the org group.                                                                    |
| data             | type [*required*]        | enum      | Org groups resource type. Allowed enum values: `org_groups`                                 |
| relationships    | org_group_policy              | object    | Relationship to a single org group policy.                                                  |
| org_group_policy | data [*required*]        | object    | A reference to an org group policy.                                                         |
| data             | id [*required*]          | uuid      | The ID of the policy.                                                                       |
| data             | type [*required*]        | enum      | Org group policies resource type. Allowed enum values: `org_group_policies`                 |
| data             | type [*required*]        | enum      | Org group policy overrides resource type. Allowed enum values: `org_group_policy_overrides` |
|                  | meta                          | object    | Pagination metadata.                                                                        |
| meta             | page [*required*]        | object    | Page-based pagination details.                                                              |
| page             | total_count [*required*] | int64     | The total number of items.                                                                  |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "content": {},
        "created_at": "2024-01-15T10:30:00Z",
        "modified_at": "2024-01-15T10:30:00Z",
        "org_site": "datadoghq.com",
        "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"
      },
      "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321",
      "relationships": {
        "org_group": {
          "data": {
            "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
            "type": "org_groups"
          }
        },
        "org_group_policy": {
          "data": {
            "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
            "type": "org_group_policies"
          }
        }
      },
      "type": "org_group_policy_overrides"
    }
  ],
  "meta": {
    "page": {
      "total_count": 42
    }
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Required query argumentsexport filter[org_group_id]="a1b2c3d4-e5f6-7890-abcd-ef0123456789"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_group_policy_overrides?filter[org_group_id]=${filter[org_group_id]}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Create an org group policy override{% #create-an-org-group-policy-override %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                         |
| ----------------- | -------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/org_group_policy_overrides |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/org_group_policy_overrides |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/org_group_policy_overrides      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/org_group_policy_overrides      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/org_group_policy_overrides     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/org_group_policy_overrides |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/org_group_policy_overrides |

### Overview

Create a new policy override for an organization within an org group. This endpoint requires the `org_group_write` permission.

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field     | Field                              | Type   | Description                                                                                 |
| ---------------- | ---------------------------------- | ------ | ------------------------------------------------------------------------------------------- |
|                  | data [*required*]             | object | Data for creating an org group policy override.                                             |
| data             | attributes [*required*]       | object | Attributes for creating a policy override.                                                  |
| attributes       | org_site [*required*]         | string | The site of the organization.                                                               |
| attributes       | org_uuid [*required*]         | uuid   | The UUID of the organization to grant the override.                                         |
| data             | relationships [*required*]    | object | Relationships for creating a policy override.                                               |
| relationships    | org_group [*required*]        | object | Relationship to a single org group.                                                         |
| org_group        | data [*required*]             | object | A reference to an org group.                                                                |
| data             | id [*required*]               | uuid   | The ID of the org group.                                                                    |
| data             | type [*required*]             | enum   | Org groups resource type. Allowed enum values: `org_groups`                                 |
| relationships    | org_group_policy [*required*] | object | Relationship to a single org group policy.                                                  |
| org_group_policy | data [*required*]             | object | A reference to an org group policy.                                                         |
| data             | id [*required*]               | uuid   | The ID of the policy.                                                                       |
| data             | type [*required*]             | enum   | Org group policies resource type. Allowed enum values: `org_group_policies`                 |
| data             | type [*required*]             | enum   | Org group policy overrides resource type. Allowed enum values: `org_group_policy_overrides` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "org_site": "datadoghq.com",
      "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"
    },
    "relationships": {
      "org_group": {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
          "type": "org_groups"
        }
      },
      "org_group_policy": {
        "data": {
          "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
          "type": "org_group_policies"
        }
      }
    },
    "type": "org_group_policy_overrides"
  }
}
```

{% /tab %}

### Response

{% tab title="201" %}
Created
{% tab title="Model" %}
Response containing a single org group policy override.

| Parent field     | Field                         | Type      | Description                                                                                 |
| ---------------- | ----------------------------- | --------- | ------------------------------------------------------------------------------------------- |
|                  | data [*required*]        | object    | An org group policy override resource.                                                      |
| data             | attributes [*required*]  | object    | Attributes of an org group policy override.                                                 |
| attributes       | content                       | object    | The override content as key-value pairs.                                                    |
| attributes       | created_at [*required*]  | date-time | Timestamp when the override was created.                                                    |
| attributes       | modified_at [*required*] | date-time | Timestamp when the override was last modified.                                              |
| attributes       | org_site [*required*]    | string    | The site of the organization that has the override.                                         |
| attributes       | org_uuid [*required*]    | uuid      | The UUID of the organization that has the override.                                         |
| data             | id [*required*]          | uuid      | The ID of the policy override.                                                              |
| data             | relationships                 | object    | Relationships of an org group policy override.                                              |
| relationships    | org_group                     | object    | Relationship to a single org group.                                                         |
| org_group        | data [*required*]        | object    | A reference to an org group.                                                                |
| data             | id [*required*]          | uuid      | The ID of the org group.                                                                    |
| data             | type [*required*]        | enum      | Org groups resource type. Allowed enum values: `org_groups`                                 |
| relationships    | org_group_policy              | object    | Relationship to a single org group policy.                                                  |
| org_group_policy | data [*required*]        | object    | A reference to an org group policy.                                                         |
| data             | id [*required*]          | uuid      | The ID of the policy.                                                                       |
| data             | type [*required*]        | enum      | Org group policies resource type. Allowed enum values: `org_group_policies`                 |
| data             | type [*required*]        | enum      | Org group policy overrides resource type. Allowed enum values: `org_group_policy_overrides` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "content": {},
      "created_at": "2024-01-15T10:30:00Z",
      "modified_at": "2024-01-15T10:30:00Z",
      "org_site": "datadoghq.com",
      "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"
    },
    "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321",
    "relationships": {
      "org_group": {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
          "type": "org_groups"
        }
      },
      "org_group_policy": {
        "data": {
          "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
          "type": "org_group_policies"
        }
      }
    },
    "type": "org_group_policy_overrides"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="409" %}
Conflict
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_group_policy_overrides" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "org_site": "datadoghq.com",
      "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"
    },
    "relationships": {
      "org_group": {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
          "type": "org_groups"
        }
      },
      "org_group_policy": {
        "data": {
          "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
          "type": "org_group_policies"
        }
      }
    },
    "type": "org_group_policy_overrides"
  }
}
EOF
                
{% /tab %}

## Update an org group policy override{% #update-an-org-group-policy-override %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                                                         |
| ----------------- | ---------------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v2/org_group_policy_overrides/{org_group_policy_override_id} |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v2/org_group_policy_overrides/{org_group_policy_override_id} |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v2/org_group_policy_overrides/{org_group_policy_override_id}      |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v2/org_group_policy_overrides/{org_group_policy_override_id}      |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v2/org_group_policy_overrides/{org_group_policy_override_id}     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v2/org_group_policy_overrides/{org_group_policy_override_id} |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v2/org_group_policy_overrides/{org_group_policy_override_id} |

### Overview

Update an existing organization group policy override. This endpoint requires the `org_group_write` permission.

### Arguments

#### Path Parameters

| Name                                           | Type   | Description                              |
| ---------------------------------------------- | ------ | ---------------------------------------- |
| org_group_policy_override_id [*required*] | string | The ID of the org group policy override. |

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field | Field                        | Type   | Description                                                                                 |
| ------------ | ---------------------------- | ------ | ------------------------------------------------------------------------------------------- |
|              | data [*required*]       | object | Data for updating a policy override.                                                        |
| data         | attributes [*required*] | object | Attributes for updating a policy override.                                                  |
| attributes   | org_site [*required*]   | string | The site of the organization.                                                               |
| attributes   | org_uuid [*required*]   | uuid   | The UUID of the organization.                                                               |
| data         | id [*required*]         | uuid   | The ID of the policy override.                                                              |
| data         | type [*required*]       | enum   | Org group policy overrides resource type. Allowed enum values: `org_group_policy_overrides` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "org_site": "datadoghq.com",
      "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"
    },
    "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321",
    "type": "org_group_policy_overrides"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a single org group policy override.

| Parent field     | Field                         | Type      | Description                                                                                 |
| ---------------- | ----------------------------- | --------- | ------------------------------------------------------------------------------------------- |
|                  | data [*required*]        | object    | An org group policy override resource.                                                      |
| data             | attributes [*required*]  | object    | Attributes of an org group policy override.                                                 |
| attributes       | content                       | object    | The override content as key-value pairs.                                                    |
| attributes       | created_at [*required*]  | date-time | Timestamp when the override was created.                                                    |
| attributes       | modified_at [*required*] | date-time | Timestamp when the override was last modified.                                              |
| attributes       | org_site [*required*]    | string    | The site of the organization that has the override.                                         |
| attributes       | org_uuid [*required*]    | uuid      | The UUID of the organization that has the override.                                         |
| data             | id [*required*]          | uuid      | The ID of the policy override.                                                              |
| data             | relationships                 | object    | Relationships of an org group policy override.                                              |
| relationships    | org_group                     | object    | Relationship to a single org group.                                                         |
| org_group        | data [*required*]        | object    | A reference to an org group.                                                                |
| data             | id [*required*]          | uuid      | The ID of the org group.                                                                    |
| data             | type [*required*]        | enum      | Org groups resource type. Allowed enum values: `org_groups`                                 |
| relationships    | org_group_policy              | object    | Relationship to a single org group policy.                                                  |
| org_group_policy | data [*required*]        | object    | A reference to an org group policy.                                                         |
| data             | id [*required*]          | uuid      | The ID of the policy.                                                                       |
| data             | type [*required*]        | enum      | Org group policies resource type. Allowed enum values: `org_group_policies`                 |
| data             | type [*required*]        | enum      | Org group policy overrides resource type. Allowed enum values: `org_group_policy_overrides` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "content": {},
      "created_at": "2024-01-15T10:30:00Z",
      "modified_at": "2024-01-15T10:30:00Z",
      "org_site": "datadoghq.com",
      "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"
    },
    "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321",
    "relationships": {
      "org_group": {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
          "type": "org_groups"
        }
      },
      "org_group_policy": {
        "data": {
          "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
          "type": "org_group_policies"
        }
      }
    },
    "type": "org_group_policy_overrides"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport org_group_policy_override_id="9f8e7d6c-5b4a-3210-fedc-ba0987654321"\# Curl commandcurl -X PATCH "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_group_policy_overrides/${org_group_policy_override_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "org_site": "datadoghq.com",
      "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"
    },
    "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321",
    "type": "org_group_policy_overrides"
  }
}
EOF
                
{% /tab %}

## Delete an org group policy override{% #delete-an-org-group-policy-override %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                                                          |
| ----------------- | ----------------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | DELETE https://api.ap1.datadoghq.com/api/v2/org_group_policy_overrides/{org_group_policy_override_id} |
| ap2.datadoghq.com | DELETE https://api.ap2.datadoghq.com/api/v2/org_group_policy_overrides/{org_group_policy_override_id} |
| app.datadoghq.eu  | DELETE https://api.datadoghq.eu/api/v2/org_group_policy_overrides/{org_group_policy_override_id}      |
| app.ddog-gov.com  | DELETE https://api.ddog-gov.com/api/v2/org_group_policy_overrides/{org_group_policy_override_id}      |
| app.datadoghq.com | DELETE https://api.datadoghq.com/api/v2/org_group_policy_overrides/{org_group_policy_override_id}     |
| us3.datadoghq.com | DELETE https://api.us3.datadoghq.com/api/v2/org_group_policy_overrides/{org_group_policy_override_id} |
| us5.datadoghq.com | DELETE https://api.us5.datadoghq.com/api/v2/org_group_policy_overrides/{org_group_policy_override_id} |

### Overview

Delete an organization group policy override by its ID. This endpoint requires the `org_group_write` permission.

### Arguments

#### Path Parameters

| Name                                           | Type   | Description                              |
| ---------------------------------------------- | ------ | ---------------------------------------- |
| org_group_policy_override_id [*required*] | string | The ID of the org group policy override. |

### Response

{% tab title="204" %}
No Content
{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport org_group_policy_override_id="9f8e7d6c-5b4a-3210-fedc-ba0987654321"\# Curl commandcurl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_group_policy_overrides/${org_group_policy_override_id}" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## List org group policy configs{% #list-org-group-policy-configs %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                      |
| ----------------- | ----------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/org_group_policy_configs |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/org_group_policy_configs |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/org_group_policy_configs      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/org_group_policy_configs      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/org_group_policy_configs     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/org_group_policy_configs |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/org_group_policy_configs |

### Overview

List all org configs that are eligible to be used as organization group policies. This endpoint requires the `org_group_read` permission.

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a list of org group policy configs.

| Parent field | Field                            | Type     | Description                                                                             |
| ------------ | -------------------------------- | -------- | --------------------------------------------------------------------------------------- |
|              | data [*required*]           | [object] | An array of org group policy configs.                                                   |
| data         | attributes [*required*]     | object   | Attributes of an org group policy config.                                               |
| attributes   | allowed_values [*required*] | [string] | The allowed values for this config.                                                     |
| attributes   | default_value [*required*]  |          | The default value for this config.                                                      |
| attributes   | description [*required*]    | string   | The description of the policy config.                                                   |
| attributes   | name [*required*]           | string   | The name of the policy config.                                                          |
| attributes   | value_type [*required*]     | string   | The type of the value for this config.                                                  |
| data         | id [*required*]             | string   | The identifier of the policy config (uses the config name).                             |
| data         | type [*required*]           | enum     | Org group policy configs resource type. Allowed enum values: `org_group_policy_configs` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "allowed_values": [
          "UTC",
          "US/Eastern",
          "US/Pacific"
        ],
        "default_value": "UTC",
        "description": "The default timezone for monitors.",
        "name": "monitor_timezone",
        "value_type": "string"
      },
      "id": "monitor_timezone",
      "type": "org_group_policy_configs"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/org_group_policy_configs" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}
