---
title: "Update a schema"
method: PATCH
path: "/v1/schemas/{id}"
tags: ["Schemas"]
---

# Update a schema

`PATCH /v1/schemas/{id}`

## Request

- Base URL: `https://api.talonic.com`
- URL: `https://api.talonic.com/v1/schemas/{id}`
- Auth: HTTP bearer

Partially update a schema. `name` and `description` are patched
independently; omitted keys are left unchanged. If `definition.properties`
or a non-empty `fields` array is provided, all existing fields are
replaced with the new set. `PUT` on this path delegates to the same
handler, so both methods accept the same body and behave identically.
Schemas managed by a Spec document are read-only through the public API
and return `409 Conflict`.

## Path parameters

- `id` string, uuid, required

## Request body

- SchemaUpdateRequest
  - `name` string
  - `description` string, nullable
  - `definition` object
    - `properties` object
    - `required` string[]
  - `fields` object[]: Flat fields array (alternative to `definition.properties`). Each element has at minimum a `field_name`; other attributes are optional.
    - `field_name` string, required
    - `display_name` string
    - `data_type` string
    - `description` string
    - `is_required` boolean

## Response `200`

Schema updated.

- SchemaResponse
  - `id` string, uuid, required
  - `short_id` string: Short form of `id` (`SCH-` + the first 8 hex characters, uppercased). Accepted wherever `{id}` is.
  - `spec_id` string, uuid, nullable: The Spec that authors this schema, or `null` when the schema was created directly (via `POST /v1/schemas` or the legacy editor). This is the id in the Spec editor URL (`/specs/{spec_id}`) and is a DIFFERENT id from the schema `id` above — a Spec is materialized onto a schema, it is not the same record. Use this to cross between the two.
  - `spec_version` integer, nullable: The Spec's published head version — the number shown in the Spec editor. `null` when `spec_id` is `null`, or when the Spec has never been published. Not the same counter as `version` below.
  - `spec_materialized_version` integer, nullable: The Spec version whose configuration is live on this schema — what a run of it actually executes. Normally equal to `spec_version`; it lags when a publish was refused by the acknowledgement gate or a stale activation no-opped. `null` when `spec_id` is `null`.
  - `name` string, required
  - `description` string, nullable
  - `definition` object, required: JSON Schema definition of the extraction target.
    - `type` string
    - `properties` object
    - `required` string[]
  - `field_count` integer
  - `version` integer: Legacy schema-version counter, advanced by the version endpoints (`/v1/schemas/{id}/versions`). A Spec-authored schema never advances it — read `spec_version` for those.
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `links` object
    - `self` string
    - `extractions` string
    - `dashboard` string, uri

## Other responses

- `400`: The request is invalid.
- `401`: Missing or invalid API key.
- `404`: The requested resource was not found.
- `409`: The request conflicts with the current resource state.
- `429`: Daily rate limit exceeded.

---

[API](https://skmtc.dev/talonic/apis/talonic-api.md) · [All operations](https://skmtc.dev/talonic/apis/talonic-api/llms.txt) · [OpenAPI document](https://skmtc.dev/talonic/apis/talonic-api/revisions/678fe5f8c9c3?raw)
