Cuenta
Configurar webhook
PUT /v1/account/webhook webhook
Fija la URL del webhook, o bórrala con null.
Cuerpo de la solicitud
| Campo del cuerpo | Tipo | Significado |
|---|---|---|
url * | string (https://…) | null | Debe empezar por https:// |
rotate_secret | bool = false | Fuerza un secreto nuevo aunque la URL no haya cambiado |
respuesta
El secreto se devuelve solo cuando se crea o se rota; enviar la misma URL otra vez responde unchanged con secret: null.
Estado: 200, 400
solicitud
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"}'
respuesta · 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)"
}