Claude Platform Docs

Parse Unverified

UnwrapWebhookEvent beta().webhooks().parseUnverified(body)
Function

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

Parameters
String body

The raw JSON body of the incoming webhook request.

Returns
class UnwrapWebhookEvent { type = "event"; id; createdAt; data; }
JsonValue type = "event"

Object type. Always event for webhook payloads.

String id

Unique event identifier for idempotency.

OffsetDateTime createdAt

RFC 3339 timestamp when the event occurred.

formatdate-time
One of the following:
Parse Unverified
package com.anthropic.example;

import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.webhooks.UnwrapWebhookEvent;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();

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