Rotate a webhook secret
curl --request POST \
--url https://coinstack.net/api/v1/webhooks/{webhook_id}/rotate \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coinstack.net/api/v1/webhooks/{webhook_id}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://coinstack.net/api/v1/webhooks/{webhook_id}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coinstack.net/api/v1/webhooks/{webhook_id}/rotate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"response": {
"webhook": {
"webhook_id": "c2a9f1d4-7b3e-4c6a-9d2f-5e8b1a4c7d30",
"url": "https://example.com/webhooks/coinstack",
"events": [
"checkout.completed",
"checkout.expired"
],
"active": true,
"created_at": "2026-12-02T15:58:20.331904Z",
"updated_at": "2026-12-02T16:44:51.730196Z"
},
"secret": "whsec_9e2c4a6b8d0f1a3c5e7b9d2f4a6c8e0b1d3f5a7c9e2b4d6f8a0c1e3b5d7f9a2c"
}
}Webhooks
Rotate a webhook secret
Replaces a webhook’s signing secret. The old secret stops working straight away, so update your server as soon as you have the new one.
Requires an API key with write access.
POST
/
webhooks
/
{webhook_id}
/
rotate
Rotate a webhook secret
curl --request POST \
--url https://coinstack.net/api/v1/webhooks/{webhook_id}/rotate \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coinstack.net/api/v1/webhooks/{webhook_id}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://coinstack.net/api/v1/webhooks/{webhook_id}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coinstack.net/api/v1/webhooks/{webhook_id}/rotate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"response": {
"webhook": {
"webhook_id": "c2a9f1d4-7b3e-4c6a-9d2f-5e8b1a4c7d30",
"url": "https://example.com/webhooks/coinstack",
"events": [
"checkout.completed",
"checkout.expired"
],
"active": true,
"created_at": "2026-12-02T15:58:20.331904Z",
"updated_at": "2026-12-02T16:44:51.730196Z"
},
"secret": "whsec_9e2c4a6b8d0f1a3c5e7b9d2f4a6c8e0b1d3f5a7c9e2b4d6f8a0c1e3b5d7f9a2c"
}
}