Update an existing SLA policy.
| HTTP Method | URL | Requires Auth |
|---|---|---|
PUT | /api/v1/livechat/sla/:slaId | yes |
{% hint style="info" %}
Permission required: manage-livechat-sla
{% endhint %}
| Key | Example Value | Description |
|---|---|---|
slaId* | 641daf3d7718f90c810429c8 | The ID of the SLA to update. |
| Key | Example Value | Description |
|---|---|---|
name* | Minimal updated | The name of the SLA policy. |
description | sla description updated | The SLA description. |
dueTimeInMinutes* | 7 | The SLA due time. |
{% code overflow="wrap" %}
curl --location --request PUT 'http://localhost:3000/api/v1/livechat/sla/641daf3d7718f90c810429c8' \
--header 'X-Auth-Token: q2zjkgQt_OmYaBY4nEp50-r7yUAqVIoAqgo0jjBIws5' \
--header 'X-User-Id: rYhzFRd2QZjNwAAXX' \
--header 'Content-Type: application/json' \
--data '{
"name": "Minimal updated",
"description": "Minimal SLA updated",
"dueTimeInMinutes": 7
}'{% endcode %}
{
"sla": {
"name": "Minimal updated",
"description": "Minimal SLA updated",
"dueTimeInMinutes": 7,
"_updatedAt": "2023-03-24T16:31:34.712Z",
"_id": "641daf3d7718f90c810429c8"
},
"success": true
}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-slapermission. - Not Found: This error gets returned when no SLA 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="Not Found" %}
{
"success": false,
"error": "SLA with id gfgfg56g429c8 not found"
}{% endtab %} {% endtabs %}
| Version | Description |
|---|---|
| 6.0.0 | Added |