---
title: "Query enrichment data"
method: POST
path: "/enrichment/query"
tags: ["Enrichment Schemas"]
---

# Query enrichment data

`POST /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`

## Headers

- `Accept` string, required
- `Content-Type` 'application/json', required

## Request body

- object
  - `schema_id` string, uuid, required — The ID of the enrichment schema to query.
  - `query` object[], required — The query field values to match against. Up to 3 query fields may be supplied; all must match.
    - `field` string, required — The query field name.
    - `value` string, required — The value to match for this field.

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

- object
  - `records` EnrichmentRecord[] — The enrichment records matching the query.
    - `record_id` string — Unique identifier for this enrichment record.
    - `type` string — The type of the resource.
    - `created_at` string, date-time — Timestamp when the record was created.
    - `enrichment_data` object — The enrichment data for this record, as key-value pairs keyed by field name.

## Other responses

- `400` — Caller provided invalid arguments. Please review the response for error details. Retrying with the same arguments will *not* work.
- `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.
- `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.
- `404` — The requested resource was not found.
- `429` — Too many requests have been made, the rate limit has been reached.
- `500` — Internal Server Error the PagerDuty server experienced an error.

---

[API](https://skmtc.net/pagerduty/apis/rest-api.md) · [All operations](https://skmtc.net/pagerduty/apis/rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pagerduty/rest-api/revisions/b679a8f3f02c/schema)
