Anthropic::BetaWebhooks
Webhooks utility resource (beta)
Used to verify and unwrap secure callback payloads sent by Managed Agents. Follows the standard webhook signature verification specifications.
Constructors
new(client : Client)
SourceInstance methods
unwrap(payload : String, headers : Hash(String, String) | HTTP::Headers, key : String | Nil = nil) : UnwrapWebhookEvent
Unwrap and verify a webhook payload
Verification follows Standard Webhooks: HMAC-SHA256 over webhook-id.webhook-timestamp.payload, base64 encoded, with a 5 minute timestamp tolerance.
client = Anthropic::Client.new
event = client.beta.webhooks.unwrap(
payload: request_body,
headers: request_headers,
key: "whsec_..."
)
puts event.id