Ask AI
Ask questions in the context of a site.
Authorizations
Path parameters
organizationIdstringRequired
The unique id of the organization
siteIdstringRequired
The unique id of the site
Query parameters
formatstring · enumOptionalPossible values:
Output format for the content.
Body
questionstring · max: 512Required
scopeone ofRequired
or
or
Responses
200
OK
text/event-stream
default
Unexpected Error
application/json
post
/orgs/{organizationId}/sites/{siteId}/askPOST /v1/orgs/{organizationId}/sites/{siteId}/ask HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 109
{
"question": "text",
"context": {
"siteSpaceId": "text"
},
"scope": {
"mode": "default",
"includedSiteSpaces": [
"text"
]
}
}{
"type": "answer",
"answer": {
"answer": {
"markdown": "text"
},
"followupQuestions": [
"text"
],
"sources": [
{
"type": "page",
"page": "text",
"revision": "text",
"space": "text",
"sections": [
"text"
]
}
]
}
}Last updated
Was this helpful?