create_rule
Create a rule using the Public API rule-create request body.
Input schema
Section titled “Input schema”{ "additionalProperties": false, "properties": { "application_id": { "title": "Application Id", "type": "string" }, "body": { "additionalProperties": true, "title": "Body", "type": "object" } }, "required": [ "application_id", "body" ], "title": "create_ruleArguments", "type": "object"}Output schema
Section titled “Output schema”{ "properties": { "actions": { "items": { "additionalProperties": true, "type": "object" }, "title": "Actions", "type": "array" }, "applicationId": { "format": "uuid", "title": "Applicationid", "type": "string" }, "condition": { "additionalProperties": true, "title": "Condition", "type": "object" }, "createdAt": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Createdat" }, "createdBy": { "format": "uuid", "title": "Createdby", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "format": "uuid", "title": "Id", "type": "string" }, "isActive": { "title": "Isactive", "type": "boolean" }, "modelId": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "title": "Modelid" }, "name": { "title": "Name", "type": "string" }, "phase": { "enum": [ "pre_save", "post_save", "response", "background" ], "title": "RulePhase", "type": "string" }, "priority": { "title": "Priority", "type": "integer" }, "run_as": { "default": "actor", "enum": [ "actor", "app_automation" ], "title": "RuleRunAs", "type": "string" }, "scope": { "additionalProperties": true, "title": "Scope", "type": "object" }, "settings": { "additionalProperties": true, "title": "Settings", "type": "object" }, "tenantId": { "format": "uuid", "title": "Tenantid", "type": "string" }, "trigger": { "enum": [ "record_create", "record_update", "record_save", "record_delete", "record_read", "frontend_event", "webhook_received", "tool_called", "manual", "login_succeeded", "login_failed", "function_failed" ], "title": "RuleTrigger", "type": "string" }, "updatedAt": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Updatedat" }, "workspaceId": { "format": "uuid", "title": "Workspaceid", "type": "string" } }, "required": [ "id", "tenantId", "workspaceId", "applicationId", "name", "condition", "actions", "trigger", "phase", "priority", "isActive", "settings", "createdBy" ], "title": "RuleResponse", "type": "object"}