Skip to content
Start free in Cloud

Create site webhook REST API

POST
/api/sites/{id}/webhooks
curl --request POST \
--url https://hitkeep.com/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/webhooks \
--header 'Content-Type: application/json' \
--cookie hk_token=<hk_token> \
--data '{ "description": "example", "enabled": true, "events": [ "example" ], "name": "example", "url": "https://example.com" }'

Creates a webhook and returns its signing secret exactly once. Human dashboard session only.

id
required
string format: uuid
Media typeapplication/json
object
description
string
<= 500 characters
enabled
required
boolean
events
required
Array<string>
>= 1 items unique items
name
required
string
<= 120 characters
url
required

HTTPS destination. Loopback, private, link-local, multicast, and otherwise unsafe addresses are rejected unless development targets are explicitly enabled.

string format: uri
Examplegenerated
{
"description": "example",
"enabled": true,
"events": [
"example"
],
"name": "example",
"url": "https://example.com"
}

Created webhook and one-time secret

Media typeapplication/json
object
secret
required

One-time signing secret. It is returned only on creation or rotation.

string
webhook
required
object
created_at
required
string format: date-time
description
required
string
enabled
required
boolean
events
required
Array<string>
id
required
string format: uuid
name
required
string
scope
required
string
Allowed values: instance site
site_id
string | null format: uuid
updated_at
required
string format: date-time
url
required
string format: uri
Example
{
"webhook": {
"scope": "instance"
}
}

Invalid event or destination

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}