---
title: Create or update entity integration configuration
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Entity Integration Configs
---

# Create or update entity integration configuration{% #create-or-update-entity-integration-configuration %}

{% 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 | PUT https://api.ap1.datadoghq.com/api/v2/idp/entity_integrations/{integration_id} |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v2/idp/entity_integrations/{integration_id} |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v2/idp/entity_integrations/{integration_id}      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v2/idp/entity_integrations/{integration_id}      |
| us2.ddog-gov.com  | PUT https://api.us2.ddog-gov.com/api/v2/idp/entity_integrations/{integration_id}  |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v2/idp/entity_integrations/{integration_id}     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v2/idp/entity_integrations/{integration_id} |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v2/idp/entity_integrations/{integration_id} |

### Overview



Create or replace the configuration for a given integration in the caller's organization. The shape of `data.attributes.config` depends on the integration:

- For `github`: `config` must contain an `enabled_repos` array of objects with `hostname`, `github_org_name`, and `repo_name`.
- For `jira`: `config` must contain an `enabled_projects` array of objects with `hostname`, `account_id`, and `project_key`.
- For `pagerduty`: `config` must contain an `accounts` array of objects with a required `enabled` boolean and an optional `subdomain` string.
This endpoint requires the `integrations_read` permission.


### Arguments

#### Path Parameters

| Name                             | Type   | Description                                                                                                                     |
| -------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------- |
| integration_id [*required*] | string | The identifier of the integration whose configuration is being managed. Supported values are `github`, `jira`, and `pagerduty`. |

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field | Field                        | Type   | Description                                                                                                                                                                                                                                                                                                      |
| ------------ | ---------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|              | data [*required*]       | object | JSON:API resource object used in a request to create or update an entity integration configuration.                                                                                                                                                                                                              |
| data         | attributes [*required*] | object | Attributes used to create or update an entity integration configuration.                                                                                                                                                                                                                                         |
| attributes   | config [*required*]     | object | Integration-specific configuration payload. The shape of this object depends on the integration identified by the path parameter. For `github`, the object must contain an `enabled_repos` array. For `jira`, it must contain an `enabled_projects` array. For `pagerduty`, it must contain an `accounts` array. |
| data         | type [*required*]       | enum   | JSON:API resource type for the entity integration configuration create or update request. Always `entity_integration_config_requests`. Allowed enum values: `entity_integration_config_requests`                                                                                                                 |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "config": {
        "enabled_repos": [
          {
            "github_org_name": "myorg",
            "hostname": "github.com",
            "repo_name": "myrepo"
          }
        ]
      }
    },
    "type": "entity_integration_config_requests"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}

| Parent field | Field                            | Type   | Description                                                                                                                                                                                                                                                                                                      |
| ------------ | -------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|              | data [*required*]           | object | JSON:API resource object for an entity integration configuration.                                                                                                                                                                                                                                                |
| data         | attributes [*required*]     | object | The organization ID, integration identifier, and integration-specific configuration payload for an entity integration configuration.                                                                                                                                                                             |
| attributes   | config [*required*]         | object | Integration-specific configuration payload. The shape of this object depends on the integration identified by the path parameter. For `github`, the object must contain an `enabled_repos` array. For `jira`, it must contain an `enabled_projects` array. For `pagerduty`, it must contain an `accounts` array. |
| attributes   | integration_id [*required*] | string | The identifier of the integration this configuration applies to (for example, `github`, `jira`, or `pagerduty`).                                                                                                                                                                                                 |
| attributes   | org_id [*required*]         | int64  | The Datadog organization identifier that owns this configuration.                                                                                                                                                                                                                                                |
| data         | id [*required*]             | string | Unique identifier of the entity integration configuration.                                                                                                                                                                                                                                                       |
| data         | type [*required*]           | enum   | JSON:API resource type for an entity integration configuration. Always `entity_integration_configs`. Allowed enum values: `entity_integration_configs`                                                                                                                                                           |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "config": {
        "enabled_repos": [
          {
            "github_org_name": "myorg",
            "hostname": "github.com",
            "repo_name": "myrepo"
          }
        ]
      },
      "integration_id": "github",
      "org_id": 1234
    },
    "id": "01HJABCD12345678ABCDEFGHIJ",
    "type": "entity_integration_configs"
  }
}
```

{% /tab %}

{% tab title="Model" %}
JSON:API document containing a single entity integration configuration resource.

| Parent field | Field                            | Type   | Description                                                                                                                                                                                                                                                                                                      |
| ------------ | -------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|              | data [*required*]           | object | JSON:API resource object for an entity integration configuration.                                                                                                                                                                                                                                                |
| data         | attributes [*required*]     | object | The organization ID, integration identifier, and integration-specific configuration payload for an entity integration configuration.                                                                                                                                                                             |
| attributes   | config [*required*]         | object | Integration-specific configuration payload. The shape of this object depends on the integration identified by the path parameter. For `github`, the object must contain an `enabled_repos` array. For `jira`, it must contain an `enabled_projects` array. For `pagerduty`, it must contain an `accounts` array. |
| attributes   | integration_id [*required*] | string | The identifier of the integration this configuration applies to (for example, `github`, `jira`, or `pagerduty`).                                                                                                                                                                                                 |
| attributes   | org_id [*required*]         | int64  | The Datadog organization identifier that owns this configuration.                                                                                                                                                                                                                                                |
| data         | id [*required*]             | string | Unique identifier of the entity integration configuration.                                                                                                                                                                                                                                                       |
| data         | type [*required*]           | enum   | JSON:API resource type for an entity integration configuration. Always `entity_integration_configs`. Allowed enum values: `entity_integration_configs`                                                                                                                                                           |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "config": {
        "enabled_repos": [
          {
            "github_org_name": "myorg",
            "hostname": "github.com",
            "repo_name": "myrepo"
          }
        ]
      },
      "integration_id": "github",
      "org_id": 1234
    },
    "id": "01HJABCD12345678ABCDEFGHIJ",
    "type": "entity_integration_configs"
  }
}
```

{% /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="403" %}
Not Authorized
{% 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 %}

{% 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

##### 
                  \## GitHub integration configuration
# 
 \# Path parameters export integration_id="github" \# Curl command curl -X PUT "https://api.datadoghq.com/api/v2/idp/entity_integrations/${integration_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": {
      "config": {
        "enabled_repos": [
          {
            "github_org_name": "myorg",
            "hostname": "github.com",
            "repo_name": "myrepo"
          }
        ]
      }
    },
    "type": "entity_integration_config_requests"
  }
}
EOF \## Jira integration configuration
# 
 \# Path parameters export integration_id="github" \# Curl command curl -X PUT "https://api.datadoghq.com/api/v2/idp/entity_integrations/${integration_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": {
      "config": {
        "enabled_projects": [
          {
            "account_id": "123456789",
            "hostname": "mycompany.atlassian.net",
            "project_key": "AAA"
          }
        ]
      }
    },
    "type": "entity_integration_config_requests"
  }
}
EOF \## PagerDuty integration configuration
# 
 \# Path parameters export integration_id="github" \# Curl command curl -X PUT "https://api.datadoghq.com/api/v2/idp/entity_integrations/${integration_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": {
      "config": {
        "accounts": [
          {
            "enabled": true,
            "subdomain": "mycompany"
          }
        ]
      }
    },
    "type": "entity_integration_config_requests"
  }
}
EOF 
                
{% /tab %}
