Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
59 lines (46 loc) · 2.06 KB

File metadata and controls

59 lines (46 loc) · 2.06 KB

Survey Livechat Room

Provide feedback on a Livechat room.

HTTP MethodURLRequires Auth
POST/api/v1/livechat/room.surveyno

Body

KeyExample ValueDescription
rid*JZ8Y2dLfYhsg323RThe room ID.
token*d4a8338e5a7d98b6750b4f839431b34a3f4813b2c43f7d89597948f21f607bb4The visitor token.
data*

"data": [ {

"name": "additionalFeedback", "value": "Thankszzzzz" } ]

An array of object with name and value to provide feedback.

Example Call

curl --location --request POST 'http://localhost:3000/api/v1/livechat/room.survey' \
--header 'Content-type: application/json' \
--data-raw '{
    "rid": "gMMeBpWyLeowCrzBv",
    "token": "d4a8338e5a7d98b6750b4f839431b34a3f4813b2c43f7d89597948f21f607bb4",
    "data": [
        {
            "name": "additionalFeedback",
            "value": "Thankszzzzz"
        } 
    ]
}'

Example Response

Success

{
    "rid": "gMMeBpWyLeowCrzBv",
    "data": {
        "additionalFeedback": "Thankszzzzz"
    },
    "success": true
}

Error

Any of the following errors can occur on the endpoint.

  • Invalid token: When the visitor token provided is invalid.
  • Invalid Room: Occurs when the given rid is invalid.

{% tabs %} {% tab title=" Invalid token" %}

{
    "success": false,
    "error": "[invalid-token]",
    "errorType": "invalid-token"
}

{% endtab %} {% endtabs %}