Explore how adaptive content transforms your docs into a dynamic, tailored experience for every user.
Read the docs
LogoLogo
ProductPricingLog inSign up
  • Documentation
  • Developers
  • Guides
  • Changelog
  • Help Center
  • Getting Started
    • Developer Documentation
    • Quickstart
    • Development
    • Publishing
  • Integrations
    • Introduction
    • Using the CLI
    • Configuration
    • ContentKit
      • Component reference
    • Integration runtime
  • Client library
  • Guides
    • Creating a custom unfurl action
    • Creating interactive blocks
    • Referencing your integration in Markdown
    • Working with HTTP requests
    • Using the CLI in CI/CD
  • GitBook API
    • Introduction
    • Authentication
    • API reference
      • Organizations
        • Organization members
        • Organization invites
        • Organization AI ask
      • Docs sites
        • Site share links
        • Site structure
        • Site auth
        • Site preview
        • Site customization
        • Site spaces
        • Site sections
        • Site section groups
        • Site redirects
        • Site MCP servers
        • Site ads
        • Site users
        • Site insights
        • Site AI ask
      • Collections
        • Collection users
        • Collection teams
      • Spaces
        • Space content
        • Space comments
        • Space embeds
        • Space users
        • Space teams
        • Space integrations
        • Git
      • Change requests
        • Change request content
        • Change request contributors
        • Change request reviewers
        • Change request comments
      • Translations
        • Glossary
      • Integrations
      • URLs
      • OpenAPI
        • OpenAPI spec versions
      • Conversations
      • Custom fonts
      • Subdomains
      • Users
      • Teams
        • Team members
      • SSO
      • Storage
      • Custom hostnames
      • System info
    • Rate limiting
    • Pagination
    • Errors
  • Marketplace
    • Overview
    • Submit your app for review
  • Resources
    • Concepts
    • Changelog
    • ContentKit playground
    • GitHub examples
Powered by GitBook
On this page
  1. GitBook API
  2. API reference
  3. Organizations

Organization AI ask

Unlock AI-driven answers for your organization's content and data.

Was this helpful?

LogoLogo

Resources

  • Showcase
  • Enterprise
  • Status

Company

  • Careers
  • Blog
  • Community

Policies

  • Subprocessors
  • Terms of Service
CtrlK
  • POSTAsk a question in an organization
  • GETList recommended questions to ask in an organization
  • GETList recommended questions to ask in an organization (streamed)
  • GETAsk a question in an organization (streamed)

Was this helpful?

Enhance your team's knowledge base with the Organization AI ask endpoint, which allows you to query AI models trained on your organization's GitBook content for quick, intelligent responses.

Ask a question in an organization

post

Ask a question to an AI across spaces that is accessible by the currently authenticated target.

Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Query parameters
formatstring · enumOptional

Output format for the content.

Possible values:
detailsbooleanOptional

Return query details in the result

Body
querystringRequired
previousQueriesstring[] · max: 10OptionalDeprecated
Responses
200

OK

application/json
post
POST /v1/orgs/{organizationId}/ask HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "query": "text"
}
200

OK

{
  "answer": {
    "answer": {
      "markdown": "text"
    },
    "followupQuestions": [
      "text"
    ],
    "sources": [
      {
        "type": "page",
        "reason": "text",
        "page": "text",
        "revision": "text",
        "space": "text",
        "sections": [
          "text"
        ]
      }
    ]
  }
}

List recommended questions to ask in an organization

get
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Responses
200

OK

application/json
get
GET /v1/orgs/{organizationId}/ask/questions HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "questions": [
    "text"
  ]
}

List recommended questions to ask in an organization (streamed)

get
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Responses
200

OK

text/event-stream
get
GET /v1/orgs/{organizationId}/ask/questions/stream HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "question": "text"
}

Ask a question in an organization (streamed)

get

Ask a question to an AI across spaces that is accessible by the currently authenticated target and stream the answer as a Server-Sent Events URL.

Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Query parameters
querystringRequired
formatstring · enumOptional

Output format for the content.

Possible values:
detailsbooleanOptional

Return query details in the result

Responses
200

OK

text/event-stream
get
GET /v1/orgs/{organizationId}/ask/stream HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "type": "answer",
  "answer": {
    "answer": {
      "markdown": "text"
    },
    "followupQuestions": [
      "text"
    ],
    "sources": [
      {
        "type": "page",
        "reason": "text",
        "page": "text",
        "revision": "text",
        "space": "text",
        "sections": [
          "text"
        ]
      }
    ]
  }
}