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

# Mark an Event Enrichment as the account default

`PUT https://api.pagerduty.com/enrichment/event_enrichments/default`

Event Enrichments allow you to automatically add contextual data to events as they're ingested, so that relevant information is available throughout the event, alert, and incident lifecycle. By leveraging the Contextual Data Platform (CDP), you can define rules that extract values from events or query enrichment schemas to populate event fields.

The default Event Enrichment gets applied to every Event Orchestration or Service that is not already associated to any other Event Enrichment

<!-- theme: warning -->

> ### Early Access
> This API is in Early Access and may change at any time. Contact your PagerDuty account team to request access.

Mark a specific Event Enrichment as the account default. Set the request body to `default: null` to clear the current default.

## Authorization

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

## 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`) — required

The Event Enrichment to set as the account default. Set to `default: null` to clear the current default.

| Field | Type | Required | Description |
|---|---|---|---|
| `default` | object, nullable |  |  |
| `default.id` | string |  | The ID of the Event Enrichment. |
| `default.type` | string |  | A string that determines the schema of the object. One of: `event_enrichment_reference`. |
| `default.summary` | string |  | 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. |
| `default.self` | string (url) |  | The API show URL at which the object is accessible. Read-only. |

Example: Set a new account default

```json
{
  "default": {
    "id": "AGN4PVDO2F5AZIVWETZ42I6IP4",
    "type": "event_enrichment_reference"
  }
}
```

Example: Clear the current account default

```json
{
  "default": null
}
```

## Response 200

The updated account default Event Enrichment.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `default` | object, nullable |  | The current account default Event Enrichment. Null if no default is set. |
| `default.id` | string |  | The ID of the Event Enrichment. |
| `default.type` | string |  | A string that determines the schema of the object. One of: `event_enrichment_reference`. |
| `default.summary` | string |  | 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. |
| `default.self` | string (url) |  | The API show URL at which the object is accessible. Read-only. |
| `previous_default` | object, nullable |  | The previous account default Event Enrichment, if one was replaced. Only present after a PUT request. |
| `previous_default.id` | string |  | The ID of the Event Enrichment. |
| `previous_default.type` | string |  | A string that determines the schema of the object. One of: `event_enrichment_reference`. |
| `previous_default.summary` | string |  | 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. |
| `previous_default.self` | string (url) |  | The API show URL at which the object is accessible. Read-only. |

Example: New default set, no previous default existed

```json
{
  "default": {
    "id": "AGN4PVDO2F5AZIVWETZ42I6IP4",
    "type": "event_enrichment_reference",
    "summary": "My enrichment name",
    "self": "https://api.pagerduty.com/enrichment/event_enrichments/AGN4PVDO2F5AZIVWETZ42I6IP4"
  },
  "previous_default": null
}
```

Example: New default set, replacing a previous default

```json
{
  "default": {
    "id": "AGN4PVDO2F5AZIVWETZ42I6IP4",
    "type": "event_enrichment_reference",
    "summary": "My enrichment name",
    "self": "https://api.pagerduty.com/enrichment/event_enrichments/AGN4PVDO2F5AZIVWETZ42I6IP4"
  },
  "previous_default": {
    "id": "AGN6ZO345532XBOFCBX6OVTQ6Y",
    "type": "event_enrichment_reference",
    "summary": "The old enrichment",
    "self": "https://api.pagerduty.com/enrichment/event_enrichments/AGN6ZO345532XBOFCBX6OVTQ6Y"
  }
}
```

Example: Default cleared

```json
{
  "default": null,
  "previous_default": {
    "id": "AGN6ZO345532XBOFCBX6OVTQ6Y",
    "type": "event_enrichment_reference",
    "summary": "The old enrichment",
    "self": "https://api.pagerduty.com/enrichment/event_enrichments/AGN6ZO345532XBOFCBX6OVTQ6Y"
  }
}
```

## 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. |

## Response 500

Internal Server Error the PagerDuty server experienced an error.

### `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).
