Skip to main content
POST
/
api
/
v1
/
hooks
Create Hook
curl --request POST \
  --url https://api.example.com/api/v1/hooks \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "trigger": {
    "type": "<string>",
    "cron": "<string>"
  },
  "description": "<string>",
  "condition": "<string>",
  "actions": [
    {}
  ],
  "enabled": true
}
'
{
  "id": "<string>",
  "account_id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "trigger": {},
  "condition": "<string>",
  "actions": [
    {}
  ],
  "enabled": true,
  "last_run_at": "2023-11-07T05:31:56Z",
  "next_run_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>",
  "cron": "<string>",
  "cron_description": "<string>"
}

Body

application/json

Request body for creating a hook (any trigger type).

name
string
required

Human-readable name

Required string length: 1 - 200
trigger
ScheduleTriggerConfig · object
required

Trigger that fires on a cron schedule.

description
string | null

Optional description

condition
string | null

Optional rule expression — hook only fires when this evaluates to True

actions
Actions · object[]

Ordered list of actions to execute

enabled
boolean
default:true

Whether the hook is active on creation

Response

Successful Response

Response schema for a single hook.

id
string
required
account_id
string
required
name
string
required
description
string | null
required
trigger
Trigger · object
required
condition
string | null
required
actions
Actions · object[]
required
enabled
boolean
required
last_run_at
string<date-time> | null
required
next_run_at
string<date-time> | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
created_by
string | null
required
cron
string | null

Cron expression (schedule triggers only)

cron_description
string | null

Human-readable cron schedule