Skip to main content
POST
Create a trigger
Save a trigger. A trigger an agent creates is saved off; the owner turns it on. Requires the automations:write scope.

Authorizations

x-api-key
string
header
required

An Avazal API key (avz_…) created in Settings → API keys.

Body

application/json
name
string
required
scope
enum<string>
required
Available options:
team,
personal
when
object
required

When a trigger fires: on matching messages or on a schedule.

agent
object
required
prompt
string
required
refs
maxItems(24) · object[]

What the owner picked in the words, by id and position.

Maximum array length: 24
routes
object[]
sensitivity
enum<string>
Available options:
strict,
standard,
relaxed

Response

A saved trigger with its owner, state and last run.

A saved trigger with its owner, state and last run.

name
string
required
scope
enum<string>
required
Available options:
team,
personal
when
object
required

When a trigger fires: on matching messages or on a schedule.

agent
object
required
prompt
string
required
routes
object[]
required
sensitivity
enum<string>
required
Available options:
strict,
standard,
relaxed
id
string
required

The object's id. Every operation that takes it accepts it.

ownerId
string
required

The Avazal user who created the trigger.

enabled
boolean
required
paused
object | null
required
lastRunAt
string | null
required
suggested
boolean
required
url
string | null
required

A link that opens the object where it lives.

source
enum<string>
required

Where the object lives. Avazal is the source of its own objects.

Available options:
avazal,
slack,
gmail,
google-calendar,
google-drive,
linear,
github,
contacts
refs
maxItems(24) · object[]

What the owner picked in the words, by id and position.

Maximum array length: 24