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
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
{
"data": { "helpful": 42, "notHelpful": 3, "total": 45 }
}
Submit Section Feedback
up or down.
Get Section Feedback Stats
{
"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.