---
title: "create_extraction_schema"
method: POST
path: "/v1/extraction-schemas"
tags: ["extraction-schemas"]
---

# create_extraction_schema

`POST /v1/extraction-schemas`

## Request

- Base URL: `https://ndi-api.nace.ai`
- URL: `https://ndi-api.nace.ai/v1/extraction-schemas`
- Auth: API key in header `X-API-Key`
- TypeScript: <https://skmtc.dev/nace/apis/ndi-platform-api/docs/v1/extraction-schemas/post.ts> (a function with typed inputs; its response is checked against the schema)

Create version 1 of a new tenant-owned schema family with a generated ``sch_...`` id.

## Request body

- CreateExtractionSchemaRequest: Create version 1 of a new schema family with a server-generated id.
  - `description` string, nullable
  - `name` string, required
  - `schema` object, required

## Response `201`

Successful Response

- ExtractionSchema: One immutable schema version, including the frozen JSON Schema body.
  - `created_at` string, date-time, required
  - `description` string, nullable
  - `name` string, required
  - `owner` 'platform' | 'tenant', required
  - `schema` object, required
  - `schema_id` string, required
  - `updated_at` string, date-time, required
  - `version` integer, required

## Other responses

- `504`: Gateway Timeout
- `default`: Typed error envelope used by every 4xx and 5xx. ``error.code`` distinguishes the failure; HTTP status is a consequence of the code.

---

[API](https://skmtc.dev/nace/apis/ndi-platform-api.md) - [All operations](https://skmtc.dev/nace/apis/ndi-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nace/apis/ndi-platform-api/revisions/d002a3589a67?raw)
