Compte

Définir le webhook

PUT /v1/account/webhook webhook

Définir l'URL du webhook, ou l'effacer avec null.

Corps de la requête

Champ du corpsTypeSignification
url *string (https://…) | nullDoit commencer par https://
rotate_secretbool = falseForcer un nouveau secret même si l'URL n'a pas changé

réponse

Le secret n'est renvoyé que lorsqu'il est créé ou renouvelé ; renvoyer la même URL répond unchanged avec secret: null.

Statut: 200, 400

requête
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"}'
réponse · 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)"
}