---
title: "Update"
method: PATCH
path: "/extraction_schemas/{nameOrId}"
tags: ["extractionSchemas"]
---

# Update

`PATCH /extraction_schemas/{nameOrId}`

Updates an extraction schema by name or ID.

## Path parameters

- `nameOrId` string, required

## Query parameters

- `project` string

## Headers

- `Authorization` string, required

## Request body

- UpdateExtractionSchemaRequest
  - `name` string — A name for the extraction schema.
  - `prompt` string — Instructions for how to extract data from conversations.
  - `fields` ExtractionField[] — 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 `200`

Success response

- ExtractionSchemasUpdateResponse200
  - `success` boolean, required — Whether the extraction schema was updated successfully.

## Other responses

- `400` — Invalid parameters
- `404` — Extraction schema 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/7f8c81a5a990/schema)
