Rotate webhook signing secret
Replace the secret that signs your batch.completed webhooks, for free.
POST
https://api.up2data.ai/v1/account/webhook-secret/rotateIssues a new whsec_ secret for your organization and discards the old one in the same step. There is no overlap window: every webhook delivered after this call, including retries of earlier jobs, is signed with the new secret, so update your verifier before you rotate. The same secret is shown under Settings, Webhook Integrations in the portal and in webhook.signing_secret on GET /v1/account. The meta object on this response has no latencyMs.
#Request
No request body.
#Call it
curl -X POST "https://api.up2data.ai/v1/account/webhook-secret/rotate" \
-H "X-API-Key: YOUR_API_KEY"import requests
url = "https://api.up2data.ai/v1/account/webhook-secret/rotate"
headers = {
"X-API-Key": "YOUR_API_KEY",
}
response = requests.post(url, headers=headers)
print(response.json())const url = "https://api.up2data.ai/v1/account/webhook-secret/rotate";
const headers = {
"X-API-Key": "YOUR_API_KEY",
};
const response = await fetch(url, {
method: "POST",
headers,
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.up2data.ai/v1/account/webhook-secret/rotate"
req, err := http.NewRequest("POST", url, nil)
if err != nil {
panic(err)
}
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
respBody, _ := io.ReadAll(resp.Body)
fmt.Println(string(respBody))
}#Response
{
"data": {
"signing_secret": "whsec_9c2e7a1d8c6b5e3f2a1908d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a29180794f0c",
"signature_header": "X-Up2Data-Signature"
},
"meta": { "creditsUsed": 0, "creditsRemaining": 98413, "billed": false, "reason": "success", "requestId": "req_ac10mmd3" }
}#Errors
| Status | Type | When | Billed |
|---|---|---|---|
| 401 | invalid_api_key | Missing, malformed, or revoked key. | No |
| 429 | rate_limited | Over the per-key requests/min limit. Honor Retry-After. | No |
| 500 | internal_error | Something broke on the server side. | No |
See the Errors guide for every error type this version can return.