# Live-chat to Message-Proxy ## [04/17] Invers 提供文件 #### Request ``` POST /mp/webhooks/native/messages/${organization}/${chatbotName} { "userId": "8fcc179e-302e-4d80-9719-e61df2163a1c", "accessToken": "fc41...........", "payload": { "userSay": "Hello", "userInfo": { "id": "8fcc179e-302e-4d80-9719-e61df2163a1c" }, "userData": { "targetAgents": ["example_qa"], "customPayload": { "data": "string-less-than-256" } } } } ``` #### Url parameters | name | type | required | desc | | ------------- | ------ | -------- | -------------------------------- | | organization | string | required | organization, ex. d8ai | | chatbotName | string | required | chatbot name, ex. d8ai_chatbot | #### Request payload | property | type | required | desc | | -------------------- | ------ | -------- | -------------------------- | | userId | string | required | user id | | accessToken | string | required | access token | | payload.userSay | string | required | user say | | payload.userInfo.id | string | required | must be the same as userId | | payload.userData.targetAgents | array | option | specific chatbot agents | | payload.userData.customPayload.data | string | option | customer data string, less than 256 chars | *NOTE: `organization`, `chatbotName` and `accessToken` are provied by d8ai* #### Response ``` 200 OK {} ``` *NOTE: The bot response will be sent back to webhook.* ------------------------ ## [04/10] Invers 提供文件 #### Request ``` POST /mp/webhooks/native/messages/${organization}/${chatbotName} { "userId": "8fcc179e-302e-4d80-9719-e61df2163a1c", "accessToken": "fc41...........", "payload": { "userSay": "Hello", "userInfo": { "id": "8fcc179e-302e-4d80-9719-e61df2163a1c" }, "userData": { "targetAgents": ["example_qa"], "customPayload": { ... } } } } ``` #### Url parameters | name | type | required | desc | | ------------- | ------ | -------- | -------------------------------- | | organization | string | required | organization, ex. d8ai | | chatbotName | string | required | chatbot name, ex. d8ai_chatbot | #### Request payload | property | type | required | desc | | -------------------- | ------ | -------- | -------------------------- | | userId | string | required | user id | | accessToken | string | required | access token | | payload.userSay | string | required | user say | | payload.userInfo.id | string | required | must be the same as userId | | payload.userData.targetAgents | array | option | specific chatbot agents | | payload.userData.customPayload | object | option | customer data payload | *NOTE: `organization`, `chatbotName` and `accessToken` are provied by d8ai* #### Response ``` 200 OK {} ``` *NOTE: The bot response will be sent back to webhook.* ## [03/09] Invers 提供文件 #### Request ``` POST /mp/webhooks/native/messages/${organization}/${chatbotName} { "userId": "8fcc179e-302e-4d80-9719-e61df2163a1c", "accessToken": "fc41...........", "payload": { "userSay": "Hello", "userInfo": { "id": "8fcc179e-302e-4d80-9719-e61df2163a1c" }, "userData": { "targetAgents": ["example_qa"] } } } ``` #### Url parameters | name | type | required | desc | | ------------- | ------ | -------- | -------------------------------- | | organization | string | required | organization, ex. d8ai | | chatbotName | string | required | chatbot name, ex. d8ai_chatbot | #### Request payload | property | type | required | desc | | -------------------- | ------ | -------- | -------------------------- | | userId | string | required | user id | | accessToken | string | required | access token | | payload.userSay | string | required | user say | | payload.userInfo.id | string | required | must be the same as userId | | payload.userData.targetAgents | array | option | specific chatbot agents | *NOTE: `organization`, `chatbotName` and `accessToken` are provied by d8ai* #### Response ``` 200 OK {} ``` *NOTE: The bot response will be sent back to webhook.*