curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/workflows \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"name": "<string>",
"entry_dataset": "<string>",
"steps": [
{
"type": "emit_event",
"dataset": "<string>",
"payload": {},
"deliver": true
}
],
"slug": "<string>",
"active": true,
"entry_conditions": []
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
entry_dataset: '<string>',
steps: [{type: 'emit_event', dataset: '<string>', payload: {}, deliver: true}],
slug: '<string>',
active: true,
entry_conditions: []
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/workflows', 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}/workflows"
payload = {
"name": "<string>",
"entry_dataset": "<string>",
"steps": [
{
"type": "emit_event",
"dataset": "<string>",
"payload": {},
"deliver": True
}
],
"slug": "<string>",
"active": True,
"entry_conditions": []
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"ok": true
}{
"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>"
}Create a workflow definition
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/workflows \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"name": "<string>",
"entry_dataset": "<string>",
"steps": [
{
"type": "emit_event",
"dataset": "<string>",
"payload": {},
"deliver": true
}
],
"slug": "<string>",
"active": true,
"entry_conditions": []
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
entry_dataset: '<string>',
steps: [{type: 'emit_event', dataset: '<string>', payload: {}, deliver: true}],
slug: '<string>',
active: true,
entry_conditions: []
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/workflows', 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}/workflows"
payload = {
"name": "<string>",
"entry_dataset": "<string>",
"steps": [
{
"type": "emit_event",
"dataset": "<string>",
"payload": {},
"deliver": True
}
],
"slug": "<string>",
"active": True,
"entry_conditions": []
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"ok": true
}{
"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
The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.
Path Parameters
Body
Trimmed before validation.
1 - 120A record landing in this dataset via the ingest/cron/ws pipeline can start an instance. Records emitted BY a workflow never start new ones.
^[a-zA-Z][a-zA-Z0-9_]{0,62}$Ordered steps. Total count INCLUDING nested branch sub-steps must be <= 32.
1- emit_event
- call_ai
- wait_for_event
- delay
- agent_call
- branch
Show child attributes
Show child attributes
Slugified server-side: lowercased, non-alphanumerics collapsed to '-', trimmed, max 48 chars, falling back to 'workflow'. Defaults to a slug of name. Not uniqueness-checked.
Only the literal false deactivates; anything else (including omission) means active. An inactive workflow starts no instances.
Evaluated against the entry record. An empty array matches every record in the dataset.
Show child attributes
Show child attributes