curl --request POST \
--url https://api-sandbox.ledgersyncappv2.com/v3/webhooks/subscriptions/{subscription_id}/rotate-secret \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api-sandbox.ledgersyncappv2.com/v3/webhooks/subscriptions/{subscription_id}/rotate-secret"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api-sandbox.ledgersyncappv2.com/v3/webhooks/subscriptions/{subscription_id}/rotate-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://api-sandbox.ledgersyncappv2.com/v3/webhooks/subscriptions/{subscription_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_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.ledgersyncappv2.com/v3/webhooks/subscriptions/{subscription_id}/rotate-secret"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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-sandbox.ledgersyncappv2.com/v3/webhooks/subscriptions/{subscription_id}/rotate-secret")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.ledgersyncappv2.com/v3/webhooks/subscriptions/{subscription_id}/rotate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"id": "whk_01HXYZ8A6N7K2W9PQ4T5Z3V6E0",
"url": "<string>",
"event_types": [
"connection.requires_action",
"connection.active",
"connection.failed",
"connection.disconnected",
"connection.capability_changed",
"account.refresh.completed",
"account.refresh.failed",
"statement.available"
],
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"signing_secret": "<string>",
"last_success_at": "2023-11-07T05:31:56Z",
"last_failure_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "unknown_api_key",
"message": "The API key you presented doesn't match any active key.",
"type": "auth_error",
"doc_url": "https://portal.ledgersyncappv2.com/errors/unknown_api_key",
"category": "AUTH_ERROR",
"is_user_actionable": true,
"source_diagnostic_code": "FIN-103",
"param": "client.email",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"param": "client.email",
"message": "must be a valid email address",
"code": "invalid_email"
}
]
}
}{
"error": {
"code": "unknown_api_key",
"message": "The API key you presented doesn't match any active key.",
"type": "auth_error",
"doc_url": "https://portal.ledgersyncappv2.com/errors/unknown_api_key",
"category": "AUTH_ERROR",
"is_user_actionable": true,
"source_diagnostic_code": "FIN-103",
"param": "client.email",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"param": "client.email",
"message": "must be a valid email address",
"code": "invalid_email"
}
]
}
}Rotate the signing secret
Generate a fresh signing secret. The old one stays valid for a 24-hour grace period so you can deploy your new verifier without dropping a delivery. After that, only the new secret will pass signature checks.
Store the returned signing_secret immediately — same deal
as creation, you only get to see it once.
Empty-body POST
This endpoint takes no request body. Send an explicit
Content-Length: 0 header — Google’s HTTPS load balancer
in front of the API rejects body-less POSTs without one
with 411 Length Required.
curl --request POST \
--url https://api-sandbox.ledgersyncappv2.com/v3/webhooks/subscriptions/{subscription_id}/rotate-secret \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api-sandbox.ledgersyncappv2.com/v3/webhooks/subscriptions/{subscription_id}/rotate-secret"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api-sandbox.ledgersyncappv2.com/v3/webhooks/subscriptions/{subscription_id}/rotate-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://api-sandbox.ledgersyncappv2.com/v3/webhooks/subscriptions/{subscription_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_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.ledgersyncappv2.com/v3/webhooks/subscriptions/{subscription_id}/rotate-secret"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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-sandbox.ledgersyncappv2.com/v3/webhooks/subscriptions/{subscription_id}/rotate-secret")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.ledgersyncappv2.com/v3/webhooks/subscriptions/{subscription_id}/rotate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"id": "whk_01HXYZ8A6N7K2W9PQ4T5Z3V6E0",
"url": "<string>",
"event_types": [
"connection.requires_action",
"connection.active",
"connection.failed",
"connection.disconnected",
"connection.capability_changed",
"account.refresh.completed",
"account.refresh.failed",
"statement.available"
],
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"signing_secret": "<string>",
"last_success_at": "2023-11-07T05:31:56Z",
"last_failure_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "unknown_api_key",
"message": "The API key you presented doesn't match any active key.",
"type": "auth_error",
"doc_url": "https://portal.ledgersyncappv2.com/errors/unknown_api_key",
"category": "AUTH_ERROR",
"is_user_actionable": true,
"source_diagnostic_code": "FIN-103",
"param": "client.email",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"param": "client.email",
"message": "must be a valid email address",
"code": "invalid_email"
}
]
}
}{
"error": {
"code": "unknown_api_key",
"message": "The API key you presented doesn't match any active key.",
"type": "auth_error",
"doc_url": "https://portal.ledgersyncappv2.com/errors/unknown_api_key",
"category": "AUTH_ERROR",
"is_user_actionable": true,
"source_diagnostic_code": "FIN-103",
"param": "client.email",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"param": "client.email",
"message": "must be a valid email address",
"code": "invalid_email"
}
]
}
}Authorizations
Pass your secret key in the Authorization header as a Bearer
token: Authorization: Bearer sk_test_... (sandbox) or
Bearer sk_live_... (production).
Keys are created in the developer portal and the plaintext secret is shown exactly once at creation. Treat them like passwords — never embed them in mobile apps or front-end code.
Path Parameters
Body
No body. Send Content-Length: 0 so the upstream load
balancer doesn't reject the request with 411.
The body is of type object | null.
Response
The new signing secret (returned exactly once).
"whk_01HXYZ8A6N7K2W9PQ4T5Z3V6E0"
[ "connection.requires_action", "connection.active", "connection.failed", "connection.disconnected", "connection.capability_changed", "account.refresh.completed", "account.refresh.failed", "statement.available" ]
active, paused, disabled Plaintext signing secret. Use HMAC-SHA256 with this secret
to verify the X-LS-Webhook-Signature header on incoming
deliveries. Returned ONCE; store it securely.
Reserved. Not populated yet: this field is absent from every response today. Do not build delivery monitoring on it.
Reserved. Not populated yet: this field is absent from every response today. Do not build delivery monitoring on it.
