Skip to main content
POST
Update Automation rule

Restrictions

Usage

  • A caller may create personal rules and rules for any team in the current account; team_id is 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_token is returned only when creating or rotating the token. Save it immediately.

Authorizations

app_key
string
query
required

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

application/json

Update an Automation rule. Omit fields to leave them unchanged.

rule_id
string
required

Target rule ID.

name
string

New rule name.

Maximum string length: 255
team_id
integer<int64>

Only the current value is accepted; personal/team scope is immutable after creation.

Required range: x >= 0
enabled
boolean

Whether the rule is enabled.

cron_expr
string

Run 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.

Example:

"15 9 * * *"

schedule_trigger_enabled
boolean

Whether the schedule trigger is enabled.

prompt
string

New task prompt.

environment_kind
enum<string>

Runtime environment kind. Omit or send an empty value for automatic selection.

Available options:
,
cloud,
byoc
environment_id
string

BYOC Runner ID.

http_post_trigger_enabled
boolean

Whether the HTTP POST trigger is enabled. Sending true creates one when missing.

rotate_http_post_trigger_token
boolean

Whether to rotate the HTTP POST trigger token. The new token is returned only in this response.

oncall_incident_trigger_enabled
boolean

Whether the on-call incident trigger is enabled. Sending true creates it when missing and channel/severity filters are provided.

oncall_incident_channel_ids
integer<int64>[]

On-call channel IDs whose new incidents can trigger this rule.

oncall_incident_severities
enum<string>[]

Incident severities that can trigger this rule.

Available options:
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.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

error
object

Error payload inside the response envelope. Present only on non-2xx responses.

data
object

Automation rule.