Create a collection
curl --request POST \
--url https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "products",
"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: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'products',
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', 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"
payload = {
"name": "products",
"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.post(url, json=payload, headers=headers)
print(response.text){
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "<string>",
"owner_type": "user",
"status": "ready",
"schema_applied": true
}{
"error": "InvalidArguments",
"message": "<string>"
}{
"error": "InvalidArguments",
"message": "<string>"
}Collections
Create a collection
Creates a named collection, optionally with a typed schema
(properties). Collection names are unique per owner.
Rate limit: 100 requests/min per user.
POST
/
v1
/
collections
Create a collection
curl --request POST \
--url https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "products",
"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: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'products',
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', 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"
payload = {
"name": "products",
"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.post(url, json=payload, headers=headers)
print(response.text){
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "<string>",
"owner_type": "user",
"status": "ready",
"schema_applied": true
}{
"error": "InvalidArguments",
"message": "<string>"
}{
"error": "InvalidArguments",
"message": "<string>"
}Authorizations
BearerAuthOrgApiKeyAuth
User session JWT. Send as Authorization: Bearer <token>.
Body
application/json
Collection name (alphanumeric, -, _). Unique per owner.
Maximum string length:
64Pattern:
^[a-zA-Z0-9_-]+$Example:
"products"
Human-readable description, also visible to agents.
Example:
"Product catalog, one row per SKU, prices in EUR"
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" }
}
Was this page helpful?