Hesap

Webhook'u ayarla

PUT /v1/account/webhook webhook

Webhook URL'sini ayarlayın veya null ile temizleyin.

İstek gövdesi

Gövde alanıTürAnlamı
url *string (https://…) | nullhttps:// ile başlamalıdır
rotate_secretbool = falseURL değişmese bile yeni bir gizli anahtar zorla

yanıt

Gizli anahtar yalnızca oluşturulduğunda veya döndürüldüğünde döner; aynı URL'yi yeniden göndermek secret: null ile unchanged yanıtı verir.

Durum: 200, 400

istek
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"}'
yanıt · 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)"
}