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

# Query enrichment data

`POST https://api.pagerduty.com/enrichment/query`

Query an enrichment schema for records matching a set of field values. Supply up to 3 query fields; all must match. Returns at most one record for standard schemas, or multiple records for schemas that use a discriminator field.

<!-- theme: warning -->

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

Scoped OAuth requires: `contextual_data.read`

## 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 schema and query field values to match enrichment records against.

| Field | Type | Required | Description |
|---|---|---|---|
| `schema_id` | string (uuid) | yes | The ID of the enrichment schema to query. |
| `query` | array of object | yes | The query field values to match against. Up to 3 query fields may be supplied; all must match. Min items: 1. Max items: 3. |
| `query[].field` | string | yes | The query field name. |
| `query[].value` | string | yes | The value to match for this field. |

Example: Query enrichment data

```json
{
  "schema_id": "9f194d8d-0f58-4c5c-b1d2-a5adf7171821",
  "query": [
    {
      "field": "Application",
      "value": "Authorization"
    },
    {
      "field": "Environment",
      "value": "production"
    }
  ]
}
```

## Response 200

The enrichment records matching the query. Returns 0-1 records for standard schemas, or 0-N records for schemas that use a discriminator field.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `records` | array of object |  | The enrichment records matching the query. |
| `records[].record_id` | string |  | Unique identifier for this enrichment record. Read-only. |
| `records[].type` | string |  | The type of the resource. Read-only. |
| `records[].created_at` | string (date-time) |  | Timestamp when the record was created. Read-only. |
| `records[].enrichment_data` | object |  | The enrichment data for this record, as key-value pairs keyed by field name. |

Example: Example Response

```json
{
  "records": [
    {
      "record_id": "a3b2c1d4e5f6",
      "type": "enrichment_record",
      "created_at": "2026-06-30T15:17:30Z",
      "enrichment_data": {
        "Application": "Authorization",
        "Environment": "production",
        "Manager": "alice@example.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. |

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