---
title: "Create"
method: POST
path: "/extraction_schemas"
tags: ["extractionSchemas"]
---

# Create

`POST /extraction_schemas`

Creates a new extraction schema in a project.

## Query parameters

- `project` string

## Headers

- `Authorization` string, required

## Request body

- CreateExtractionSchemaRequest
  - `name` string, required — A name for the extraction schema.
  - `prompt` string, required — Instructions for how to extract data from conversations.
  - `fields` ExtractionField[], required — Array of field definitions.
    - `name` string, required — The field name.
    - `type` 'string' | 'int' | 'float' | 'bool' | 'string[]' | 'int[]' | 'float[]' | 'bool[]', required — The field type.
    - `description` string, nullable, required — Description of the field. May be null, but the property must be present.

## Response `201`

Success response

- ExtractionSchemasCreateResponse201
  - `id` string, required — The ID of the created extraction schema.
  - `name` string, required — The name of the created extraction schema.

## Other responses

- `400` — Invalid parameters
- `404` — Project not found
- `409` — Extraction schema name already exists

---

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