Rotate signing secret
curl --request POST \
--url https://api.platform.bitnob.com/webhooks/{id}/rotate-secret \
--header 'X-API-Key: <api-key>'const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.platform.bitnob.com/webhooks/{id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.platform.bitnob.com/webhooks/{id}/rotate-secret"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.platform.bitnob.com/webhooks/{id}/rotate-secret",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.platform.bitnob.com/webhooks/{id}/rotate-secret"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.platform.bitnob.com/webhooks/{id}/rotate-secret")
.header("X-API-Key", "<api-key>")
.asString();{
"object": "signing_secret"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "<string>"
}
}Webhooks
Rotate webhook signing secret
Generates a new signing secret. The new secret is returned once.
POST
/
webhooks
/
{id}
/
rotate-secret
Rotate signing secret
curl --request POST \
--url https://api.platform.bitnob.com/webhooks/{id}/rotate-secret \
--header 'X-API-Key: <api-key>'const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.platform.bitnob.com/webhooks/{id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.platform.bitnob.com/webhooks/{id}/rotate-secret"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.platform.bitnob.com/webhooks/{id}/rotate-secret",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.platform.bitnob.com/webhooks/{id}/rotate-secret"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.platform.bitnob.com/webhooks/{id}/rotate-secret")
.header("X-API-Key", "<api-key>")
.asString();{
"object": "signing_secret"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "<string>"
}
}Authorizations
Headers
API version (defaults to the latest supported version if omitted).
Available options:
v1 Unique key (1-255 printable ASCII chars) used to safely retry write operations. Same key + body returns the cached response; same key + different body returns 409.
Required string length:
1 - 255Path Parameters
Webhook ID