---
title: "Upload CSV records"
method: POST
path: "/enrichment/schemas/{schema_id}/records"
tags: ["Enrichment Schemas"]
---

# Upload CSV records

`POST /enrichment/schemas/{schema_id}/records`

## Request

- Base URL: `https://api.pagerduty.com`
- URL: `https://api.pagerduty.com/enrichment/schemas/{schema_id}/records`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/pagerduty/apis/rest-api/docs/enrichment/schemas/:schema_id/records/post.ts> (a function with typed inputs; its response is checked against the schema)

Uploads a CSV file of enrichment records into an existing schema, as `multipart/form-data` or `text/csv`. The file is accepted for asynchronous processing (returns `202`) and is limited to 10 MB. The CSV columns must align with the schema's fields: missing columns result in empty values and extra columns are ignored. Records are keyed by their query-field values, so uploading a row whose query values match an existing record updates that record.

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

## Path parameters

- `schema_id` string, uuid, required

## Query parameters

- `filename` string

## Headers

- `Accept` string, required

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: The CSV file to upload (max 10 MB).

## Response `202`

The CSV file was accepted for asynchronous processing.

- object
  - `upload_id` string, uuid: Unique identifier for the CSV upload operation.
  - `schema_id` string, uuid: The schema the CSV data is being uploaded to.
  - `filename` string, nullable: Original filename of the uploaded CSV file.
  - `size_bytes` integer: Size of the uploaded file in bytes.
  - `status` string: Status of the upload operation.
  - `accepted_at` string, date-time: Timestamp when the upload was accepted.

## 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.dev/pagerduty/apis/rest-api.md) - [All operations](https://skmtc.dev/pagerduty/apis/rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pagerduty/apis/rest-api/revisions/b679a8f3f02c?raw)
