Skip to main content
PATCH
/
api
/
v1
/
hooks
/
{hook_id}
Update Hook
curl --request PATCH \
  --url https://api.example.com/api/v1/hooks/{hook_id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "trigger": {
    "type": "<string>",
    "cron": "<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>"
}

Path Parameters

hook_id
string
required

Body

application/json

Request body for updating a hook (all fields optional).

name
string | null
Required string length: 1 - 200
description
string | null
trigger
ScheduleTriggerConfig · object

Trigger that fires on a cron schedule.

condition
string | null

Updated condition expression (pass '' to clear)

actions
Actions · object[] | null
enabled
boolean | null

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