Conta

Definir webhook

PUT /v1/account/webhook webhook

Defina a URL do webhook, ou limpe-a com null.

Corpo da requisição

Campo do corpoTipoSignificado
url *string (https://…) | nullDeve começar com https://
rotate_secretbool = falseForça um novo segredo mesmo que a URL não tenha mudado

resposta

O segredo é retornado apenas quando é criado ou rotacionado; enviar a mesma URL de novo responde unchanged com secret: null.

Status: 200, 400

requisição
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"}'
resposta · 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)"
}