Creates a tenant-scoped automation rule in automation_rules. Authentication uses x-api-key with optional x-tenant-id; RBAC requires automation:create. The controller validates request body via createAutomationRuleSchema, and the service validates trigger/action config, inserts the rule with crypto.randomUUID generated rule_id, and emits automation.rule.created + audit log events.
Content type: application/json · schema CreateAutomationRuleRequest
activeinactivedrafterrorlownormalhighcriticaltime_basedevent_basedcondition_basedmanualrecurringwebhookequalsnot_equalsgreater_thanless_thangreater_than_or_equalless_than_or_equalcontainsnot_containsstarts_withends_withinnot_inexistsnot_existsregex_matchstringnumberbooleandatearrayobjectandoremail_notificationsms_notificationwebhook_calldatabase_updateticket_creationticket_updateproject_updatetime_entry_creationinvoice_generationcustom_scriptworkflow_executionsystem_commandSuccess response 201 · schema AutomationRuleResponse
activeinactivedrafterrorlownormalhighcriticaltime_basedevent_basedcondition_basedmanualrecurringwebhookequalsnot_equalsgreater_thanless_thangreater_than_or_equalless_than_or_equalcontainsnot_containsstarts_withends_withinnot_inexistsnot_existsregex_matchstringnumberbooleandatearrayobjectandoremail_notificationsms_notificationwebhook_calldatabase_updateticket_creationticket_updateproject_updatetime_entry_creationinvoice_generationcustom_scriptworkflow_executionsystem_command