Akun

Setel webhook

PUT /v1/account/webhook webhook

Setel URL webhook, atau kosongkan dengan null.

Isi permintaan

Bidang bodyTipeArti
url *string (https://…) | nullHarus diawali https://
rotate_secretbool = falsePaksa secret baru meskipun URL tidak berubah

respons

Secret hanya dikembalikan saat dibuat atau dirotasi; mengirim URL yang sama lagi menjawab unchanged dengan secret: null.

Status: 200, 400

permintaan
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"}'
respons · 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)"
}