Create Trigger
POST
/api/automations/triggers
const url = 'http://localhost:8000/api/automations/triggers';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
TriggerCreate
object
actions
Actions
Array<object>
object
key
additional properties
any
condition
Condition
string
enabled
Enabled
boolean
name
required
Name
string
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
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Examplegenerated
exampleValidation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
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" } ]}