Create a webhook endpoint
curl --request POST \
--url https://api.hooper.gg/v1/webhook_endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/hooks/hooper",
"enabled_events": [],
"description": "<string>"
}
'import requests
url = "https://api.hooper.gg/v1/webhook_endpoints"
payload = {
"url": "https://example.com/hooks/hooper",
"enabled_events": [],
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/hooks/hooper',
enabled_events: [],
description: '<string>'
})
};
fetch('https://api.hooper.gg/v1/webhook_endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "we_2",
"object": "webhook_endpoint",
"created": 123,
"url": "<string>",
"status": "enabled",
"enabled_events": [
"*"
],
"description": "<string>",
"secret": "hws_prod_…"
}{
"error": {
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "<string>",
"param": "source.url"
}
}Webhooks
Create a webhook endpoint
The secret (hws_prod_…) is returned once, in this response only. Use it to verify the Hooper-Signature header on deliveries.
POST
/
v1
/
webhook_endpoints
Create a webhook endpoint
curl --request POST \
--url https://api.hooper.gg/v1/webhook_endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/hooks/hooper",
"enabled_events": [],
"description": "<string>"
}
'import requests
url = "https://api.hooper.gg/v1/webhook_endpoints"
payload = {
"url": "https://example.com/hooks/hooper",
"enabled_events": [],
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/hooks/hooper',
enabled_events: [],
description: '<string>'
})
};
fetch('https://api.hooper.gg/v1/webhook_endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "we_2",
"object": "webhook_endpoint",
"created": 123,
"url": "<string>",
"status": "enabled",
"enabled_events": [
"*"
],
"description": "<string>",
"secret": "hws_prod_…"
}{
"error": {
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "<string>",
"param": "source.url"
}
}Authorizations
API key issued by Hooper for your organization. Keys are environment-tagged: hk_prod_ keys work against production, hk_stg_ keys against staging.
Body
application/json
Response
Created
Example:
"we_2"
Allowed value:
"webhook_endpoint"An endpoint that fails for 7 consecutive days is disabled automatically.
Available options:
enabled, disabled Example:
["*"]
Shown once. Sign-verification secret.
Example:
"hws_prod_…"