Skip to content

Create Trigger

POST
/api/automations/triggers
curl --request POST \
--url http://localhost:8000/api/automations/triggers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "actions": [ {} ], "condition": "", "enabled": true, "max_actions_per_day": 1, "max_spend_usd_per_day": 1, "name": "example", "scope_workbook_ids": [ "example" ], "stop_on_error": false, "trigger_config": {}, "trigger_type": "example" }'
x-workspace-id
Any of:
string
Media typeapplication/json
TriggerCreate
object
actions
Actions
Array<object>
object
key
additional properties
any
condition
Condition
string
""
enabled
Enabled
boolean
default: true
max_actions_per_day
Any of:
integer
max_spend_usd_per_day
Any of:
number
name
required
Name
string
>= 1 characters <= 200 characters
scope_workbook_ids
Scope Workbook Ids
Array<string>
stop_on_error
Stop On Error
boolean
trigger_config
Trigger Config
object
key
additional properties
any
trigger_type
required
Trigger Type
string

Successful Response

Media typeapplication/json
Examplegenerated
example

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}