계정

웹훅 설정

PUT /v1/account/webhook webhook

웹훅 URL을 설정하거나 null로 해제합니다.

요청 본문

본문 필드타입의미
url *string (https://…) | nullhttps://로 시작해야 함
rotate_secretbool = falseURL이 바뀌지 않아도 새 시크릿을 강제 발급

응답

시크릿은 생성되거나 교체될 때만 반환됩니다. 같은 URL을 다시 보내면 secret: null과 함께 unchanged로 응답합니다.

상태: 200, 400

요청
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"}'
응답 · 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)"
}