Set SLA to Inquiry
URL | Requires Auth | HTTP Method |
---|---|---|
/api/v1/livechat/inquiry.setSLA | YES | PUT |
Argument | Example | Required | Description |
---|---|---|---|
X-User-Id | myuser-name | Required | Your username hash (returned after you log in through the API) |
X-Auth-Token | myauth-token | Required | Your token (returned after you log in through the API) |
Argument | Example | Required | Description |
---|---|---|---|
roomId | ZDYMFPpvnXgptmzMs | Required | The room Id |
sla | 6417f67528384134ed600dc6 | Required | Name or Id of the SLA. |
{
"roomId":"ZDYMFPpvnXgptmzMs",
"sla":"6417f67528384134ed600dc6"
}
curl --location --request PUT 'https://writing-demo.dev.rocket.chat/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.
Authorization
No Permission
Invalid Inquiry
{
"status": "error",
"message": "You must be logged in to do this."
}
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}
{
"success": false,
"error": "error-invalid-inquiry"
}
Version | Description |
---|---|
5.0.0 | Added |
Last modified 2mo ago