How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

GitBook Site Insights API

This API delivers insights about how visitors interact with your site, including page views and user engagement, helping you measure and optimize your content strategy.

GitBook Site Insights API is one of 65 APIs that GitBook publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

This API exposes 7 JSON Schema definitions.

Tagged areas include site-insights. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an AsyncAPI specification, a JSON-LD context, and 7 JSON Schemas.

This API exposes 4 operations across 4 paths, and defines 70 schemas. It is described by OpenAPI 3.2.0, at version 0.0.1-beta.

Requests are made against a single base URL, {host}/v1.

4 operations 4 paths 70 schemas 1 GET3 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
0.0.1-beta
Server
{host}/v1
Authentication
HTTP Bearer, HTTP Bearer, HTTP Bearer, HTTP Bearer, HTTP Bearer, OAuth 2.0
Terms of Service
Resource Areas
1

Authentication & Security 6

GitBook Site Insights API declares 6 security schemes for authenticating requests. It accepts HTTP bearer tokens (user). It accepts HTTP bearer tokens (user-internal). It accepts HTTP bearer tokens (user-staff). It accepts HTTP bearer tokens (integration). It accepts HTTP bearer tokens (integration-installation). It supports OAuth 2.0 (oauth) using the authorizationCode flow, exposing 29 scopes. By default, every request must be authenticated.

Paths & Operations 4

Across 4 paths, the API surfaces 4 operations — 1 GET, 3 POST. Each is listed below with its method, path, parameters, and response codes.

site-insights 4

This API delivers insights about how visitors interact with your site, including page views and user engagement, helping you measure and optimize your content strategy.

POST
/orgs/{organizationId}/sites/{siteId}/agent-feedbackdeprecated
Submit agent feedback for a site.
submitSiteAgentFeedback 2 params body → 204
POST
/orgs/{organizationId}/sites/{siteId}/insights/events
Track site events
trackEventsInSiteById 2 params body → 204
POST
/orgs/{organizationId}/sites/{siteId}/insights/events/aggregate
Query a site's analytics events
aggregateSiteEvents 2 params body → 200
GET
/orgs/{organizationId}/sites/{siteId}/insights/visitor-segments
List a site visitor segments
listSiteVisitorSegments 2 params → 200

Schemas 70

The contract defines 70 schemas that model the data the API accepts and returns. The most detailed are SiteInsightsEventLocation (9 properties), SiteInsightsQueryEventsAggregation (6 properties), SiteInsightsVisitorSegment (5 properties), ContentRefAnchor (4 properties). Each schema is shown below with its type and property counts.

SiteInsightsDisplayContext
string
Context in which the event was recorded.
SiteInsightsQueryEventsValues
SiteInsightsEventBase
object
3 properties 2 required
SiteInsightsQueryRange
SiteInsightsLLMSVariant
string
PlainObject
ContentRefTag
object
3 properties 2 required
ContentRefOpenAPI
object
2 properties 2 required
SiteInsightsEventAskView
Event when a user views the ask UI.
SiteInsightsQueryOperator
string
SiteInsightsEventAgentFeedback
SiteInsightsQueryEventsFilter
ContentRefCollection
object
2 properties 2 required
ContentRefPage
object
3 properties 2 required
SiteInsightsEventRSSRequest
SiteInsightsMarkdownSource
string
How a page's markdown was requested. page-action means a reader used the site's page-actions menu — its copy or view-as-markdown action — rather than a client…
OpenAPIOperationPointer
object
Pointer to an operation in the OpenAPI spec.
2 properties 2 required
SiteInsightsEventTrademarkClick
ContentRefSpace
object
2 properties 2 required
SiteInsightsEventAskRateResponse
SiteInsightsEventAPIClientRequest
SiteInsightsVisitorOS
string
ContentRefUser
object
2 properties 2 required
ContentRefReusableContent
object
3 properties 2 required
SiteInsightsEventPageMarkdownRequest
SiteInsightsEventLLMSRequest
SiteInsightsQueryEventsAggregation
object
6 properties 1 required
SiteInsightsQueryDateTimeColumn
object
2 properties 1 required
SiteInsightsQueryRangePreset
string
SiteInsightsSession
object
Identifiers for a GitBook site session, used for analytics and adaptive content.
2 properties 2 required
ContentRef
A relative reference to content in GitBook.
SiteInsightsVisitorBot
stringnull
SiteInsightsVisitorBrowser
string
SiteInsightsEventAskQuestion
SiteInsightsEventType
string
SiteInsightsQueryRangeCustom
object
2 properties 2 required
SiteInsightsPageNotFoundType
string
Why a site URL returned a 404. conditional means the URL targets content gated by an adaptive-content condition, so the visitor lacked access to a page that ex…
SiteInsightsEventAdDisplay
SiteInsightsQueryEventsColumn
SiteInsightsQueryEventsAggregationResult
object
1 property 1 required
SiteInsightsEventSession
Timestamp
string
ContentRefAnchor
object
4 properties 2 required
SiteInsightsEventPageView
SiteInsightsEventSearchOpenResult
SiteInsightsEventLinkClick
ContentRefURL
object
2 properties 2 required
EntityId
string
A unique entity identifier
SiteInsightsEventAPIClientOpen
SiteInsightsVisitorSegment
object
A segment of visitors with the same characteristics.
5 properties 5 required
SiteInsightsEventSearchTypeQuery
SiteInsightsTrademarkPlacement
string
SiteInsightsLinkPosition
string
SiteInsightsEventMCPRequest
ContentRefFile
object
3 properties 2 required
SiteInsightsAdPlacement
string
SiteInsightsEventPagePostFeedback
List
object
2 properties
AgentFeedbackSource
string
The surface the agent was running on when it submitted the feedback: the MCP server exposed by the site, or the site assistant.
URL
string
SiteInsightsEventAskTriggerClick
Event when a user clicks an entry point that opens the ask UI.
SiteInsightsEventSearchOpen
SiteInsightsEventAdClick
SiteInsightsAd
object
3 properties 3 required
SiteInsightsVisitorDevice
string
AgentGoal
string
The end goal the agent is trying to accomplish on behalf of the user. Unlike the immediate query, the goal describes the broader task or outcome the agent is w…
PageFeedbackRating
string
SiteInsightsEventLocation
object
Location of the event.
9 properties 7 required
SiteInsightsEventPagePostFeedbackComment
SiteInsightsEvent

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

gitbook-site-insights-api-openapi.yml Raw ↑

Other APIs GitBook publishes across the network.

GitBook Change Request Content API
GitBook Change Request Reviewers API
GitBook Change Requests API
GitBook Collections API
GitBook Custom Hostnames API
GitBook Imports API
GitBook Integrations API
GitBook Organization Members API
GitBook Organizations API
GitBook Site Spaces API
GitBook Space Content API
GitBook Spaces API
Where this information came from

This is an independent, third-party profile of GitBook Site Insights API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.