アカウント
Webhook を設定
PUT /v1/account/webhook webhook
Webhook の URL を設定するか、null で解除します。
リクエストボディ
| ボディのフィールド | 型 | 意味 |
|---|---|---|
url * | string (https://…) | null | https:// で始まる必要があります |
rotate_secret | bool = false | URL が変わらなくても新しいシークレットを強制発行 |
レスポンス
シークレットは作成またはローテーション時にのみ返されます。同じ 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)"
}