Skip to main content
Mintlify
current

Search documentation

Type to search this documentation.

On this pageOverview

Get feedback

Returns paginated user feedback with optional filtering

Authenticate with an admin API key.

Use this endpoint to export user feedback collected from your documentation. Feedback includes contextual feedback from page ratings, code snippet feedback, and agent feedback.

Paginate through results using the cursor parameter returned in the response. Continue fetching while hasMore is true.

Filter feedback by:

  • Date range: Use dateFrom and dateTo to limit results to a specific time period
  • Source: Filter by code_snippet, contextual, or agent feedback types
  • Status: Filter by status values like pending, in_progress, resolved, or dismissed

The response contains different feedback types based on the source:

  • Contextual feedback: Includes helpful boolean and optional contact email
  • Code snippet feedback: Includes code, filename, and lang fields
  • Agent feedback: Includes a comment with the agent's feedback text and the path of the page it relates to

This endpoint allows 100 requests per organization per hour. All analytics endpoints share this limit.

OpenAPI

Related topics

GET/v1/analytics/{projectId}/feedback

Get user feedback

7 parameters
  • projectIdstringpathrequired
  • dateFromstringquery
  • dateTostringquery
  • sourcestringquery
  • statusstringquery
  • limitnumberquery
  • cursorstringquery
cURL
curl --request GET \
  --url https://api.mintlify.com/v1/analytics/{projectId}/feedback \
  --header 'Authorization: Bearer <token>'
Python
import requests

url = "https://api.mintlify.com/v1/analytics/{projectId}/feedback"

headers = {
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.text)
JavaScript
const options = {method: "GET", headers: {"Authorization": "Bearer <token>"}};

fetch("https://api.mintlify.com/v1/analytics/{projectId}/feedback", options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
PHP
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.mintlify.com/v1/analytics/{projectId}/feedback",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
Go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.mintlify.com/v1/analytics/{projectId}/feedback"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
Java
HttpResponse<String> response = Unirest.get("https://api.mintlify.com/v1/analytics/{projectId}/feedback")
  .header("Authorization", "Bearer <token>")
  .asString();
Ruby
require 'uri'
require 'net/http'

url = URI("https://api.mintlify.com/v1/analytics/{projectId}/feedback")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
200
{
  "feedback": [
    {
      "id": "<string>",
      "path": "<string>",
      "comment": "<string>",
      "createdAt": "<string>",
      "source": "code_snippet",
      "status": "pending",
      "helpful": true,
      "contact": "<string>"
    }
  ],
  "nextCursor": "<string>",
  "hasMore": true
}
400
{
  "error": "<string>",
  "details": [
    {
      "message": "<string>"
    }
  ]
}
500
{
  "error": "<string>",
  "details": [
    {
      "message": "<string>"
    }
  ]
}
Authorizationstringrequired

The Authorization header expects a Bearer token. Use an admin API key. This is a server-side secret key. Generate one on the API keys page in your dashboard.

projectIdstringrequired
dateFrom?string

Example: 2024-01-01

Typestring
dateTo?string

Example: 2024-01-01

Typestring
source?enum<string>

Available options: code_snippet, contextual, agent, thumbs_only

Typeenum<string>
status?string
limit?number

Required range: 1 <= x <= 100

Typenumber
Default50
cursor?string

200 — Feedback data with pagination

feedbackobject[]required

List of feedback entries.

Typeobject[]
Show child attributes
idstringrequired

Unique feedback identifier.

Typestring
pathstringrequired

The path or URL to the source document.

Typestring
commentstring | nullrequired

Text of the user's feedback comment.

Typestring | null
createdAtstring | nullrequired

Timestamp when the feedback was submitted.

Typestring | null
sourceenum<string>required

Where the feedback originated. code_snippet is feedback on a code block, contextual is page-level feedback, agent is feedback submitted by a third-party AI agent, thumbs_only is a thumbs up/down vote.

Available options: code_snippet, contextual, agent, thumbs_only

Typeenum<string>
statusenum<string>required

Current review status of the feedback.

Available options: pending, in_progress, resolved, dismissed

Typeenum<string>
helpfulbooleanrequired

Whether the user found the content helpful.

Typeboolean
contactstring | nullrequired

Email address the user provided for follow-up.

Typestring | null
nextCursorstring | nullrequired

Cursor to retrieve the next page of results. Null if no more results.

Typestring | null
hasMorebooleanrequired

Whether additional results are available beyond this page.

Typeboolean
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu