Records explicit feedback (๐ or ๐) from the visitor on a conversation turn, with an optional reason when it's ๐. A ๐ also opens (or reuses, if one already exists) an internal moderation case so Mapaprop's team can review the response.
This API has no per-user identity (only an OAuth client scoped to the account): the feedback is recorded on behalf of the account, not a specific person.
| Resource information | |
|---|
| Authentication | Required (API Token, Bearer) |
| Scope | mapaprop-chat-ai |
| HTTP Method | POST |
| Response | JSON |
| Version | 1 |
https://mapaprop.app/api/action/mapaprop-chat-ai-v1/feedback
| Key | Type | Required | Description |
|---|
| turnId | long | yes | ID of the turn the feedback is about. Comes in the response of POST /chat (turnId field) or in the done SSE event of POST /chat/stream. Must belong to the token's account. |
| rating | string | yes | up or down. |
| reasonCode | string | no | Reason for the feedback: incorrect, not_resolved, irrelevant or other. |
| reasonText | string | no | Visitor's free-text comment (maximum 2000 characters). |
POST /api/action/mapaprop-chat-ai-v1/feedback HTTP/1.1
Host: mapaprop.app
Content-Type: application/json
Authorization: Bearer {access_token}
{
"turnId": 481512,
"rating": "down",
"reasonCode": "incorrect",
"reasonText": "It told me there were 3 rooms and the photo shows a studio."
}
| Object | Field | Type | Required | Description |
|---|
| Response | success | boolean | yes | true when the feedback was recorded successfully. |
| turnId | long | yes | The turnId you sent. |
| rating | string | yes | The rating you sent (up or down). |
| feedbackId | int | yes | ID of the created feedback record. |
| caseCreated | boolean | yes | true only when this call created a NEW moderation case. On up, always false. On down, it's false if the turn already had an open case from a previous feedback (the same case is reused, never duplicated). |
| moderationCaseId | int | no | ID of the moderation case (new or existing). Only present when rating is down. |
In case of error, the shape above with success: false is not returned: the request is cut off with an error (see the following tables).
| Error | Cause |
|---|
INVALID_PERMISSION (HTTP 403) | The turnId sent doesn't exist, or belongs to another account's conversation. |
| Error | Cause |
|---|
REQUIRED_INPUT โ "El campo 'turnId' es requerido" | The turnId field is missing, or is less than or equal to 0. |
REQUIRED_INPUT โ "El campo 'rating' es requerido ('up' o 'down')" | The rating field is missing, or its value isn't up or down. |
REQUIRED_INPUT โ "El campo 'reasonCode' debe ser uno de: incorrect, not_resolved, irrelevant, other" | reasonCode was sent with a value other than the allowed ones. |
INPUT_TOO_LONG โ "El campo 'reasonText' es demasiado largo (max 2000 caracteres)" | The reasonText sent exceeds 2000 characters. |
{
"success": true,
"turnId": 481512,
"rating": "down",
"feedbackId": 9031,
"caseCreated": true,
"moderationCaseId": 214
}
Error example:
{
"success": false,
"error": "INVALID_PERMISSION"
}