curl -X GET "https://api.mintlify.com/v1/analytics/your_project_id/assistant?dateFrom=2024-01-01&limit=100" \
-H "Authorization: Bearer mint_your_api_key_here"
const response = await fetch(
'https://api.mintlify.com/v1/analytics/your_project_id/assistant?dateFrom=2024-01-01&limit=100',
{
method: 'GET',
headers: {
'Authorization': 'Bearer mint_your_api_key_here',
},
}
);
const data = await response.json();
console.log(data.conversations);
// Paginate through results
let cursor = data.nextCursor;
while (cursor && data.hasMore) {
const nextPage = await fetch(
`https://api.mintlify.com/v1/analytics/your_project_id/assistant?cursor=${cursor}`,
{
method: 'GET',
headers: { 'Authorization': 'Bearer mint_your_api_key_here' },
}
);
const pageData = await nextPage.json();
console.log(pageData.conversations);
cursor = pageData.nextCursor;
}
import requests
response = requests.get(
'https://api.mintlify.com/v1/analytics/your_project_id/assistant',
headers={'Authorization': 'Bearer mint_your_api_key_here'},
params={
'dateFrom': '2024-01-01',
'limit': 100
}
)
data = response.json()
print(data['conversations'])
# Paginate through results
cursor = data['nextCursor']
while cursor and data['hasMore']:
response = requests.get(
'https://api.mintlify.com/v1/analytics/your_project_id/assistant',
headers={'Authorization': 'Bearer mint_your_api_key_here'},
params={'cursor': cursor}
)
data = response.json()
print(data['conversations'])
cursor = data['nextCursor']
{
"conversations": [
{
"id": "conv_abc123",
"timestamp": "2024-01-15T10:30:00.000Z",
"query": "How do I install Mintlify?",
"response": "To install Mintlify, you can run `npm install -g mintlify`. This will install the Mintlify CLI globally on your system. After installation, you can verify it by running `mintlify --version`.",
"sources": [
{
"title": "Installation Guide",
"url": "https://your-docs.mintlify.app/quickstart/installation"
},
{
"title": "Getting Started",
"url": "https://your-docs.mintlify.app/getting-started"
}
],
"queryCategory": "installation"
},
{
"id": "conv_def456",
"timestamp": "2024-01-16T14:22:00.000Z",
"query": "What are the API authentication methods?",
"response": "Mintlify supports two types of API keys: Admin API keys (prefixed with mint_) for server-side operations, and Assistant API keys (prefixed with mint_dsc_) for client-side integrations. You can generate both types from your dashboard.",
"sources": [
{
"title": "API Authentication",
"url": "https://your-docs.mintlify.app/api/authentication"
}
],
"queryCategory": "authentication"
}
],
"nextCursor": "01HN8QZXYZ123",
"hasMore": true
}
Analytics
Get Assistant Conversations
Export AI assistant conversation history from your documentation
GET
/
v1
/
analytics
/
{projectId}
/
assistant
curl -X GET "https://api.mintlify.com/v1/analytics/your_project_id/assistant?dateFrom=2024-01-01&limit=100" \
-H "Authorization: Bearer mint_your_api_key_here"
const response = await fetch(
'https://api.mintlify.com/v1/analytics/your_project_id/assistant?dateFrom=2024-01-01&limit=100',
{
method: 'GET',
headers: {
'Authorization': 'Bearer mint_your_api_key_here',
},
}
);
const data = await response.json();
console.log(data.conversations);
// Paginate through results
let cursor = data.nextCursor;
while (cursor && data.hasMore) {
const nextPage = await fetch(
`https://api.mintlify.com/v1/analytics/your_project_id/assistant?cursor=${cursor}`,
{
method: 'GET',
headers: { 'Authorization': 'Bearer mint_your_api_key_here' },
}
);
const pageData = await nextPage.json();
console.log(pageData.conversations);
cursor = pageData.nextCursor;
}
import requests
response = requests.get(
'https://api.mintlify.com/v1/analytics/your_project_id/assistant',
headers={'Authorization': 'Bearer mint_your_api_key_here'},
params={
'dateFrom': '2024-01-01',
'limit': 100
}
)
data = response.json()
print(data['conversations'])
# Paginate through results
cursor = data['nextCursor']
while cursor and data['hasMore']:
response = requests.get(
'https://api.mintlify.com/v1/analytics/your_project_id/assistant',
headers={'Authorization': 'Bearer mint_your_api_key_here'},
params={'cursor': cursor}
)
data = response.json()
print(data['conversations'])
cursor = data['nextCursor']
{
"conversations": [
{
"id": "conv_abc123",
"timestamp": "2024-01-15T10:30:00.000Z",
"query": "How do I install Mintlify?",
"response": "To install Mintlify, you can run `npm install -g mintlify`. This will install the Mintlify CLI globally on your system. After installation, you can verify it by running `mintlify --version`.",
"sources": [
{
"title": "Installation Guide",
"url": "https://your-docs.mintlify.app/quickstart/installation"
},
{
"title": "Getting Started",
"url": "https://your-docs.mintlify.app/getting-started"
}
],
"queryCategory": "installation"
},
{
"id": "conv_def456",
"timestamp": "2024-01-16T14:22:00.000Z",
"query": "What are the API authentication methods?",
"response": "Mintlify supports two types of API keys: Admin API keys (prefixed with mint_) for server-side operations, and Assistant API keys (prefixed with mint_dsc_) for client-side integrations. You can generate both types from your dashboard.",
"sources": [
{
"title": "API Authentication",
"url": "https://your-docs.mintlify.app/api/authentication"
}
],
"queryCategory": "authentication"
}
],
"nextCursor": "01HN8QZXYZ123",
"hasMore": true
}
Use this endpoint to export AI assistant conversation history from your documentation. Each conversation includes the user query, assistant response, sources cited, and query category.
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 conversations 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-31number
default:100
Max results per page. Minimum: 1, Maximum: 1000.
string
Pagination cursor (ULID format) from the previous response’s
nextCursor field.Response
array
List of assistant conversations.
Show Conversation object
Show Conversation object
string
Unique conversation identifier.
string
Timestamp when the conversation occurred.
string
The user’s question to the assistant.
string
The assistant’s response.
array
string
Auto-assigned category grouping for the conversation, if applicable.
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 conversations by date range usingdateFrom and dateTo parameters.
Conversation data
Each conversation includes:- query: The user’s question
- response: The assistant’s answer
- sources: Pages referenced in the response, with title and URL
- queryCategory: Classification of the query type (if available)
curl -X GET "https://api.mintlify.com/v1/analytics/your_project_id/assistant?dateFrom=2024-01-01&limit=100" \
-H "Authorization: Bearer mint_your_api_key_here"
const response = await fetch(
'https://api.mintlify.com/v1/analytics/your_project_id/assistant?dateFrom=2024-01-01&limit=100',
{
method: 'GET',
headers: {
'Authorization': 'Bearer mint_your_api_key_here',
},
}
);
const data = await response.json();
console.log(data.conversations);
// Paginate through results
let cursor = data.nextCursor;
while (cursor && data.hasMore) {
const nextPage = await fetch(
`https://api.mintlify.com/v1/analytics/your_project_id/assistant?cursor=${cursor}`,
{
method: 'GET',
headers: { 'Authorization': 'Bearer mint_your_api_key_here' },
}
);
const pageData = await nextPage.json();
console.log(pageData.conversations);
cursor = pageData.nextCursor;
}
import requests
response = requests.get(
'https://api.mintlify.com/v1/analytics/your_project_id/assistant',
headers={'Authorization': 'Bearer mint_your_api_key_here'},
params={
'dateFrom': '2024-01-01',
'limit': 100
}
)
data = response.json()
print(data['conversations'])
# Paginate through results
cursor = data['nextCursor']
while cursor and data['hasMore']:
response = requests.get(
'https://api.mintlify.com/v1/analytics/your_project_id/assistant',
headers={'Authorization': 'Bearer mint_your_api_key_here'},
params={'cursor': cursor}
)
data = response.json()
print(data['conversations'])
cursor = data['nextCursor']
{
"conversations": [
{
"id": "conv_abc123",
"timestamp": "2024-01-15T10:30:00.000Z",
"query": "How do I install Mintlify?",
"response": "To install Mintlify, you can run `npm install -g mintlify`. This will install the Mintlify CLI globally on your system. After installation, you can verify it by running `mintlify --version`.",
"sources": [
{
"title": "Installation Guide",
"url": "https://your-docs.mintlify.app/quickstart/installation"
},
{
"title": "Getting Started",
"url": "https://your-docs.mintlify.app/getting-started"
}
],
"queryCategory": "installation"
},
{
"id": "conv_def456",
"timestamp": "2024-01-16T14:22:00.000Z",
"query": "What are the API authentication methods?",
"response": "Mintlify supports two types of API keys: Admin API keys (prefixed with mint_) for server-side operations, and Assistant API keys (prefixed with mint_dsc_) for client-side integrations. You can generate both types from your dashboard.",
"sources": [
{
"title": "API Authentication",
"url": "https://your-docs.mintlify.app/api/authentication"
}
],
"queryCategory": "authentication"
}
],
"nextCursor": "01HN8QZXYZ123",
"hasMore": true
}