---
title: "POST /alertActionRules"
method: POST
path: "/alertActionRules"
tags: ["Action Rules"]
---

# POST /alertActionRules

`POST /alertActionRules`

Registers a new alert action rule with the account. These rules allow users to link alert action rules to alert condition rule.

## Request body

- AlertActionRuleCreate
  - `id` string — Unique identifier of the alert action rule.
  - `createTimestamp` string, date-time — Time at which the alert action rule was created.
  - `name` string, required — Name to let humans easily identify and understand the alert action rule.
  - `notes` string — Large text field that allows users to leave notes for themselves and others.
  - `enabled` boolean — If set to true, this rule is active, if set to false, it will not be applied.
  - `alertTypes` string[], nullable — If defined, this rule will only trigger on alerts of the given types.
  - `actorIds` string[], nullable — If defined, this rule will only trigger on alerts about actors with the given ids.
  - `actorTypes` string[], nullable — If defined, this rule will only trigger on alerts about actors of the given types.
  - `actorAccountIds` string[], nullable — If defined, this rule will only trigger on alerts about actors from the given accounts.
  - `ruleIds` string[], nullable — If defined, this rule will only trigger on alerts that were generated by one of the given alert condition rules.
  - `priority__gte` integer, nullable — If defined, this rule will only trigger on alerts with a priority greater than or equal to the given value.
  - `priority__lte` integer, nullable — If defined, this rule will only trigger on alerts with a priority less than or equal to the given value.
  - `alertActionIds` string[], required — Defines the actions to take if an alert matches the rule.
  - `locationIds` string[], nullable — If defined, this rule will only trigger on alerts about actors from the given locations.
  - `imageOptions` ImageOptions — Image attachment configuration for an alert action rule. Defines which images are attached when the rule fires. Maximum 6 images total per execution: 1 alert image + 1 optional crop + up to 4 context images.
    - `alertImage` AlertImageConfig, required — Configuration for the primary alert image. Always included when imageOptions is set; cannot be disabled.
      - `embeddedOverlay` boolean — Use the overlay-embedded full-frame image. Falls back to the plain full-frame image if the overlay version is unavailable in alert.data.
      - `includeCropUrl` boolean — Also attach the cropped detection-region image. Silently skipped if the crop URL is not present in alert.data.
    - `contextImages` ContextImageItem[] — Ordered list of additional context images. Each item specifies one image at an explicit second offset from the event timestamp. Offsets must be unique; 0 is excluded (that is the alert image itself).
      - `offsetSeconds` -5 | -4 | -3 | -2 | -1 | 1 | 2 | 3 | 4 | 5, required — Seconds relative to the event timestamp. Negative values are before the event, positive values are after. 0 is excluded — that is the alert image itself (configured in alertImage). Valid range: -5 to +5 excluding 0.
      - `imageType` 'full' — Image type. Only "full" is supported currently.

## Response `201`

Alert action rule registered.

- AlertActionRule
  - `id` string — Unique identifier of the alert action rule.
  - `createTimestamp` string, date-time — Time at which the alert action rule was created.
  - `name` string, required — Name to let humans easily identify and understand the alert action rule.
  - `notes` string — Large text field that allows users to leave notes for themselves and others.
  - `enabled` boolean — If set to true, this rule is active, if set to false, it will not be applied.
  - `alertTypes` string[], nullable — If defined, this rule will only trigger on alerts of the given types.
  - `actorIds` string[], nullable — If defined, this rule will only trigger on alerts about actors with the given ids.
  - `actorTypes` string[], nullable — If defined, this rule will only trigger on alerts about actors of the given types.
  - `actorAccountIds` string[], nullable — If defined, this rule will only trigger on alerts about actors from the given accounts.
  - `ruleIds` string[], nullable — If defined, this rule will only trigger on alerts that were generated by one of the given alert condition rules.
  - `priority__gte` integer, nullable — If defined, this rule will only trigger on alerts with a priority greater than or equal to the given value.
  - `priority__lte` integer, nullable — If defined, this rule will only trigger on alerts with a priority less than or equal to the given value.
  - `alertActionIds` string[] — Defines the actions to take if an alert matches the rule.
  - `locationIds` string[], nullable — If defined, this rule will only trigger on alerts about actors from the given locations.
  - `imageOptions` ImageOptions — Image attachment configuration for an alert action rule. Defines which images are attached when the rule fires. Maximum 6 images total per execution: 1 alert image + 1 optional crop + up to 4 context images.
    - `alertImage` AlertImageConfig, required — Configuration for the primary alert image. Always included when imageOptions is set; cannot be disabled.
      - `embeddedOverlay` boolean — Use the overlay-embedded full-frame image. Falls back to the plain full-frame image if the overlay version is unavailable in alert.data.
      - `includeCropUrl` boolean — Also attach the cropped detection-region image. Silently skipped if the crop URL is not present in alert.data.
    - `contextImages` ContextImageItem[] — Ordered list of additional context images. Each item specifies one image at an explicit second offset from the event timestamp. Offsets must be unique; 0 is excluded (that is the alert image itself).
      - `offsetSeconds` -5 | -4 | -3 | -2 | -1 | 1 | 2 | 3 | 4 | 5, required — Seconds relative to the event timestamp. Negative values are before the event, positive values are after. 0 is excluded — that is the alert image itself (configured in alertImage). Valid range: -5 to +5 excluding 0.
      - `imageType` 'full' — Image type. Only "full" is supported currently.

## Other responses

- `400` — The supplied object is invalid. Error detail will contain the validation error.
- `401` — You are not authenticated. Please authenticate and try again.
- `403` — You have no permission to access the specified resource.
- `404` — Referenced resource could not be found.

---

[API](https://skmtc.net/eagleeyenetworks/apis/devices.md) · [All operations](https://skmtc.net/eagleeyenetworks/apis/devices/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/eagleeyenetworks/devices/revisions/df57313de545/schema)
