Saves a message in an existing conversation without invoking AI. Intended to persist steps of a guided flow (for example, "the visitor clicked 'Sale'") or messages from a human agent/system in the customer's Inbox.
This endpoint does NOT invoke AI or consume tokens — unlike POST /message, which always deducts tokensUsed from the customer's balance. It requires a conversation that has already been started: call POST /init first.
| Resource information | |
|---|---|
| Authentication | Required (API Token, Bearer) |
| Scope | mapaprop-chat-ai |
| HTTP Method | POST |
| Response | JSON |
| Version | 1 |
Resource URL
https://mapaprop.app/api/action/mapaprop-chat-ai-v1/thread
Parameters
| Key | Type | Required | Description |
|---|---|---|---|
| questionId | int | yes | Conversation ID (obtained from POST /init). |
| message | string | yes | The message content. |
| direction | int | yes | 1 = inbound/visitor, 2 = outbound/agent or system, 3 = AI. |
| from | string | no | Sender name to display in the Inbox. Default Visitante. |
Sample code
POST /api/action/mapaprop-chat-ai-v1/thread HTTP/1.1
Host: mapaprop.app
Content-Type: application/json
Authorization: Bearer {access_token}
{
"questionId": 481203,
"message": "El visitante seleccionó: Venta",
"direction": 1,
"from": "Visitante"
}
Response
| Object | Field | Type | Required | Description |
|---|---|---|---|---|
| Response | success | boolean | yes | true when the message was saved successfully. |
In case of error, {"success": false} is not returned: the request is cut off with an error (see the following table).
Errors
| Error | Cause |
|---|---|
QUESTION_NOT_FOUND | The questionId sent doesn't exist or doesn't belong to this customer. |
SYSTEM_ERROR | Saving the message failed for another reason (for example, a database error). |
Validation errors (the request is cut off, success: false is not returned)
| Error | Cause |
|---|---|
REQUIRED_INPUT — "questionId is required" | The questionId field is missing. |
REQUIRED_INPUT — "message is required" | The message field is missing. |
REQUIRED_INPUT — "direction is required" | The direction field is missing. |
Sample response
{
"success": true
}
Error example:
{
"success": false,
"error": "QUESTION_NOT_FOUND"
}