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

Latest commit

 

History

History
96 lines (74 loc) · 2.65 KB

File metadata and controls

96 lines (74 loc) · 2.65 KB

Update Priority

Update an existing priority.

{% hint style="info" %} You are required to have the manage-livechat-priorities permission. {% endhint %}

HTTP MethodURLRequires Auth
PUT/api/v1/livechat/priorities/:priorityIdyes

Path Variables

KeyExample ValueDescription
priorityId*641daf3d7718f90c810429c8The ID of the priority to update.

Body Parameters

KeyExample ValueDescription
name*Very lowThe name of the priority.

Example Call

{% code overflow="wrap" %}

curl --location --request PUT 'http://localhost:3000/api/v1/livechat/priorities/64007cc2fa0ed7dd905092e3' \
--header 'X-Auth-Token: sMmROZpdpCTbY43XwPT_bCsWJc-VW7v_e2urWhUM766' \
--header 'X-User-Id: rYhzFRd2QZjNwAAXX' \
--header 'Content-Type: application/json' \
--data '{
    "name": "Very low"
}'

{% endcode %}

Example Response

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 manage-livechat-priorities permission.
  • Unable to Update: This error gets returned when no Priority is found with the Id provided.
  • Duplicate: Occurs when the priority to be updated will cause a duplicate.

{% 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": "error-unable-to-update-priority"
}

{% endtab %}

{% tab title="Duplicate" %}

{
    "success": false,
    "error": "error-duplicate-priority-name"
}

{% endtab %} {% endtabs %}

Change Log

Version Description
6.0.0 Added