Set SLA policy to an inquiry.
{% hint style="info" %}
- It requires either the
view-l-room
ormanage-livechat-sla
permission. - You can only set the policy for an inquiry that has not been taken by an agent. {% endhint %}
HTTP Method | URL | Requires Auth |
---|---|---|
PUT | /api/v1/livechat/inquiry.setSLA | yes |
Key | Example Value | Description |
---|---|---|
roomId * | ZDYMFPpvnXgptmzMs | The room ID. |
sla * | 6417f67528384134ed600dc6 | Name or ID of the SLA policy. |
curl --location --request PUT 'http://localhost:3000/api/v1/livechat/inquiry.setSLA' \
--header 'x-auth-token: fjiPBhtyFAn5JO3RDdDvKjkXToV2pd4_lb-nkdgJ_Q4' \
--header 'x-user-id: rbAXPnMktTFbNpwtJ' \
--data '{
"roomId":"ZDYMFPpvnXgptmzMs",
"sla":"6417f67528384134ed600dc6"
}'
{
"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: Occurs when the authenticated user neither has the
view-l-room
normanage-livechat-sla
permission. - Invalid Inquiry: This occurs when the inquiry is invalid.
{% tabs %} {% tab title="Authorization" %}
{
"status": "error",
"message": "You must be logged in to do this."
}
{% endtab %}
{% tab title="No Permission" %}
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}
{% endtab %}
{% tab title="Invalid Inquiry" %}
{
"success": false,
"error": "error-invalid-inquiry"
}
{% endtab %} {% endtabs %}
Version | Description |
---|---|
5.0.0 | Added |