Enable or disable automation rule
PATCH
/v1/automation/rules/{ruleID}Authorization
bearerAuthbearerAuthrequiredor
apiKeyAuthapiKeyAuthrequiredPath parameters
ruleIDstringrequiredAutomation rule ID
Request body
requiredapplication/jsonenabledboolean | nullrequiredEnable/disable the rule
Responses
200OK
actionsAutomationRuleAction[] | nullrequiredShow propertiesHide properties
Array of
AutomationRuleActionagent_idstringfixed_agent_idstringlabelstringlabel_idstringstrategystringtypestringrequiredcreated_atstringrequiredcreated_bystringrequiredenabledbooleanrequiredidstringrequirednamestringrequiredorganization_idstringrequiredscopeAutomationRuleScoperequiredShow propertiesHide properties
channel_typestringconversation_idstringtriggerAutomationRuleTriggerrequiredShow propertiesHide properties
eventstringeventsstring[] | null400Bad Request
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring401Unauthorized
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring403Forbidden
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring404Not Found
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring422Unprocessable Entity
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring500Internal Server Error
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstringRequest
curl -X PATCH "/v1/automation/rules/string" \
-H "Content-Type: application/json" \
-d '{
"enabled": true
}'const response = await fetch("/v1/automation/rules/string", {
method: "PATCH",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"enabled": true
})
});import requests
response = requests.patch(
"/v1/automation/rules/string",
headers={
"Content-Type": "application/json"
},
json={
"enabled": True
},
)Response
{
"actions": [
{
"agent_id": "string",
"fixed_agent_id": "string",
"label": "string",
"label_id": "string",
"strategy": "string",
"type": "string"
}
],
"created_at": "string",
"created_by": "string",
"enabled": true,
"id": "string",
"name": "string",
"organization_id": "string",
"scope": {
"channel_type": "string",
"conversation_id": "string"
},
"trigger": {
"event": "string",
"events": [
"string"
]
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}