Update collection metadata
curl --request PATCH \
--url https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"settings": {
"ttl_days": 1,
"max_records": 123
},
"agent_ids": [
"agent_123",
"agent_456"
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
settings: {ttl_days: 1, max_records: 123},
agent_ids: ['agent_123', 'agent_456']
})
};
fetch('https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}', 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}"
payload = {
"description": "<string>",
"settings": {
"ttl_days": 1,
"max_records": 123
},
"agent_ids": ["agent_123", "agent_456"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "products",
"description": "<string>",
"owner_id": "<string>",
"owner_type": "user",
"agent_ids": [
"<string>"
],
"orgSlug": "<string>",
"settings": {
"ttl_days": 1,
"max_records": 123
},
"schema": {
"product_name": {
"type": "text"
},
"price": {
"type": "double"
},
"stock": {
"type": "integer",
"nullable": true
},
"active": {
"type": "boolean"
},
"released_at": {
"type": "date"
},
"specs": {
"type": "json"
}
},
"indexes": [
{
"properties": [
"sku"
]
}
],
"uniques": [
{
"properties": [
"sku"
]
}
],
"charts": [
{
"id": "<string>",
"kind": "bar",
"title": "<string>",
"agg": "count",
"field": "<string>",
"dimension": "<string>"
}
],
"row_count": 123,
"status": "ready"
}{
"error": "InvalidArguments",
"message": "<string>"
}Collections
Update collection metadata
Updates the description, settings, or the agent_ids sharing list.
To evolve the schema after creation, use the schema and indexes
endpoints instead.
PATCH
/
v1
/
collections
/
{collection_id}
Update collection metadata
curl --request PATCH \
--url https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"settings": {
"ttl_days": 1,
"max_records": 123
},
"agent_ids": [
"agent_123",
"agent_456"
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
settings: {ttl_days: 1, max_records: 123},
agent_ids: ['agent_123', 'agent_456']
})
};
fetch('https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}', 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}"
payload = {
"description": "<string>",
"settings": {
"ttl_days": 1,
"max_records": 123
},
"agent_ids": ["agent_123", "agent_456"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "products",
"description": "<string>",
"owner_id": "<string>",
"owner_type": "user",
"agent_ids": [
"<string>"
],
"orgSlug": "<string>",
"settings": {
"ttl_days": 1,
"max_records": 123
},
"schema": {
"product_name": {
"type": "text"
},
"price": {
"type": "double"
},
"stock": {
"type": "integer",
"nullable": true
},
"active": {
"type": "boolean"
},
"released_at": {
"type": "date"
},
"specs": {
"type": "json"
}
},
"indexes": [
{
"properties": [
"sku"
]
}
],
"uniques": [
{
"properties": [
"sku"
]
}
],
"charts": [
{
"id": "<string>",
"kind": "bar",
"title": "<string>",
"agg": "count",
"field": "<string>",
"dimension": "<string>"
}
],
"row_count": 123,
"status": "ready"
}{
"error": "InvalidArguments",
"message": "<string>"
}Authorizations
BearerAuthOrgApiKeyAuth
User session JWT. Send as Authorization: Bearer <token>.
Path Parameters
Collection identifier returned at creation.
Body
application/json
Agents granted access to this collection.
Example:
["agent_123", "agent_456"]
Response
Updated collection metadata.
Example:
"products"
User ID or agent ID owning the collection.
Available options:
user, agent Agents granted access (sharing list).
Organization the collection belongs to (tenant boundary).
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" }
}
On list with with_counts=true, an estimated count; null otherwise.
Example:
"ready"
Was this page helpful?