Skip to main content

Update Schema

Update an extraction schema with new fields or field types. Each update creates a new version, preserving previous versions for existing extractions.

PUT/v1/schemas/:id

Parameters

ParameterTypeRequiredDescription
idstring (path)YesThe schema ID to update
namestring (body)NoUpdated schema name
fieldsobject (body)YesComplete field map (replaces all fields)

Example

curl -X PUT https://api.talonic.com/v1/schemas/sch_abc123 \
  -H "Authorization: Bearer tlnc_sk_live_7f3a...x9k2" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Invoice Schema v2",
    "fields": {
      "vendor_name": "string",
      "invoice_number": "string",
      "total_amount": "number",
      "due_date": "date",
      "line_items": "array"
    }
  }'

Versioning

Updates create a new version automatically. Existing extractions retain their link to the schema version used during extraction, preserving per-cell provenance integrity. Use re-extract to apply the updated schema.