Remove a canned response.
{% hint style="info" %}
It requires the remove-canned-responses
permission.
{% endhint %}
URL | Requires Auth | HTTP Method |
---|---|---|
/api/v1/canned-responses |
yes |
DELETE |
Argument | Example | Required | Description |
---|---|---|---|
_id |
EwmbZ9nLSx7kFamYB |
Required | The canned response's id. |
{
"_id": "646c7350a8c3a3ba32d0e2e0"
}
curl --location --request DELETE 'http://localhost:3000/api/v1/canned-responses' \
--header 'X-User-Id: 2tTEqR7ZNMJ4HGGNa' \
--header 'X-Auth-Token: A6PF2Qa-wXunBXi3j77OBY-T-gl1BvJ11jYiSMt6Z_G' \
--data '{
"_id": "64700874a8c3a3ba32d0fb1c"
}'
{
"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 doesn't have the
logout-device-management
permission. - Canned Response not found: Occurs when the
_id
of the canned response does not exist.
{% 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="Canned Response not found" %}
{
"success": false,
"error": "Canned Response not found [error-canned-response-not-found]",
"errorType": "error-canned-response-not-found",
"details": {
"method": "removeCannedResponse"
}
}
{% endtab %} {% endtabs %}
Version | Description |
---|---|
1.0.0 | Added |