BETA

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
AuthenticationRequired (API Token, Bearer)
Scopemapaprop-chat-ai
HTTP MethodPOST
ResponseJSON
Version1

Resource URL

https://mapaprop.app/api/action/mapaprop-chat-ai-v1/question/{questionId}/source-type

Parameters

KeyTypeRequiredDescription
questionIdintyesConversation ID. Sent as part of the URL (path param).
sourceTypeintyesThe new source type. Known values: 10 = AI chat, 11 = AI chat that moved to direct contact mode.
sourceNamestringnoReadable 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.

Sample code

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
}

Response

ObjectFieldTypeRequiredDescription
Responsesuccessbooleanyestrue 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).

Errors

ErrorCause
QUESTION_NOT_FOUNDThe questionId sent doesn't exist or doesn't belong to this customer.

Validation errors (the request is cut off, success: false is not returned)

ErrorCause
REQUIRED_INPUT — "questionId is required"The questionId path param is not a valid number.
REQUIRED_INPUT — "sourceType is required"The sourceType field is missing.

Sample response

{
    "success": true
}