Account

Webhook instellen

PUT /v1/account/webhook webhook

Stel de webhook-URL in, of wis hem met null.

Request-body

Body-veldTypeBetekenis
url *string (https://…) | nullMoet beginnen met https://
rotate_secretbool = falseForceer een nieuw geheim, ook als de URL niet is gewijzigd

antwoord

Het geheim wordt alleen teruggegeven wanneer het wordt aangemaakt of geroteerd; dezelfde URL opnieuw sturen antwoordt met unchanged en secret: null.

Status: 200, 400

verzoek
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"}'
antwoord · 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)"
}