Set the webhook URL
curl --request PUT \
--url https://{host}/v1/webhook-endpoint \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"url": "<string>",
"enabled": true
}
'const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', enabled: true})
};
fetch('https://{host}/v1/webhook-endpoint', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v1/webhook-endpoint"
payload = {
"url": "<string>",
"enabled": True
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": {
"url": "<string>",
"enabled": true,
"mode": "<string>",
"date_created": "2023-11-07T05:31:56Z",
"date_updated": "2023-11-07T05:31:56Z",
"secret": "<string>",
"previous_secret_until": "2023-11-07T05:31:56Z",
"failing_since": "2023-11-07T05:31:56Z"
},
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": {
"url": "<string>",
"enabled": true,
"mode": "<string>",
"date_created": "2023-11-07T05:31:56Z",
"date_updated": "2023-11-07T05:31:56Z",
"secret": "<string>",
"previous_secret_until": "2023-11-07T05:31:56Z",
"failing_since": "2023-11-07T05:31:56Z"
},
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": {
"fields": {}
},
"code": "13"
}Webhook endpoint
Set the webhook URL
Sets or changes the webhook URL for the key’s mode: https in live, never a private address. The first time, 201 with the signing secret (whsec_…), shown once; a change keeps the secret.
Required permission: feature:WEBHOOKS, webhooks:manage
PUT
/
v1
/
webhook-endpoint
Set the webhook URL
curl --request PUT \
--url https://{host}/v1/webhook-endpoint \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"url": "<string>",
"enabled": true
}
'const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', enabled: true})
};
fetch('https://{host}/v1/webhook-endpoint', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v1/webhook-endpoint"
payload = {
"url": "<string>",
"enabled": True
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": {
"url": "<string>",
"enabled": true,
"mode": "<string>",
"date_created": "2023-11-07T05:31:56Z",
"date_updated": "2023-11-07T05:31:56Z",
"secret": "<string>",
"previous_secret_until": "2023-11-07T05:31:56Z",
"failing_since": "2023-11-07T05:31:56Z"
},
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": {
"url": "<string>",
"enabled": true,
"mode": "<string>",
"date_created": "2023-11-07T05:31:56Z",
"date_updated": "2023-11-07T05:31:56Z",
"secret": "<string>",
"previous_secret_until": "2023-11-07T05:31:56Z",
"failing_since": "2023-11-07T05:31:56Z"
},
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": {
"fields": {}
},
"code": "13"
}