Schemas
Update schema
Update the name, description, or column definitions of a schema.
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" },
],
});
updated = 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"},
],
)
curl -X PUT "https://hub.banditshq.com/api/v1/schemas/schema_abc123" \
-H "Authorization: Bearer lasso_..." \
-H "Content-Type: application/json" \
-d '{
"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
string
required
The unique identifier of the schema.
Request body
All fields are optional. Only provided fields are updated.string
New name for the schema.
string
New description.
boolean
Whether this should be the default schema.
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" },
],
});
updated = 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"},
],
)
curl -X PUT "https://hub.banditshq.com/api/v1/schemas/schema_abc123" \
-H "Authorization: Bearer lasso_..." \
-H "Content-Type: application/json" \
-d '{
"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.
⌘I
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" },
],
});
updated = 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"},
],
)
curl -X PUT "https://hub.banditshq.com/api/v1/schemas/schema_abc123" \
-H "Authorization: Bearer lasso_..." \
-H "Content-Type: application/json" \
-d '{
"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"
}

