Claude Platform Docs

Parse Unverified

client.beta.webhooks.parseUnverified(body): BetaWebhookEvent
Function

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

Parameters
body: string

The raw JSON body of the incoming webhook request.

Returns
interface 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: string

RFC 3339 timestamp when the event occurred.

formatdate-time
One of the following:
Parse Unverified
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env["ANTHROPIC_API_KEY"] // This is the default and can be omitted
});

// `body` is the raw body of the incoming webhook request.
const event = client.beta.webhooks.parseUnverified(body);

console.log(event);