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

Latest commit

 

History

History
74 lines (58 loc) · 2.37 KB

File metadata and controls

74 lines (58 loc) · 2.37 KB

Set Livechat Appearance

Update the livechat widget appearance settings.

HTTP MethodURLRequires Auth
POST/api/v1/livechat/appearanceyes

{% hint style="info" %} Permission required: view-livechat-manager {% endhint %}

Body Parameters

KeyExample ValueDescription
items*

[ { "_id":"Livechat_title", "value":"Hello" },

{ "_id":"Livechat_show_agent_email",

"value":"false" }

]

An array of objects containing the _id and value of the settings to be updated. See the get-livechat-appearance.md example response for the _id of each setting.

Example Call

curl -L -X POST 'http://localhost:3000/api/v1/livechat/appearance' \
-H 'x-auth-token: qlHA60g5JQjJJG7C_8MgXoFnOiRQ8X9TWVVq4AcQeFb' \
-H 'x-user-id: rbAXPnMktTFbNpwtJ' \
-H 'Content-Type: application/json' \
-d '[
    {
       "_id":"Livechat_title",
       "value":"Hello"
    },
    {
        "_id":"Livechat_show_agent_email",
        "value":"false"
    },
    {
        "_id":"Livechat_show_agent_info",
        "value":true
    },
    {
        "_id":"Livechat_title_color",
        "value":"#b427bed"
    }			
]'

Example Response

Success

{
    "success": true
}

Error

Any of the following errors can occur on this endpoint:

  • Id Required: Occurs when an object in the array does not have the required property _id. A similar error occurs if an object in the array does not have the required property value.

{% tabs %} {% tab title="Id Required" %}

{
    "success": false,
    "error": "must have required property '_id' [invalid-params]",
    "errorType": "invalid-params"
}

{% endtab %} {% endtabs %}

Change Log

Version Description
6.4.0 Added