Skip to main content
POST
Update Automation rule

Restrictions

Usage

  • Omitted or null fields are left unchanged. Empty arrays for *_channel_ids / *_severities also keep the stored lists.
  • team_id cannot change: sending a value different from the stored one returns 400. Resending the current value is accepted.
  • cron_expr and timezone can be sent independently; the other keeps its stored value. Sending timezone: "" stores UTC.
  • Sending environment_kind without environment_id clears the stored environment_id.
  • http_post_trigger_enabled=true creates the HTTP POST trigger when the rule has none and returns its token. rotate_http_post_trigger_token=true issues a new token (the old one stops working) and requires the trigger to be enabled. A new token is returned only in this response.
  • Creating an On-call incident or war room trigger through update needs both its channel IDs and severities.
  • Manage rights: a personal rule (team_id=0) can be managed only by its owner; a team rule only by members of that team. Account owners and admins get no exemption and must join the team.
  • While another update, delete, or manual run of the same rule is in progress, the call fails with HTTP 423 and code: "RequestLocked"; retry later.
  • Every call is recorded in the account audit log.

Authorizations

app_key
string
query
required

APP Key created in the Flashduty console under My → APP Key. Send it as the app_key query parameter or in the Fd-App-Key request header. Its effective access is the intersection of the key's permission scope and the creator's current role permissions. Keep it secret.

Body

application/json

Update an Automation rule. Omit or send null on a field to leave it unchanged.

rule_id
string
required

Target rule ID, from the list returned by POST /safari/automation/rule/list.

name
string | null

New display name, at most 255 characters. An empty string after trimming is rejected.

Maximum string length: 255
team_id
integer<int64> | null

The rule's scope cannot be changed. Omit this field, or send the current value; any other value returns 400.

Required range: x >= 0
enabled
boolean | null

Whether the rule's automatic triggers are armed. Omit to keep the current value.

cron_expr
string | null

New schedule, same format as on create: 4 fields (hour day month weekday) or 5 fields (minute hour day month weekday), fixed-integer minute, no seconds, not both day-of-month and day-of-week. Omit to keep the current expression.

Example:

"15 9 * * *"

timezone
string | null

New IANA time zone for cron_expr. An empty string stores UTC. Omit or send null to keep the current time zone.

schedule_trigger_enabled
boolean | null

Whether the schedule trigger is enabled. Omit to keep the current value.

prompt
string | null

New task instruction for the agent. Omit to keep the current one.

environment_kind
enum<string> | null

New runtime environment: "" automatic selection (prefers an online BYOC runner, falls back to the cloud sandbox), cloud platform-hosted cloud sandbox, byoc the runner in environment_id. Sending this without environment_id clears the stored environment_id.

Available options:
,
cloud,
byoc
environment_id
string | null

BYOC runner ID; required when the resulting environment_kind is byoc, rejected otherwise.

http_post_trigger_enabled
boolean | null

Enable or disable the HTTP POST trigger. true on a rule without one creates it and returns its token in this response.

oncall_incident_trigger_enabled
boolean | null

Enable or disable the On-call incident trigger. Creating it on a rule that has none also needs oncall_incident_channel_ids and oncall_incident_severities.

oncall_incident_channel_ids
integer<int64>[]

Replaces the watched channel IDs when non-empty; an empty or omitted list keeps the stored IDs.

Required range: x >= 1
oncall_incident_severities
enum<string>[]

Replaces the watched severities when non-empty (Critical (most severe), Warning, or Info (least severe) — the On-call incident severity levels); an empty or omitted list keeps the stored values.

Available options:
Critical,
Warning,
Info
oncall_incident_merge_similar
boolean | null

Whether to merge similar incidents into one analysis (see the create request). Omit to keep the current value.

war_room_trigger_enabled
boolean | null

Enable or disable the war room trigger. Creating it on a rule that has none also needs war_room_channel_ids and war_room_severities. Omit to keep the current value.

war_room_channel_ids
integer<int64>[]

Replaces the channel IDs whose war rooms start a run when non-empty; an empty or omitted list keeps the stored IDs.

Required range: x >= 1
war_room_severities
enum<string>[]

Replaces the war room severities when non-empty (Critical (most severe), Warning, or Info (least severe) — the On-call incident severity levels); an empty or omitted list keeps the stored values.

Available options:
Critical,
Warning,
Info
rotate_http_post_trigger_token
boolean

When true, issues a new HTTP POST trigger token and invalidates the old one. The trigger must exist and be enabled. The new token is returned only in this response.

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.