Skip to content

Latest commit

 

History

History
95 lines (73 loc) · 2.65 KB

File metadata and controls

95 lines (73 loc) · 2.65 KB

Set Livechat Room Priority

Set the priority of a Livechat room.

{% hint style="info" %} You are required to have the view-l-room permission. {% endhint %}

HTTP MethodURLRequires Auth
POST/api/v1/livechat/room/:rid/priorityyes

Path Variables

KeyExample ValueDescription
rid*tcbbSmWSLR5uo5PBWThe room ID.

Body

KeyExample ValueDescription
priorityId*64007cc2fa0ed7dd905092e6The ID of the priority to set.

Example Call

curl --location 'http://localhost:3000/api/v1/livechat/room/tcbbSmWSLR5uo5PBW/priority' \
--header 'X-Auth-Token: sMmROZpdpCTbY43XwPT_bCsWJc-VW7v_e2urWhUM766' \
--header 'X-User-Id: rYhzFRd2QZjNwAAXX' \
--header 'Content-Type: application/json' \
--data '{
    "priorityId": "64007cc2fa0ed7dd905092e6"
}'

Example Result

Success

{
    "success": true
}

Error

Any of the following errors can occur on the endpoint.

  • Authorization: Requires an authentication token for the request to be made.
  • No Permission: This occurs when the authenticated user doesn't have view-l-room permission.
  • Invalid Parameter: Gets returned when no priority Id is sent in the body.
  • Invalid priority: This error gets returned when no Priority is found with the Id provided.

{% tabs %} {% tab title=" Authorization" %}

{
    "status": "error",
    "message": "You must be logged in to do this."
}

{% endtab %}

{% tab title="No Permission" %}

{
    "success": false,
    "error": "error-not-authorized"
}

{% endtab %}

{% tab title="Unable to Update" %}

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

{% endtab %}

{% tab title="Invalid Priority" %}

{
    "success": false,
    "error": "error-invalid-priority"
}

{% endtab %} {% endtabs %}

Change Log

Version Description
6.0.0 Added