Rotate a custom signing secret
Replace the signing secret immediately and return it once.
POST
/api/v1/custom-integrations/:key/rotate-secretconst response = await fetch("https://api.smallworld.sh/api/v1/custom-integrations/example/rotate-secret", {
method: "POST",
headers: { Authorization: `Bearer ${apiKey}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();
Use your server-side apiKey. Replace the example IDs.
Path parameters#
keystringrequiredThe saved integration's command key, URL-encoded.
Responses#
Returns only the new signingSecret. There is no overlap period with the previous secret.
{
"signingSecret": "whsec_new_secret"
}
More about this endpoint
Update your endpoint's verification secret immediately. The old secret stops signing new requests as soon as rotation commits.