重新產生組織 Webhook 端點簽署密鑰
POST/v1/organizations/webhooks/{webhook_endpoint_id}/regenerate_signing_secret
Requires
anthropic-beta: webhooks-2026-10-07. Learn how to send beta headers.替換組織 webhook 端點的簽署密鑰。舊密鑰會立即失效。新密鑰僅會在此回應中傳回。
每個請求都必須包含 beta 標頭 anthropic-beta: webhooks-2026-10-07。未包含此標頭的請求會傳回 404,就如同此 API 不存在一樣。Anthropic 會為每個組織個別開啟組織 webhook 端點功能;在您的組織開啟之前,請求也會傳回 404。組織 webhook 端點目前為 beta 版,且不適用於已啟用 HIPAA 就緒的組織。
重新產生組織 Webhook 端點簽署密鑰
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ.get(
"ANTHROPIC_API_KEY"
), # This is the default and can be omitted
)
beta_organization_webhook_endpoint_signing_secret = (
client.beta.organization.webhooks.regenerate_signing_secret(
webhook_endpoint_id="webhook_endpoint_id",
)
)
print(beta_organization_webhook_endpoint_signing_secret.signing_secret)Response 200
{
"signing_secret": "signing_secret"
}Returns Examples
Response 200
{
"signing_secret": "signing_secret"
}