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ür | Anlamı |
|---|---|---|
url * | string (https://…) | null | https:// ile başlamalıdır |
rotate_secret | bool = false | URL 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)"
}