Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
463 changes: 463 additions & 0 deletions analytics.openapi.json

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions api/analytics/feedback-by-page.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: "Get feedback by page"
description: "Retrieve feedback counts aggregated by page path, including thumbs up/down and code snippet counts."
openapi: /analytics.openapi.json GET /v1/analytics/{projectId}/feedback/by-page
keywords: ["analytics", "feedback", "by page", "export", "aggregated"]
---

## Usage

Use this endpoint to export per-page feedback aggregates from your documentation. Each row includes counts for thumbs up, thumbs down, code snippet feedback, and a combined total.

## Response fields

Every item in the response includes:
- **path**: The documentation page path
- **thumbsUp**: Number of positive (thumbs up) ratings
- **thumbsDown**: Number of negative (thumbs down) ratings
- **code**: Number of code snippet feedback entries
- **total**: Combined feedback count across all types

## Filtering

Filter results by date range using `dateFrom` and `dateTo`, by feedback source using `source`, and by status using `status`.
25 changes: 25 additions & 0 deletions api/analytics/views.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: "Get page views"
description: "Retrieve per-path and site-wide content view event counts."
openapi: /analytics.openapi.json GET /v1/analytics/{projectId}/views
keywords: ["analytics", "views", "page views", "export", "traffic"]
---

## Usage

Use this endpoint to export per-page view counts from your documentation. Each row includes a breakdown of human and AI bot views, plus a combined total.

Paginate through results using offset-based pagination. Increment `offset` by `limit` while `hasMore` is `true`.

## Traffic breakdown

Every response includes:
- **human**: Views from regular browser traffic
- **ai**: Views from AI bot crawlers (e.g. GPTBot, ClaudeBot)
- **total**: Combined view count across all traffic

The `totals` object contains the same breakdown aggregated across your entire site for the selected date range.

## Filtering

Filter views by date range using `dateFrom` and `dateTo` parameters.
25 changes: 25 additions & 0 deletions api/analytics/visitors.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: "Get unique visitors"
description: "Retrieve per-path and site-wide approximate distinct visitors by traffic type."
openapi: /analytics.openapi.json GET /v1/analytics/{projectId}/visitors
keywords: ["analytics", "visitors", "unique visitors", "export", "traffic"]
---

## Usage

Use this endpoint to export per-page unique visitor counts from your documentation. Visitors are deduplicated by user ID or anonymous ID.

Paginate through results using offset-based pagination. Increment `offset` by `limit` while `hasMore` is `true`.

## Traffic breakdown

Every response includes:
- **human**: Unique visitors from regular browser traffic
- **ai**: Unique visitors from AI bot crawlers (e.g. GPTBot, ClaudeBot)
- **total**: Combined unique visitor count across all traffic

The `totals` object contains the same breakdown aggregated across your entire site for the selected date range.

## Filtering

Filter visitors by date range using `dateFrom` and `dateTo` parameters.
7 changes: 5 additions & 2 deletions api/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
keywords: ["REST API", "endpoints", "API keys"]
---

The Mintlify REST (Representational State Transfer) API enables you to programmatically interact with your documentation, trigger updates, embed AI-powered chat experiences, and export analytics data.

Check warning on line 7 in api/introduction.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/introduction.mdx#L7

Spell out 'REST', if it's unfamiliar to the audience.

## Endpoints

Check warning on line 9 in api/introduction.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/introduction.mdx#L9

Use 'endpoints?' instead of 'Endpoints'.

- [Trigger update](/api/update/trigger): Trigger an update of your site when desired.
- [Get update status](/api/update/status): Get the status of an update and other details about your docs.
Expand All @@ -16,15 +16,18 @@
- [Create assistant message](/api/assistant/create-assistant-message-v2): Embed the assistant, trained on your docs, into any application of your choosing.
- [Search documentation](/api/assistant/search): Search through your documentation.
- [Get user feedback](/api/analytics/feedback): Export user feedback from your documentation.
- [Get feedback by page](/api/analytics/feedback-by-page): Export feedback counts aggregated by page path.
- [Get assistant conversations](/api/analytics/assistant-conversations): Export AI assistant conversation history.
- [Get page views](/api/analytics/views): Export per-path and site-wide content view event counts.
- [Get unique visitors](/api/analytics/visitors): Export per-path and site-wide approximate distinct visitors by traffic type.

### Common use cases

- **Automated deployments**: Trigger site updates at set intervals or when events occur with [Trigger update](/api/update/trigger) and [Get update status](/api/update/status).
- **CI/CD integration**: Update documentation as part of your deployment pipeline when code changes with [Trigger update](/api/update/trigger).
- **Custom integrations**: Embed the AI assistant into your product, support portal, or internal tools with [Create assistant message](/api/assistant/create-assistant-message-v2) and [Search documentation](/api/assistant/search).
- **Automated editing**: Use agent jobs to programmatically update documentation at scale with [Create agent job](/api/agent/v2/create-agent-job), [Get agent job](/api/agent/v2/get-agent-job), and [Send follow-up message](/api/agent/v2/send-message).
- **Analytics export**: Export feedback and assistant conversations for external analysis with [Get user feedback](/api/analytics/feedback) and [Get assistant conversations](/api/analytics/assistant-conversations).
- **Analytics export**: Export feedback, assistant conversations, page views, and visitor data for external analysis with [Get user feedback](/api/analytics/feedback), [Get feedback by page](/api/analytics/feedback-by-page), [Get assistant conversations](/api/analytics/assistant-conversations), [Get page views](/api/analytics/views), and [Get unique visitors](/api/analytics/visitors).

## Authentication

Expand All @@ -34,7 +37,7 @@

### Admin API key

Use the admin API key to authenticate requests to [Trigger update](/api/update/trigger), [Get update status](/api/update/status), [Create agent job](/api/agent/v2/create-agent-job), [Get agent job](/api/agent/v2/get-agent-job), [Send follow-up message](/api/agent/v2/send-message), [Get user feedback](/api/analytics/feedback), and [Get assistant conversations](/api/analytics/assistant-conversations).
Use the admin API key to authenticate requests to [Trigger update](/api/update/trigger), [Get update status](/api/update/status), [Create agent job](/api/agent/v2/create-agent-job), [Get agent job](/api/agent/v2/get-agent-job), [Send follow-up message](/api/agent/v2/send-message), [Get user feedback](/api/analytics/feedback), [Get feedback by page](/api/analytics/feedback-by-page), [Get assistant conversations](/api/analytics/assistant-conversations), [Get page views](/api/analytics/views), and [Get unique visitors](/api/analytics/visitors).

Admin API keys begin with the `mint_` prefix.

Expand Down
20 changes: 16 additions & 4 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,10 @@
"icon": "chart-line",
"pages": [
"api/analytics/feedback",
"api/analytics/assistant-conversations"
"api/analytics/feedback-by-page",
"api/analytics/assistant-conversations",
"api/analytics/views",
"api/analytics/visitors"
]
}
]
Expand Down Expand Up @@ -741,7 +744,10 @@
"icon": "chart-line",
"pages": [
"fr/api/analytics/feedback",
"fr/api/analytics/assistant-conversations"
"fr/api/analytics/feedback-by-page",
"fr/api/analytics/assistant-conversations",
"fr/api/analytics/views",
"fr/api/analytics/visitors"
]
}
]
Expand Down Expand Up @@ -1111,7 +1117,10 @@
"icon": "chart-line",
"pages": [
"es/api/analytics/feedback",
"es/api/analytics/assistant-conversations"
"es/api/analytics/feedback-by-page",
"es/api/analytics/assistant-conversations",
"es/api/analytics/views",
"es/api/analytics/visitors"
]
}
]
Expand Down Expand Up @@ -1481,7 +1490,10 @@
"icon": "chart-line",
"pages": [
"zh/api/analytics/feedback",
"zh/api/analytics/assistant-conversations"
"zh/api/analytics/feedback-by-page",
"zh/api/analytics/assistant-conversations",
"zh/api/analytics/views",
"zh/api/analytics/visitors"
]
}
]
Expand Down
Loading
Loading