Claude Platform Docs

Parse Unverified

beta.webhooks.parse_unverified(payload) -> BetaWebhookEvent
Function

Parses a webhook payload into an event without verifying its signature. Prefer unwrap() unless you have already verified the signature yourself.

Parameters
payload: String

The raw JSON body of the incoming webhook request.

Returns
class BetaWebhookEvent { type: :event, id, created_at, data }
type: :event

Object type. Always event for webhook payloads.

id: String

Unique event identifier for idempotency.

created_at: Time

RFC 3339 timestamp when the event occurred.

formatdate-time
One of the following:
Parse Unverified
require "anthropic"

anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")

# `payload` is the raw body of the incoming webhook request.
event = anthropic.beta.webhooks.parse_unverified(payload)

puts(event)