curl -X GET "https://api.mintlify.com/v1/analytics/your_project_id/feedback?dateFrom=2024-01-01&limit=50" \
-H "Authorization: Bearer mint_your_api_key_here"
const response = await fetch(
'https://api.mintlify.com/v1/analytics/your_project_id/feedback?dateFrom=2024-01-01&limit=50',
{
method: 'GET',
headers: {
'Authorization': 'Bearer mint_your_api_key_here',
},
}
);
const data = await response.json();
console.log(data.feedback);
// Paginate through results
let cursor = data.nextCursor;
while (cursor && data.hasMore) {
const nextPage = await fetch(
`https://api.mintlify.com/v1/analytics/your_project_id/feedback?cursor=${cursor}`,
{
method: 'GET',
headers: { 'Authorization': 'Bearer mint_your_api_key_here' },
}
);
const pageData = await nextPage.json();
console.log(pageData.feedback);
cursor = pageData.nextCursor;
}
import requests
response = requests.get(
'https://api.mintlify.com/v1/analytics/your_project_id/feedback',
headers={'Authorization': 'Bearer mint_your_api_key_here'},
params={
'dateFrom': '2024-01-01',
'limit': 50
}
)
data = response.json()
print(data['feedback'])
# Paginate through results
cursor = data['nextCursor']
while cursor and data['hasMore']:
response = requests.get(
'https://api.mintlify.com/v1/analytics/your_project_id/feedback',
headers={'Authorization': 'Bearer mint_your_api_key_here'},
params={'cursor': cursor}
)
data = response.json()
print(data['feedback'])
cursor = data['nextCursor']
{
"feedback": [
{
"id": "fb_abc123",
"path": "/getting-started",
"comment": "This section was very helpful!",
"createdAt": "2024-01-15T10:30:00.000Z",
"source": "contextual",
"status": "resolved",
"helpful": true,
"contact": "user@example.com"
},
{
"id": "fb_def456",
"path": "/api/examples",
"comment": "This code doesn't work with the latest version",
"createdAt": "2024-01-16T14:22:00.000Z",
"source": "code_snippet",
"status": "pending",
"code": "const example = require('example');",
"filename": "index.js",
"lang": "javascript"
}
],
"nextCursor": "cursor_xyz789",
"hasMore": true
}
Analytics
Get User Feedback
Export user feedback collected from your documentation
GET
/
v1
/
analytics
/
{projectId}
/
feedback
curl -X GET "https://api.mintlify.com/v1/analytics/your_project_id/feedback?dateFrom=2024-01-01&limit=50" \
-H "Authorization: Bearer mint_your_api_key_here"
const response = await fetch(
'https://api.mintlify.com/v1/analytics/your_project_id/feedback?dateFrom=2024-01-01&limit=50',
{
method: 'GET',
headers: {
'Authorization': 'Bearer mint_your_api_key_here',
},
}
);
const data = await response.json();
console.log(data.feedback);
// Paginate through results
let cursor = data.nextCursor;
while (cursor && data.hasMore) {
const nextPage = await fetch(
`https://api.mintlify.com/v1/analytics/your_project_id/feedback?cursor=${cursor}`,
{
method: 'GET',
headers: { 'Authorization': 'Bearer mint_your_api_key_here' },
}
);
const pageData = await nextPage.json();
console.log(pageData.feedback);
cursor = pageData.nextCursor;
}
import requests
response = requests.get(
'https://api.mintlify.com/v1/analytics/your_project_id/feedback',
headers={'Authorization': 'Bearer mint_your_api_key_here'},
params={
'dateFrom': '2024-01-01',
'limit': 50
}
)
data = response.json()
print(data['feedback'])
# Paginate through results
cursor = data['nextCursor']
while cursor and data['hasMore']:
response = requests.get(
'https://api.mintlify.com/v1/analytics/your_project_id/feedback',
headers={'Authorization': 'Bearer mint_your_api_key_here'},
params={'cursor': cursor}
)
data = response.json()
print(data['feedback'])
cursor = data['nextCursor']
{
"feedback": [
{
"id": "fb_abc123",
"path": "/getting-started",
"comment": "This section was very helpful!",
"createdAt": "2024-01-15T10:30:00.000Z",
"source": "contextual",
"status": "resolved",
"helpful": true,
"contact": "user@example.com"
},
{
"id": "fb_def456",
"path": "/api/examples",
"comment": "This code doesn't work with the latest version",
"createdAt": "2024-01-16T14:22:00.000Z",
"source": "code_snippet",
"status": "pending",
"code": "const example = require('example');",
"filename": "index.js",
"lang": "javascript"
}
],
"nextCursor": "cursor_xyz789",
"hasMore": true
}
Use this endpoint to export user feedback collected from your documentation. Feedback includes contextual feedback from page ratings and code snippet feedback.
Paginate through results using the
cursor parameter returned in the response. Continue fetching while hasMore is true.
Authentication
Requires an admin API key (prefixed withmint_). Generate one on the API keys page in your dashboard.
Path Parameters
Query Parameters
string
Date in ISO 8601 or YYYY-MM-DD format. Filter results to include feedback from this date onwards.Example:
2024-01-01string
Date in ISO 8601 or YYYY-MM-DD format.
dateTo is an exclusive upper limit. Results include dates before, but not on, the specified date.Example: 2024-01-31string
Filter by feedback source. Possible values:
code_snippet, contextual.string
Comma-separated list of statuses to filter by. Possible values:
pending, in_progress, resolved, dismissed.Example: pending,in_progressnumber
default:50
Max results per page. Minimum: 1, Maximum: 100.
string
Pagination cursor from the previous response’s
nextCursor field.Response
array
List of feedback entries.
Show Feedback object
Show Feedback object
string
Unique feedback identifier.
string
The path or URL to the source document.
string
Text of the user’s feedback comment.
string
Timestamp when the feedback was submitted.
string
Where the feedback originated.
code_snippet is feedback on a code block, contextual is page-level feedback.string
Current review status of the feedback. Possible values:
pending, in_progress, resolved, dismissed.boolean
Whether the user found the content helpful (contextual feedback only).
string
Email address the user provided for follow-up (contextual feedback only).
string
The code snippet the feedback relates to (code snippet feedback only).
string
Filename associated with the code snippet (code snippet feedback only).
string
Programming language of the code snippet (code snippet feedback only).
string
Cursor to retrieve the next page of results. Null if no more results.
boolean
Whether additional results are available beyond this page.
Filtering
Filter feedback by:- Date range: Use
dateFromanddateToto limit results to a specific time period - Source: Filter by
code_snippetorcontextualfeedback types - Status: Filter by status values like
pending,in_progress,resolved, ordismissed
Response types
The response contains different feedback types based on the source:- Contextual feedback: Includes
helpfulboolean and optionalcontactemail - Code snippet feedback: Includes
code,filename, andlangfields
curl -X GET "https://api.mintlify.com/v1/analytics/your_project_id/feedback?dateFrom=2024-01-01&limit=50" \
-H "Authorization: Bearer mint_your_api_key_here"
const response = await fetch(
'https://api.mintlify.com/v1/analytics/your_project_id/feedback?dateFrom=2024-01-01&limit=50',
{
method: 'GET',
headers: {
'Authorization': 'Bearer mint_your_api_key_here',
},
}
);
const data = await response.json();
console.log(data.feedback);
// Paginate through results
let cursor = data.nextCursor;
while (cursor && data.hasMore) {
const nextPage = await fetch(
`https://api.mintlify.com/v1/analytics/your_project_id/feedback?cursor=${cursor}`,
{
method: 'GET',
headers: { 'Authorization': 'Bearer mint_your_api_key_here' },
}
);
const pageData = await nextPage.json();
console.log(pageData.feedback);
cursor = pageData.nextCursor;
}
import requests
response = requests.get(
'https://api.mintlify.com/v1/analytics/your_project_id/feedback',
headers={'Authorization': 'Bearer mint_your_api_key_here'},
params={
'dateFrom': '2024-01-01',
'limit': 50
}
)
data = response.json()
print(data['feedback'])
# Paginate through results
cursor = data['nextCursor']
while cursor and data['hasMore']:
response = requests.get(
'https://api.mintlify.com/v1/analytics/your_project_id/feedback',
headers={'Authorization': 'Bearer mint_your_api_key_here'},
params={'cursor': cursor}
)
data = response.json()
print(data['feedback'])
cursor = data['nextCursor']
{
"feedback": [
{
"id": "fb_abc123",
"path": "/getting-started",
"comment": "This section was very helpful!",
"createdAt": "2024-01-15T10:30:00.000Z",
"source": "contextual",
"status": "resolved",
"helpful": true,
"contact": "user@example.com"
},
{
"id": "fb_def456",
"path": "/api/examples",
"comment": "This code doesn't work with the latest version",
"createdAt": "2024-01-16T14:22:00.000Z",
"source": "code_snippet",
"status": "pending",
"code": "const example = require('example');",
"filename": "index.js",
"lang": "javascript"
}
],
"nextCursor": "cursor_xyz789",
"hasMore": true
}