Add or merge columns
curl --request PATCH \
--url https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/schema \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"properties": {
"product_name": {
"type": "text"
},
"price": {
"type": "double"
},
"stock": {
"type": "integer",
"nullable": true
},
"active": {
"type": "boolean"
},
"released_at": {
"type": "date"
},
"specs": {
"type": "json"
}
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
properties: {
product_name: {type: 'text'},
price: {type: 'double'},
stock: {type: 'integer', nullable: true},
active: {type: 'boolean'},
released_at: {type: 'date'},
specs: {type: 'json'}
}
})
};
fetch('https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/schema', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/schema"
payload = { "properties": {
"product_name": { "type": "text" },
"price": { "type": "double" },
"stock": {
"type": "integer",
"nullable": True
},
"active": { "type": "boolean" },
"released_at": { "type": "date" },
"specs": { "type": "json" }
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){}{
"error": "InvalidArguments",
"message": "<string>"
}Schema
Add or merge columns
Adds new typed columns to an existing collection by merging the provided
properties into the current schema. Existing indexes and unique
constraints are preserved.
PATCH
/
v1
/
collections
/
{collection_id}
/
schema
Add or merge columns
curl --request PATCH \
--url https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/schema \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"properties": {
"product_name": {
"type": "text"
},
"price": {
"type": "double"
},
"stock": {
"type": "integer",
"nullable": true
},
"active": {
"type": "boolean"
},
"released_at": {
"type": "date"
},
"specs": {
"type": "json"
}
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
properties: {
product_name: {type: 'text'},
price: {type: 'double'},
stock: {type: 'integer', nullable: true},
active: {type: 'boolean'},
released_at: {type: 'date'},
specs: {type: 'json'}
}
})
};
fetch('https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/schema', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/schema"
payload = { "properties": {
"product_name": { "type": "text" },
"price": { "type": "double" },
"stock": {
"type": "integer",
"nullable": True
},
"active": { "type": "boolean" },
"released_at": { "type": "date" },
"specs": { "type": "json" }
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){}{
"error": "InvalidArguments",
"message": "<string>"
}Authorizations
BearerAuthOrgApiKeyAuth
User session JWT. Send as Authorization: Bearer <token>.
Path Parameters
Collection identifier returned at creation.
Body
application/json
Column definitions: field name → type descriptor.
Example:
{
"product_name": { "type": "text" },
"price": { "type": "double" },
"stock": { "type": "integer", "nullable": true },
"active": { "type": "boolean" },
"released_at": { "type": "date" },
"specs": { "type": "json" }
}
Response
Updated schema.
The response is of type object.
Was this page helpful?
⌘I