Ask a plain-language question
curl --request POST \
--url https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/ask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"question": "How many products are in the Informatique category?"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({question: 'How many products are in the Informatique category?'})
};
fetch('https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/ask', 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}/ask"
payload = { "question": "How many products are in the Informatique category?" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"answer": "<string>",
"plan": {},
"data": {}
}{
"error": "InvalidArguments",
"message": "<string>"
}{
"error": "InvalidArguments",
"message": "<string>"
}AI
Ask a plain-language question
Answers a natural-language question about a collection. The org default
LLM turns the question into a query or aggregation plan using only the
schema, a few sample rows, and the row count (never the full dataset);
the plan runs server-side; a short natural-language answer is generated
from the bounded result. Returns answer, plan, and data.
Rate limit: 20 requests/min per user.
POST
/
v1
/
collections
/
{collection_id}
/
ask
Ask a plain-language question
curl --request POST \
--url https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/ask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"question": "How many products are in the Informatique category?"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({question: 'How many products are in the Informatique category?'})
};
fetch('https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/ask', 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}/ask"
payload = { "question": "How many products are in the Informatique category?" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"answer": "<string>",
"plan": {},
"data": {}
}{
"error": "InvalidArguments",
"message": "<string>"
}{
"error": "InvalidArguments",
"message": "<string>"
}Authorizations
BearerAuthOrgApiKeyAuth
User session JWT. Send as Authorization: Bearer <token>.
Path Parameters
Collection identifier returned at creation.
Body
application/json
Example:
"How many products are in the Informatique category?"
Was this page helpful?