Create a webhook
curl --request POST \
--url https://api.shelv.dev/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [],
"url": "<string>"
}
'import requests
url = "https://api.shelv.dev/v1/webhooks"
payload = {
"events": [],
"url": "<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({events: [], url: '<string>'})
};
fetch('https://api.shelv.dev/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({events: [], url: '<string>'})
};
fetch('https://api.shelv.dev/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"createdAt": "2023-11-07T05:31:56Z",
"events": [
"shelf.ready"
],
"publicId": "<string>",
"secret": "<string>",
"url": "<string>",
"userId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Webhooks
Create a webhook
Register a webhook endpoint for shelf lifecycle events.
POST
/
v1
/
webhooks
Create a webhook
curl --request POST \
--url https://api.shelv.dev/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [],
"url": "<string>"
}
'import requests
url = "https://api.shelv.dev/v1/webhooks"
payload = {
"events": [],
"url": "<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({events: [], url: '<string>'})
};
fetch('https://api.shelv.dev/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({events: [], url: '<string>'})
};
fetch('https://api.shelv.dev/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"createdAt": "2023-11-07T05:31:56Z",
"events": [
"shelf.ready"
],
"publicId": "<string>",
"secret": "<string>",
"url": "<string>",
"userId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Minimum array length:
1Available options:
shelf.ready, shelf.failed, shelf.review Webhook endpoint URL. In production, URLs must use https://, avoid URL credentials, use port 443 when explicit, and cannot use localhost/.localhost/.local hostnames. In non-production, http://localhost and http://.localhost are allowed for local testing.
Maximum string length:
2048Response
Webhook created (includes signing secret)
Available options:
shelf.ready, shelf.failed, shelf.review Pattern:
^wh_[0-9a-f]{24}$Webhook endpoint URL. In production, URLs must use https://, avoid URL credentials, use port 443 when explicit, and cannot use localhost/.localhost/.local hostnames. In non-production, http://localhost and http://.localhost are allowed for local testing.
Maximum string length:
2048