Create an agentic-AI event trigger
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/triggers \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"name": "<string>",
"match": {
"dataset": "<string>",
"conditions": [
{
"path": "<string>",
"equals": "<string>"
}
]
},
"config": {
"instructions": "<string>",
"prompt": "<string>",
"model": "<string>",
"output_dataset": "<string>",
"max_tokens": 123
},
"action_type": "ai_agent"
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
match: {dataset: '<string>', conditions: [{path: '<string>', equals: '<string>'}]},
config: {
instructions: '<string>',
prompt: '<string>',
model: '<string>',
output_dataset: '<string>',
max_tokens: 123
},
action_type: 'ai_agent'
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/triggers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/triggers"
payload = {
"name": "<string>",
"match": {
"dataset": "<string>",
"conditions": [
{
"path": "<string>",
"equals": "<string>"
}
]
},
"config": {
"instructions": "<string>",
"prompt": "<string>",
"model": "<string>",
"output_dataset": "<string>",
"max_tokens": 123
},
"action_type": "ai_agent"
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}Triggers
Create an agentic-AI event trigger
POST
/
admin
/
api
/
projects
/
{project_id}
/
triggers
Create an agentic-AI event trigger
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/triggers \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"name": "<string>",
"match": {
"dataset": "<string>",
"conditions": [
{
"path": "<string>",
"equals": "<string>"
}
]
},
"config": {
"instructions": "<string>",
"prompt": "<string>",
"model": "<string>",
"output_dataset": "<string>",
"max_tokens": 123
},
"action_type": "ai_agent"
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
match: {dataset: '<string>', conditions: [{path: '<string>', equals: '<string>'}]},
config: {
instructions: '<string>',
prompt: '<string>',
model: '<string>',
output_dataset: '<string>',
max_tokens: 123
},
action_type: 'ai_agent'
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/triggers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/triggers"
payload = {
"name": "<string>",
"match": {
"dataset": "<string>",
"conditions": [
{
"path": "<string>",
"equals": "<string>"
}
]
},
"config": {
"instructions": "<string>",
"prompt": "<string>",
"model": "<string>",
"output_dataset": "<string>",
"max_tokens": 123
},
"action_type": "ai_agent"
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}Authorizations
sessionbearerAuth
The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.
Path Parameters
Body
application/json
Stored verbatim as JSON; shape is not validated at write time. Interpreted at fire time as {dataset, conditions?}. An empty or absent conditions array matches every event in the dataset.
Show child attributes
Show child attributes
Stored verbatim as JSON; normalized and bounded at run time by parseAgentConfig.
Show child attributes
Show child attributes
Response
Created. Always enabled.