Create Automation rule
Create an Automation rule with a schedule trigger and, optionally, an HTTP POST trigger.
Restrictions
Usage
- A caller may create personal rules and rules for any team in the current account;
team_idis immutable after creation. - List visibility follows session-list visibility: owners/admins see all rules; ordinary members see rules they created and rules for their teams.
http_post_tokenis returned only when creating or rotating the token. Save it immediately.
Authorizations
App key issued from the Flashduty console. Required on every public API call. Keep it secret — it grants the same access as the owning account.
Body
Create an Automation rule.
Rule name.
1 - 255Run cadence. Supports 4 fields (hour day month weekday, minute defaults to 0) and 5 fields (minute hour day month weekday). The minute must be one fixed integer; 6-field seconds are not supported. The create API currently requires this field even for HTTP-POST-only rules; send a valid cron and set schedule_trigger_enabled=false.
"15 9 * * *"
Task prompt sent to the AI SRE agent on each run.
1Scope team ID. 0 or omitted means a personal rule; >0 means a team in the account. Immutable after creation.
x >= 0Whether the rule is enabled after creation. Omitted API value is false; Chat/CLI create sends true by default unless the user asks for disabled.
Whether the schedule trigger is enabled. Defaults to true when omitted; HTTP-POST-only rules should send false.
Runtime environment kind. Omit or send an empty value for automatic selection.
, cloud, byoc BYOC Runner ID. Used only when environment_kind=byoc.
Whether to create and enable an HTTP POST trigger. When enabled, the response includes a one-time token.
Whether to create and enable an on-call incident trigger for this rule.
On-call channel IDs whose new incidents can trigger this rule.
Incident severities that can trigger this rule.
Critical, Warning, Info Response
Success
Standard response envelope used by every Flashduty public API. On success data contains the endpoint-specific payload and error is absent. On failure error is present and data is absent. request_id is always present and is also mirrored in the Flashcat-Request-Id response header.