Rotate a webhook signing secret
curl --request POST \
--url https://public-api.hyperlocalise.com/v1/webhook-endpoints/{endpointId}/rotate-secret \
--header 'x-api-key: <api-key>'const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api.hyperlocalise.com/v1/webhook-endpoints/{endpointId}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/webhook-endpoints/{endpointId}/rotate-secret"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.hyperlocalise.com/v1/webhook-endpoints/{endpointId}/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))
}{
"secret": "<string>"
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Webhooks
Rotate a webhook signing secret
Requires webhooks:write. Replaces the secret immediately. The new value is returned this once. The previous secret stops working with the next delivery.
POST
https://public-api.hyperlocalise.com
/
v1
/
webhook-endpoints
/
{endpointId}
/
rotate-secret
Rotate a webhook signing secret
curl --request POST \
--url https://public-api.hyperlocalise.com/v1/webhook-endpoints/{endpointId}/rotate-secret \
--header 'x-api-key: <api-key>'const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api.hyperlocalise.com/v1/webhook-endpoints/{endpointId}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/webhook-endpoints/{endpointId}/rotate-secret"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.hyperlocalise.com/v1/webhook-endpoints/{endpointId}/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))
}{
"secret": "<string>"
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Was this page helpful?

