Webhook Subscriptions
Rotate webhook secret
Generates a new signing secret for the webhook subscription.
POST
/
api
/
v3
/
webhook_subscriptions
/
{id}
/
rotate_secret
Rotate webhook secret
import requests
url = "https://backend.composio.dev/api/v3/webhook_subscriptions/{id}/rotate_secret"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://backend.composio.dev/api/v3/webhook_subscriptions/{id}/rotate_secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://backend.composio.dev/api/v3/webhook_subscriptions/{id}/rotate_secret \
--header 'x-api-key: <api-key>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://backend.composio.dev/api/v3/webhook_subscriptions/{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://backend.composio.dev/api/v3/webhook_subscriptions/{id}/rotate_secret")
.header("x-api-key", "<api-key>")
.asString();using RestSharp;
var options = new RestClientOptions("https://backend.composio.dev/api/v3/webhook_subscriptions/{id}/rotate_secret");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-api-key", "<api-key>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
false{
"id": "<string>",
"secret": "<string>"
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}Authorizations
Rotate webhook secret
import requests
url = "https://backend.composio.dev/api/v3/webhook_subscriptions/{id}/rotate_secret"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://backend.composio.dev/api/v3/webhook_subscriptions/{id}/rotate_secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://backend.composio.dev/api/v3/webhook_subscriptions/{id}/rotate_secret \
--header 'x-api-key: <api-key>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://backend.composio.dev/api/v3/webhook_subscriptions/{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://backend.composio.dev/api/v3/webhook_subscriptions/{id}/rotate_secret")
.header("x-api-key", "<api-key>")
.asString();using RestSharp;
var options = new RestClientOptions("https://backend.composio.dev/api/v3/webhook_subscriptions/{id}/rotate_secret");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-api-key", "<api-key>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
false{
"id": "<string>",
"secret": "<string>"
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}