Skip to main content
POST
Create an action rule

Authorizations

Authorization
string
header
required

A workspace-scoped key with write ability and the actions.rules.store or actions.rules.update grant. Send Accept: application/json.

Path Parameters

workspace
integer
required

The workspace ID

Body

application/json

Creates a disabled rule. enabled must be absent. window, window_days, author_type and current_revision_id must be absent or empty.

name
string
required
Maximum string length: 255
Pattern: \S
definition
object
required

Only target_level, action, budget_change_percent, minimum_counted_arrivals, cost_comparison and cost_ratio are accepted.

platform_ad_account_id
integer
required
Required range: x >= 1
account_id
integer

Optional account ID, ignored by an account-bound key. An unbound key requires exactly one active available advertising account with an active connection; omission uses that account and a supplied ID must match it. Multiple active accounts return 422 even when account_id is supplied.

Required range: x >= 1
enabled
any
window
window_days
author_type
current_revision_id

Response

Saved rule with immutable revisions; no runs are included.

rule
object
required