Konto
Webhook setzen
PUT /v1/account/webhook webhook
Die Webhook-URL setzen oder mit null löschen.
Request-Body
| Body-Feld | Typ | Bedeutung |
|---|---|---|
url * | string (https://…) | null | Muss mit https:// beginnen |
rotate_secret | bool = false | Ein neues Secret erzwingen, auch wenn sich die URL nicht geändert hat |
Antwort
Das Secret wird nur zurückgegeben, wenn es erstellt oder rotiert wird; dieselbe URL erneut zu senden antwortet mit unchanged und secret: null.
Status: 200, 400
Anfrage
curl -X PUT https://api.xsignalfeed.com/v1/account/webhook \ -H "Authorization: Bearer xsf_your_key" -H "Content-Type: application/json" \ -d '{"url": "https://example.com/hooks/xsf"}'
Antwort · 200 / 400
{
"status": "set",
"url": "https://example.com/hooks/xsf",
"secret": "a1b2c3…",
"rotated": true,
"signature_header": "X-XSF-Signature",
"algorithm": "hmac-sha256(secret, raw_body)"
}