Syntext DOCS
Get Started
API Feedback API

Feedback API

Doc sites collect visitor feedback at two granularities: page-level ("Was this page helpful?") and section-level (per-heading votes). Deployed sites include these widgets automatically — the API is public so custom frontends can integrate too.

Submit Page Feedback

The page path. Whether the visitor found the page helpful. Optional free-text comment (max 1000 chars). Anonymous visitor ID.

curl -X POST https://api.syntext.dev/v1/projects/prj_abc123/feedback/page \
  -H "Content-Type: application/json" \
  -d '{ "pagePath": "/guides/quickstart", "helpful": true }'

Returns 201 with the created feedback record.

Get Page Feedback Stats

The page to fetch stats for.

{
  "data": { "helpful": 42, "notHelpful": 3, "total": 45 }
}

Submit Section Feedback

The page path. The heading anchor ID of the section. up or down. Optional comment (max 500 chars).

Get Section Feedback Stats

The page to fetch stats for.

{
  "data": [
    { "sectionId": "installation", "upvotes": 18, "downvotes": 1 },
    { "sectionId": "configuration", "upvotes": 9, "downvotes": 6 }
  ]
}

Review Feedback in the Dashboard

An authenticated aggregate across all pages is available at:

GET /v1/projects/{projectId}/feedback/pages

Feedback with comments also appears in the dashboard and feeds content health scores.

If a visitor is signed in (Bearer token present), feedback is associated with their account; otherwise it's anonymous.

Assistant
Responses are generated using AI and may contain mistakes.

Ask me anything about the documentation.

ESC