跳转到主要内容
GET
/
v1
/
analytics
/
{projectId}
/
feedback
Get user feedback
curl --request GET \
  --url https://api.mintlify.com/v1/analytics/{projectId}/feedback \
  --header 'Authorization: Bearer <token>'
{
  "feedback": [
    {
      "id": "<string>",
      "path": "<string>",
      "comment": "<string>",
      "createdAt": "<string>",
      "source": "code_snippet",
      "status": "pending"
    }
  ],
  "nextCursor": "<string>",
  "hasMore": true
}

用法

使用此端点导出从文档中收集的用户反馈。反馈包括来自页面评分的上下文反馈以及代码片段反馈。 使用响应中返回的 cursor 参数对结果进行分页。当 hasMoretrue 时继续获取数据。

筛选

可以按以下维度筛选反馈:
  • 日期范围:使用 dateFromdateTo 将结果限定在特定时间段内
  • 来源:按 code_snippetcontextual 等反馈来源类型进行筛选
  • 状态:按状态值进行筛选,例如 pendingin_progressresolveddismissed

响应类型

响应会根据不同的 source 包含不同类型的反馈:
  • 上下文反馈:包含 helpful 布尔值和可选的 contact 邮箱
  • 代码片段反馈:包含 codefilenamelang 字段

授权

Authorization
string
header
必填

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

路径参数

projectId
string
必填

Your project ID. Can be copied from the API keys page in your dashboard.

查询参数

dateFrom
string

Date in ISO 8601 or YYYY-MM-DD format

示例:

"2024-01-01"

dateTo
string

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.

示例:

"2024-01-01"

source
enum<string>

Filter by feedback source

可用选项:
code_snippet,
contextual
status
string

Comma-separated list of statuses to filter by

limit
number
默认值:50

Max results per page

必填范围: 1 <= x <= 100
cursor
string

Pagination cursor

响应

Feedback data with pagination

feedback
object[]
必填

List of feedback entries.

nextCursor
string | null
必填

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

hasMore
boolean
必填

Whether additional results are available beyond this page.