Skip to main content
PUT
/
v1
/
schemas
/
{schema_id}
const updated = await client.schemas.update("schema_abc123", {
  name: "Updated Electronics Schema",
  columns: [
    { key: "product_name", label: "Product Name", type: "text", required: true },
    { key: "price", label: "Price (USD)", type: "number" },
    { key: "brand", label: "Brand", type: "text" },
    { key: "weight_kg", label: "Weight (kg)", type: "number" },
  ],
});
{
  "id": "schema_abc123",
  "name": "Electronics Catalog",
  "description": "Schema for consumer electronics",
  "is_default": false,
  "columns": [
    { "key": "product_name", "label": "Product Name", "type": "text", "required": true },
    { "key": "price", "label": "Price", "type": "number" }
  ],
  "created_at": "2025-03-01T10:00:00.000Z",
  "updated_at": "2025-03-01T10:00:00.000Z"
}

Path parameters

schema_id
string
required
The unique identifier of the schema.

Request body

All fields are optional. Only provided fields are updated.
name
string
New name for the schema.
description
string
New description.
is_default
boolean
Whether this should be the default schema.
columns
array
Updated column definitions. Replaces the entire column list. Must be a non-empty array with valid column objects.

Response

Returns the full updated schema object (same shape as Get schema).
const updated = await client.schemas.update("schema_abc123", {
  name: "Updated Electronics Schema",
  columns: [
    { key: "product_name", label: "Product Name", type: "text", required: true },
    { key: "price", label: "Price (USD)", type: "number" },
    { key: "brand", label: "Brand", type: "text" },
    { key: "weight_kg", label: "Weight (kg)", type: "number" },
  ],
});
{
  "id": "schema_abc123",
  "name": "Electronics Catalog",
  "description": "Schema for consumer electronics",
  "is_default": false,
  "columns": [
    { "key": "product_name", "label": "Product Name", "type": "text", "required": true },
    { "key": "price", "label": "Price", "type": "number" }
  ],
  "created_at": "2025-03-01T10:00:00.000Z",
  "updated_at": "2025-03-01T10:00:00.000Z"
}
Updating columns replaces the entire column definition. Include all columns you want to keep, not just the changes.