> Documentation index for AI agents: https://docs.pagerduty.com/llms.txt

# Update an existing integration

`PUT https://api.pagerduty.com/services/{id}/integrations/{integration_id}`

Update an integration belonging to a Service.

A service may represent an application, component, or team you wish to open incidents against.

For more information see the [API Concepts Document](https://docs.pagerduty.com/developer/api-concepts#services)

Scoped OAuth requires: `services.write`

## Authorization

- **api_key** (apiKey) — `Authorization` header. The API Key with format `Token token=<API_KEY>`

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | The ID of the resource. |
| `integration_id` | string | yes | The integration ID on the service. |

## Header parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `Accept` | string | yes | The `Accept` header is used as a versioning header. Default: `application/vnd.pagerduty+json;version=2`. |

## Request body (`application/json`)

The integration to be updated

| Field | Type | Required | Description |
|---|---|---|---|
| `integration` | object | yes |  |
| `integration.id` | string |  | Read-only. |
| `integration.summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `integration.type` | string |  | One of: `aws_cloudwatch_inbound_integration`, `cloudkick_inbound_integration`, `event_transformer_api_inbound_integration`, `generic_email_inbound_integration`, `generic_events_api_inbound_integration`, `keynote_inbound_integration`, `nagios_inbound_integration`, `pingdom_inbound_integration`, `sql_monitor_inbound_integration`, `events_api_v2_inbound_integration`. |
| `integration.self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `integration.html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `integration.name` | string |  | The name of this integration. |
| `integration.service` | object |  |  |
| `integration.service.id` | string | yes | Read-only. |
| `integration.service.summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `integration.service.type` | string | yes | One of: `service_reference`. |
| `integration.service.self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `integration.service.html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `integration.created_at` | string (date-time) |  | The date/time when this integration was created. Read-only. |
| `integration.vendor` | object |  |  |
| `integration.vendor.id` | string | yes | Read-only. |
| `integration.vendor.summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `integration.vendor.type` | string | yes | One of: `vendor_reference`. |
| `integration.vendor.self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `integration.vendor.html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `integration.integration_email` | string |  | Specify for generic_email_inbound_integration. Must be set to an email address @your-subdomain.pagerduty.com. |
| `integration.email_incident_creation` | string |  | Specify for generic_email_inbound_integration. One of: `on_new_email`, `on_new_email_subject`, `only_if_no_open_incidents`, `use_rules`. |
| `integration.email_filter_mode` | string |  | Specify for generic_email_inbound_integration. May override email_incident_creation. One of: `all-email`, `or-rules-email`, `and-rules-email`. |
| `integration.email_parsers` | array of object |  | Specify for generic_email_inbound_integration. Min items: 1. Items must be unique. |
| `integration.email_parsers[].action` | string | yes | One of: `trigger`, `resolve`. |
| `integration.email_parsers[].match_predicate` | object | yes |  |
| `integration.email_parsers[].match_predicate.type` | string | yes | One of: `all`, `any`, `not`, `contains`, `exactly`, `regex`. |
| `integration.email_parsers[].match_predicate.matcher` | string |  | Required if the type is `contains`, `exactly` or `regex`. Min length: 1. |
| `integration.email_parsers[].match_predicate.part` | string | yes | The email field that will attempt to use the matcher expression. Required if the type is `contains`, `exactly` or `regex`. One of: `body`, `subject`, `from_addresses`. |
| `integration.email_parsers[].match_predicate.children` | array of MatchPredicate (recursive) | yes | Additional matchers to be run. Must be not empty if the type is `all`, `any`, or `not`. |
| `integration.email_parsers[].value_extractors` | array of object |  | Additional values that will be pulled in to the Incident object. Exactly one value extractor must have a `value_name` of `incident_key`. Min items: 1. Items must be unique. |
| `integration.email_parsers[].value_extractors[].type` | string | yes | One of: `entire`, `regex`, `between`. |
| `integration.email_parsers[].value_extractors[].part` | string | yes | One of: `body`, `subject`, `from_addresses`. |
| `integration.email_parsers[].value_extractors[].value_name` | string | yes | The field name to set in the Incident object. Exactly one must use the `value_name` of `incident_key` Min length: 1. |
| `integration.email_parsers[].value_extractors[].regex` | string |  |  |
| `integration.email_parsers[].value_extractors[].starts_after` | string |  |  |
| `integration.email_parsers[].value_extractors[].ends_with` | string |  |  |
| `integration.email_parsing_fallback` | string |  | Specify for generic_email_inbound_integration. One of: `open_new_incident`, `discard`. |
| `integration.email_filters` | array of object |  | Specify for generic_email_inbound_integration. Min items: 1. Items must be unique. |
| `integration.email_filters[].subject_mode` | string | yes | One of: `match`, `no-match`, `always`. |
| `integration.email_filters[].subject_regex` | string |  | Specify if subject_mode is set to match or no-match. |
| `integration.email_filters[].body_mode` | string | yes | One of: `match`, `no-match`, `always`. |
| `integration.email_filters[].body_regex` | string |  | Specify if body_mode is set to match or no-match. |
| `integration.email_filters[].from_email_mode` | string | yes | One of: `match`, `no-match`, `always`. |
| `integration.email_filters[].from_email_regex` | string |  | Specify if from_email_mode is set to match or no-match. |

Example: Request Example

```json
{
  "integration": {
    "type": "generic_email_inbound_integration",
    "name": "Email",
    "service": {
      "id": "PQL78HM",
      "type": "service_reference",
      "summary": "My Email-Based Integration",
      "self": "https://api.pagerduty.com/services/PQL78HM",
      "html_url": "https://subdomain.pagerduty.com/service-directory/PQL78HM"
    },
    "integration_email": "my-email-based-integration@subdomain.pagerduty.com",
    "vendor": {
      "type": "vendor_reference",
      "id": "PZD94QK"
    }
  }
}
```

## Response 200

The integration that was updated.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `integration` | object | yes | Same fields as `integration` above. |

Example: Response Example

```json
{
  "integration": {
    "id": "PE1U9CH",
    "type": "generic_email_inbound_integration",
    "summary": "Email",
    "self": "https://api.pagerduty.com/services/PQL78HM/integrations/PE1U9CH",
    "html_url": "https://subdomain.pagerduty.com/services/PQL78HM/integrations/PE1U9CH",
    "name": "Email",
    "service": {
      "id": "PQL78HM",
      "type": "service_reference",
      "summary": "My Email-Based Integration",
      "self": "https://api.pagerduty.com/services/PQL78HM",
      "html_url": "https://subdomain.pagerduty.com/service-directory/PQL78HM"
    },
    "created_at": "2015-10-14T13:33:02-07:00",
    "integration_email": "my-email-based-integration@subdomain.pagerduty.com"
  }
}
```

## Response 400

Caller provided invalid arguments. Please review the response for error details. Retrying with the same arguments will *not* work.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 401

Caller did not supply credentials or did not provide the correct credentials.
If you are using an API key, it may be invalid or your Authorization header may be malformed.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 403

Caller is not authorized to view the requested resource.
While your authentication is valid, the authenticated user or token does not have permission to perform this action.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 404

The requested resource was not found.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 429

Too many requests have been made, the rate limit has been reached.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Developer Agreement

Your access to and use of the PagerDuty Developer Services is governed by the [PagerDuty Developer Agreement](https://docs.pagerduty.com/developer/pagerduty-developer-agreement).
