Skip to main content
POST
/
v1
/
feedback
Submit Feedback
curl --request POST \
  --url https://api.trynawa.com/v1/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.
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

HeaderRequiredDescription
AuthorizationYesBearer nawa_live_sk_xxx or Bearer nawa_test_sk_xxx
Content-TypeYesapplication/json

Body

ParameterTypeRequiredDescription
classification_idstringYesThe id from the classification you are correcting (e.g. cls_nw_lx4cqy2j2o1o from the /v1/classify response).
ratingstringYesOne of correct, incorrect, partial. How accurate the original classification was.
corrected_intentstring[]NoThe intent labels you believe the classification should have returned. Free-form strings; the standard labels are question, complaint, praise, suggestion, spam, other.
corrected_sentimentstringNoOne of positive, negative, neutral, mixed. What the sentiment should have been.
commentstringNoOptional free-text explanation. Useful for dialect edge cases and intent ambiguity.

Example request

curl -X POST https://api.trynawa.com/v1/feedback \
  -H "Authorization: Bearer nawa_test_sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "classification_id": "cls_nw_lx4cqy2j2o1o",
    "rating": "partial",
    "corrected_intent": ["question", "suggestion"],
    "corrected_sentiment": "neutral",
    "comment": "The comment is a question AND a polite suggestion. The model caught only the question."
  }'

Response

Success response (200)

{
  "result": {
    "id": "fb_nw_8k3r9vwxyz01",
    "object": "feedback",
    "classification_id": "cls_nw_lx4cqy2j2o1o",
    "rating": "partial",
    "acknowledged": true
  },
  "success": true,
  "errors": [],
  "request_id": "req_nw_fb01abc23def4"
}

Result fields

FieldTypeDescription
idstringFeedback record ID in fb_nw_xxx format
objectstringAlways "feedback"
classification_idstringEchoed back from the request
ratingstringEchoed back from the request
acknowledgedbooleanAlways true on a 200 response. Confirms the feedback was persisted.

Response headers

HeaderDescription
X-Request-IdUnique request identifier
X-NAWA-Environmentsandbox or live
X-RateLimit-LimitYour tier’s per-minute request ceiling
X-RateLimit-RemainingRequests remaining in the current one-minute window
X-RateLimit-ResetRFC 3339 timestamp when the window resets

Error responses

StatusTypeWhen
400invalid_request_errorMissing classification_id or rating; invalid rating / corrected_sentiment value; corrected_intent not an array of strings; malformed JSON body
401authentication_errorMissing, malformed, revoked, or expired API key
429rate_limit_errorPer-minute rate limit exceeded, or sandbox lifetime quota (100 requests) exhausted
500api_errorUnexpected internal failure. Quote request_id to support.
See Errors for the full envelope shape and all error codes.
We especially value feedback on Arabic dialect edge cases and on comments where the same text expresses more than one intent. Both are harder for models than they look.