Read a webhook endpoint's signing secret
curl --request GET \
--url https://api2.endstate.io/v1/webhooks/endpoints/{endpoint_id}/secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://api2.endstate.io/v1/webhooks/endpoints/{endpoint_id}/secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api2.endstate.io/v1/webhooks/endpoints/{endpoint_id}/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://api2.endstate.io/v1/webhooks/endpoints/{endpoint_id}/secret",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api2.endstate.io/v1/webhooks/endpoints/{endpoint_id}/secret"
req, _ := http.NewRequest("GET", 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.get("https://api2.endstate.io/v1/webhooks/endpoints/{endpoint_id}/secret")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api2.endstate.io/v1/webhooks/endpoints/{endpoint_id}/secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"secret": "whsec_5ZB6DVzB1wjE8S6rZ7eenA8Pdnhs",
"previous_secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
"previous_secret_expires_at": "2026-09-23T12:05:00.000Z"
}{
"error": {
"code": "validation.failed",
"message": "The request failed schema validation. See `error.details` for per-field issues.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/validation-failed"
}
}{
"error": {
"code": "auth.unauthorized",
"message": "Credential is missing or malformed.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/auth-unauthorized"
}
}{
"error": {
"code": "auth.forbidden",
"message": "Credential is valid but does not have access to the requested resource or action.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/auth-forbidden"
}
}{
"error": {
"code": "webhook_endpoint.not_found",
"message": "The webhook endpoint does not exist in your organization.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/webhook-endpoint-not-found"
}
}{
"error": {
"code": "webhook_endpoint.deleted",
"message": "The webhook endpoint was deleted and cannot be used for this operation.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/webhook-endpoint-deleted"
}
}{
"error": {
"code": "rate_limit.exceeded",
"message": "Per-key rate limit exceeded.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/rate-limit-exceeded"
}
}{
"error": {
"code": "internal.error",
"message": "An unexpected server error occurred. Retry with exponential backoff and include `request_id` in any support request.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/internal-error"
}
}Webhooks
Read a webhook endpoint's signing secret
Returns the current signing secret, and the previous one while it is still valid after a rotation. Requires an admin API key. Every read is recorded.
GET
/
v1
/
webhooks
/
endpoints
/
{endpoint_id}
/
secret
Read a webhook endpoint's signing secret
curl --request GET \
--url https://api2.endstate.io/v1/webhooks/endpoints/{endpoint_id}/secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://api2.endstate.io/v1/webhooks/endpoints/{endpoint_id}/secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api2.endstate.io/v1/webhooks/endpoints/{endpoint_id}/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://api2.endstate.io/v1/webhooks/endpoints/{endpoint_id}/secret",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api2.endstate.io/v1/webhooks/endpoints/{endpoint_id}/secret"
req, _ := http.NewRequest("GET", 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.get("https://api2.endstate.io/v1/webhooks/endpoints/{endpoint_id}/secret")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api2.endstate.io/v1/webhooks/endpoints/{endpoint_id}/secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"secret": "whsec_5ZB6DVzB1wjE8S6rZ7eenA8Pdnhs",
"previous_secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
"previous_secret_expires_at": "2026-09-23T12:05:00.000Z"
}{
"error": {
"code": "validation.failed",
"message": "The request failed schema validation. See `error.details` for per-field issues.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/validation-failed"
}
}{
"error": {
"code": "auth.unauthorized",
"message": "Credential is missing or malformed.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/auth-unauthorized"
}
}{
"error": {
"code": "auth.forbidden",
"message": "Credential is valid but does not have access to the requested resource or action.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/auth-forbidden"
}
}{
"error": {
"code": "webhook_endpoint.not_found",
"message": "The webhook endpoint does not exist in your organization.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/webhook-endpoint-not-found"
}
}{
"error": {
"code": "webhook_endpoint.deleted",
"message": "The webhook endpoint was deleted and cannot be used for this operation.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/webhook-endpoint-deleted"
}
}{
"error": {
"code": "rate_limit.exceeded",
"message": "Per-key rate limit exceeded.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/rate-limit-exceeded"
}
}{
"error": {
"code": "internal.error",
"message": "An unexpected server error occurred. Retry with exponential backoff and include `request_id` in any support request.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/internal-error"
}
}Authorizations
Use Authorization: Bearer end_sk_* for partner API keys (e.g. end_sk_AbCd_example_api_key).
Path Parameters
Example:
"8e1a7f50-90ab-4cde-8012-3456789abcde"

