Feedback
Submit, list, fetch, and delete feedback items.
POST
/api/v1/feedbacksecret or widget keySubmit a feedback item
Returns 202 immediately with the item id; PII redaction happens before storage, and AI analysis (sentiment, type, emotions, language, clustering) completes asynchronously within seconds.
| Parameter | In | Description |
|---|---|---|
textrequired | body | The feedback text, 1–10,000 chars. |
userId | body | Your identifier for the end user (enables segments + GDPR endpoints). |
email | body | The author's email, when userId is unknown (survey tools, help desks). Feedback joins the matching user, or creates one that is merged automatically once that person is identified with their real userId. |
source | body | "api" (default) or "widget". |
metadata | body | Custom properties as JSON ≤8 KB: where the feedback came from, which experiment it belongs to ({"widget": "checkout", "test": "paywall-v2"}, …). Every key becomes a filter and a chart breakdown in Reports, and works with ?meta= below. |
createdAt | body | ISO timestamp for backfills; defaults to now. |
Idempotency-Key | header | Makes retries safe (see Overview → Idempotency). |
Request
curl -X POST https://app.sentriment.com/api/v1/feedback \
-H "Authorization: Bearer sk_live_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-4231-note" \
-d '{
"text": "Checkout freezes when I apply a coupon",
"userId": "usr_123",
"email": "dana@acme.com",
"metadata": { "plan": "pro", "page": "/checkout" }
}'202 Accepted
{ "id": "01KX8VPHE0XN0JCDM6GSRC5HDQ", "status": "pending" }GET
/api/v1/feedbacksecret keyList feedback
Newest first, with analysis fields. Cursor pagination via nextBefore.
| Parameter | In | Description |
|---|---|---|
limit | query | 1–200, default 50. |
cluster | query | Filter to one cluster id. |
sentiment | query | positive · neutral · negative. |
source | query | api · widget · csv · appstore · intercom · zendesk · call (signals extracted from sales calls). |
meta | query | key:value on custom properties, e.g. ?meta=test:paywall-v2. Repeatable: the same key matches either value (?meta=tier:pro&meta=tier:free), different keys must all match. |
before | query | Cursor: pass the previous response's nextBefore. |
Request
curl "https://app.sentriment.com/api/v1/feedback?limit=50&sentiment=negative" \
-H "Authorization: Bearer sk_live_…"200 OK (truncated)
{
"items": [{
"id": "01KX…", "text": "search is timing out again …",
"sentiment": "negative", "sentimentScore": -0.62,
"type": "bug", "emotions": ["frustration"], "language": "en",
"clusterId": "01KX…", "userId": "u301", "status": "processed",
"createdAt": "2026-07-11T18:09:05.000Z"
}],
"nextBefore": "2026-07-11T18:09:05.000Z"
}GET
/api/v1/feedback/{id}secret keyGet one item
Full analysis for a single item. Poll this after a 202 if you need the result synchronously.
Request
curl "https://app.sentriment.com/api/v1/feedback/01KX8VPHE0XN0JCDM6GSRC5HDQ" \
-H "Authorization: Bearer sk_live_…"DELETE
/api/v1/feedback/{id}secret keyDelete one item
Hard delete. Cluster statistics are recomputed immediately. Returns 204; deleting twice returns 404.
Request
curl -X DELETE "https://app.sentriment.com/api/v1/feedback/01KX8VPHE0XN0JCDM6GSRC5HDQ" \
-H "Authorization: Bearer sk_live_…"Was this page helpful?