Submit Feedback
Endpoints
Submit Feedback
Submit RLHF feedback on a prior classification so future responses improve.
POST
Submit Feedback
Tell NAWA when a classification was wrong, partially right, or correct. Feedback accumulates into pattern hints that NAGL injects on future classifications, so corrections compound over time.Documentation Index
Fetch the complete documentation index at: https://developers.trynawa.com/llms.txt
Use this file to discover all available pages before exploring further.
This endpoint is free. It does not consume credits. Sandbox keys can submit feedback, and each submission counts against the 100-request sandbox lifetime cap.
Request
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer nawa_live_sk_xxx or Bearer nawa_test_sk_xxx |
Content-Type | Yes | application/json |
Body
| Parameter | Type | Required | Description |
|---|---|---|---|
classification_id | string | Yes | The id from the classification you are correcting (e.g. cls_nw_lx4cqy2j2o1o from the /v1/classify response). |
rating | string | Yes | One of correct, incorrect, partial. How accurate the original classification was. |
corrected_intent | string[] | No | The intent labels you believe the classification should have returned. Free-form strings; the standard labels are question, complaint, praise, suggestion, spam, other. |
corrected_sentiment | string | No | One of positive, negative, neutral, mixed. What the sentiment should have been. |
comment | string | No | Optional free-text explanation. Useful for dialect edge cases and intent ambiguity. |
Example request
Response
Success response (200)
Result fields
| Field | Type | Description |
|---|---|---|
id | string | Feedback record ID in fb_nw_xxx format |
object | string | Always "feedback" |
classification_id | string | Echoed back from the request |
rating | string | Echoed back from the request |
acknowledged | boolean | Always true on a 200 response. Confirms the feedback was persisted. |
Response headers
| Header | Description |
|---|---|
X-Request-Id | Unique request identifier |
X-NAWA-Environment | sandbox or live |
X-RateLimit-Limit | Your tier’s per-minute request ceiling |
X-RateLimit-Remaining | Requests remaining in the current one-minute window |
X-RateLimit-Reset | RFC 3339 timestamp when the window resets |
Error responses
| Status | Type | When |
|---|---|---|
| 400 | invalid_request_error | Missing classification_id or rating; invalid rating / corrected_sentiment value; corrected_intent not an array of strings; malformed JSON body |
| 401 | authentication_error | Missing, malformed, revoked, or expired API key |
| 429 | rate_limit_error | Per-minute rate limit exceeded, or sandbox lifetime quota (100 requests) exhausted |
| 500 | api_error | Unexpected internal failure. Quote request_id to support. |