|docs
Start Trial

Create an enrichment schema

Creates an enrichment schema. Provide a JSON body to define the schema explicitly (returns 201), or upload a CSV file as multipart/form-data or text/csv to auto-generate a schema from the file's columns — the first column becomes a query field and the rest become enriched fields (returns 202 once the file is accepted for processing). A schema must include 1-3 query fields and at least one enriched field, up to 25 fields total, with unique (case-insensitive) field names. Schemas created through the API are always CSV, and an account may have at most 25 CSV schemas. CSV uploads are limited to 10 MB.

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

Authorization<token>

The API Key with format Token token=<API_KEY>

In: header

Query Parameters

filename?string

The filename for the CSV content. Required when creating a schema from a text/csv body; optional for text/csv record uploads. Ignored for multipart/form-data and JSON requests.

Header Parameters

Accept*string

The Accept header is used as a versioning header.

Default"application/vnd.pagerduty+json;version=2"
Content-Type*"application/json"
Default"application/json"

Value in

  • "application/json"

Request Body

The enrichment schema to create. Provide a JSON body to define the schema explicitly, or upload a CSV file (as multipart/form-data or text/csv) to auto-generate a schema in which the first column becomes the query field and the remaining columns become enriched fields. CSV uploads are limited to 10 MB.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json