Rotate the signing secret
curl --request POST \
--url https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}/secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}/secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}/secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}/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 => [
"Authorization: Bearer <token>"
],
]);
$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://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}/secret"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}/secret")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}/secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "c3d4e5f6-a1b2-4c3d-8e5f-6a7b8c9d0e1f",
"signingSecret": "whsec_9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c"
}{
"message": "Resource not found"
}{
"message": "Internal server error"
}Manage Subscriptions
[DRAFT] Rotate signing secret
POST
/
webhooks
/
subscriptions
/
{subscriptionId}
/
secret
Rotate the signing secret
curl --request POST \
--url https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}/secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}/secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}/secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}/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 => [
"Authorization: Bearer <token>"
],
]);
$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://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}/secret"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}/secret")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}/secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "c3d4e5f6-a1b2-4c3d-8e5f-6a7b8c9d0e1f",
"signingSecret": "whsec_9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c"
}{
"message": "Resource not found"
}{
"message": "Internal server error"
}Coming soon: The Webhooks API is currently under design review. This documentation describes the target interface and may change before release.
Overview
Generates a new signing secret for the subscription and invalidates the previous one immediately.Important: rotate the secret if you suspect it has been compromised. Since the previous secret stops working at rotation time, update the secret in your endpoint as soon as you receive the response — deliveries signed with the new secret start immediately.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the webhook subscription
Response
Signing secret successfully rotated. The previous secret is invalidated immediately — update your endpoint before rotating.