Documents
Query documents with natural language
This method allows asking direct questions of your documents – where possible an answer will be provided. Search results will be restricted to those accessible by the current access token. Note that "AI answers" must be enabled for the workspace.
post/documents.answerQuestion
Request body
Example request
{
"query": "What is our holiday policy?"
}Response
OK
Example response
{
"documents": [
{
"title": "🎉 Welcome to Acme Inc",
"emoji": "🎉",
"text": "…",
"urlId": "hDYep1TPAM",
"collaborators": [
{
"name": "Jane Doe"
}
],
"createdBy": {
"name": "Jane Doe"
},
"updatedBy": {
"name": "Jane Doe"
}
}
],
"search": {
"query": "What is our hiring policy?",
"answer": "Our hiring policy can be summarized as…",
"source": "app"
}
}