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: str

The raw JSON body of the incoming webhook request.

Returns
class BetaWebhookEvent: type: "event"; id; created_at; data
type: Literal["event"]

Object type. Always event for webhook payloads.

id: str

Unique event identifier for idempotency.

created_at: datetime

RFC 3339 timestamp when the event occurred.

formatdate-time
One of the following:
Parse Unverified
import os
from anthropic import Anthropic

client = Anthropic(
    api_key=os.environ.get(
        "ANTHROPIC_API_KEY"
    ),  # This is the default and can be omitted
)
# `payload` is the raw body of the incoming webhook request.
event = client.beta.webhooks.parse_unverified(
    payload,
)
print(event)