Publish a new version of a webhook
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{pid}/webhooks/{id}/versions \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"name": "<string>",
"slug": "<string>",
"dataset": "<string>",
"enabled": true,
"criteria": [
{
"path": "<string>",
"equals": "<string>"
}
],
"mappings": [
{
"path": "<string>",
"key": "<string>"
}
],
"major": false
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
dataset: '<string>',
enabled: true,
criteria: [{path: '<string>', equals: '<string>'}],
mappings: [{path: '<string>', key: '<string>'}],
major: false
})
};
fetch('https://app.hookie.ai/admin/api/projects/{pid}/webhooks/{id}/versions', 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}/versions"
payload = {
"name": "<string>",
"slug": "<string>",
"dataset": "<string>",
"enabled": True,
"criteria": [
{
"path": "<string>",
"equals": "<string>"
}
],
"mappings": [
{
"path": "<string>",
"key": "<string>"
}
],
"major": False
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"slug": "<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>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}Webhooks
Publish a new version of a webhook
Top-level alias: POST /admin/api/webhooks//versions. Write role required.
POST
/
admin
/
api
/
projects
/
{pid}
/
webhooks
/
{id}
/
versions
Publish a new version of a webhook
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{pid}/webhooks/{id}/versions \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"name": "<string>",
"slug": "<string>",
"dataset": "<string>",
"enabled": true,
"criteria": [
{
"path": "<string>",
"equals": "<string>"
}
],
"mappings": [
{
"path": "<string>",
"key": "<string>"
}
],
"major": false
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
dataset: '<string>',
enabled: true,
criteria: [{path: '<string>', equals: '<string>'}],
mappings: [{path: '<string>', key: '<string>'}],
major: false
})
};
fetch('https://app.hookie.ai/admin/api/projects/{pid}/webhooks/{id}/versions', 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}/versions"
payload = {
"name": "<string>",
"slug": "<string>",
"dataset": "<string>",
"enabled": True,
"criteria": [
{
"path": "<string>",
"equals": "<string>"
}
],
"mappings": [
{
"path": "<string>",
"key": "<string>"
}
],
"major": False
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"slug": "<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>"
}{
"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.
Id of any existing webhook row sharing the base slug to version.
Body
application/json
A complete webhook spec (same validator as create) plus the optional major flag.
Required string length:
1 - 80Must equal the base slug of the webhook named by {id}.
Pattern:
^[a-z0-9][a-z0-9-]{0,46}$Pattern:
^[A-Za-z][A-Za-z0-9_]{0,62}$Maximum array length:
10Show child attributes
Show child attributes
Maximum array length:
50Show child attributes
Show child attributes
true bumps the major version (2), otherwise the minor is incremented (1.1).