Updates the source type of an existing conversation. Used when the conversation's flow changes after it was created — for example, when the visitor starts chatting with the AI and at some point moves to a direct contact mode (no AI).
| 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/question/{questionId}/source-type
| Key | Type | Required | Description |
|---|
| questionId | int | yes | Conversation ID. Sent as part of the URL (path param). |
| sourceType | int | yes | The new source type. Known values: 10 = AI chat, 11 = AI chat that moved to direct contact mode. |
| sourceName | string | no | Readable label of the source type, shown in the Inbox. If omitted and sourceType is 10 or 11, it's automatically filled with MapapropChatAI or MapapropChatAI-Contact respectively. For any other sourceType, it's left unset if you don't send it. |
POST /api/action/mapaprop-chat-ai-v1/question/481203/source-type HTTP/1.1
Host: mapaprop.app
Content-Type: application/json
Authorization: Bearer {access_token}
{
"sourceType": 11
}
| Object | Field | Type | Required | Description |
|---|
| Response | success | boolean | yes | true when the update was successful. |
In case of error, {"success": false} is not returned: the request is cut off with an error (see the following table).
| Error | Cause |
|---|
QUESTION_NOT_FOUND | The questionId sent doesn't exist or doesn't belong to this customer. |
| Error | Cause |
|---|
REQUIRED_INPUT — "questionId is required" | The questionId path param is not a valid number. |
REQUIRED_INPUT — "sourceType is required" | The sourceType field is missing. |
{
"success": true
}