Enable or disable a webhook
curl --request PATCH \
--url https://app.hookie.ai/admin/api/projects/{pid}/webhooks/{id} \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"enabled": true
}
'const options = {
method: 'PATCH',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://app.hookie.ai/admin/api/projects/{pid}/webhooks/{id}', 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/{pid}/webhooks/{id}"
payload = { "enabled": True }
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"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>"
}Webhooks
Enable or disable a webhook
Top-level alias: PATCH /admin/api/webhooks/. Write role required. Name, slug, criteria, dataset and mappings are not editable - publish a new version instead.
PATCH
/
admin
/
api
/
projects
/
{pid}
/
webhooks
/
{id}
Enable or disable a webhook
curl --request PATCH \
--url https://app.hookie.ai/admin/api/projects/{pid}/webhooks/{id} \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"enabled": true
}
'const options = {
method: 'PATCH',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://app.hookie.ai/admin/api/projects/{pid}/webhooks/{id}', 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/{pid}/webhooks/{id}"
payload = { "enabled": True }
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"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
sessionbearerAuth
The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.
Path Parameters
Project id (UUID) belonging to the caller workspace.
Webhook id.
Body
application/json
The mirror mapping rule is toggled with it.
Response
Updated.