All posts

Web Operations

JSON Formatter Checklist Before Sharing Webhook Payloads

A practical checklist for formatting webhook JSON, checking required fields, redacting secrets, and sharing reproducible payload examples.

2026-07-29 8 min read JSON formatterWebhook payloadAPI debugging

Search intent: the webhook failed, but the payload example is hard to trust

Webhook issues often arrive as one long JSON string copied from a log, chat message, or browser console. The receiver can see that an event was sent, but it is difficult to tell whether the failure came from a missing field, invalid nesting, a timestamp format, a signature header, or a value that was redacted too aggressively. If the payload is not readable, the team starts debugging the report before it can debug the webhook.

Before sharing a webhook payload, I format it first and then remove only the sensitive values. A browser JSON formatter such as https://tools.sambro.space/en/tools/json-formatter helps make object structure, arrays, missing commas, and quoted values visible. If the payload includes callback URLs or encoded query values, https://tools.sambro.space/en/tools is useful for checking whether the URL itself is valid before blaming the webhook receiver.

Start with the exact event and route

The first line of a useful webhook note should identify the event name, the receiving route, and the expected action. A payload for `invoice.paid`, `user.created`, or `deployment.completed` should not be shared as only webhook test failed. The same endpoint may accept multiple event types, and each one can require a different set of fields. Naming the event narrows the review before anyone reads the JSON body.

Write the route shape without leaking private tokens. For example, `/api/webhooks/provider` is useful, while a full signed URL may expose unnecessary values. If the problem happened on a public web workflow, keep the broader Sambro site references separate: company context at https://sambro.space/, tools at https://tools.sambro.space/en/tools, and the blog note at https://blog.sambro.space/. The payload report should stay focused on the failing handoff.

Format first, redact second

A common mistake is redacting the raw line before formatting it. That can accidentally remove quotes, braces, commas, or nested values that prove the shape of the payload. Format the JSON first, confirm it parses, then replace secrets with stable placeholders such as `REDACTED_API_KEY`, `CUSTOMER_ID`, or `SIGNED_HEADER_VALUE`. Keep the type and length meaningful when the receiver validates format. A UUID-shaped placeholder is better than the word secret when the field expects a UUID.

Do not redact field names unless they are themselves private. A receiver cannot check required fields if the sample hides `event`, `created_at`, `data`, or `metadata`. If a value is too sensitive to share, leave the key and state what kind of value was removed. That preserves the contract while protecting the data.

Check the fields that commonly break webhook handling

The fields that deserve a deliberate pass are event type, object ID, timestamp, API version, nested `data` object, optional metadata, signature-related headers, and any callback URL. Check whether timestamps are seconds, milliseconds, or ISO strings before copying them into an incident note. If the timestamp is central to the report, https://tools.sambro.space/en/tools can help compare the event time with logs and deployment notes.

Also check empty arrays and null values. A payload can be valid JSON and still break application code that assumes a list has at least one item or a field is always present. If the failing sample includes `null`, `[]`, or an empty string, keep that evidence. It may be the entire bug.

A practical checklist before sending the payload example

My final pass is fixed: identify the event, name the receiving route, format the JSON, confirm it parses, redact only sensitive values, preserve field names, keep null and empty values when relevant, include one expected result, include one actual result, and attach the status code or error message. If the report is going into Slack, share the JSON in a code block so link previews and smart formatting do not change the evidence.

For a Sambro workflow, format the sample at https://tools.sambro.space/en/tools/json-formatter, inspect callback URLs with https://tools.sambro.space/en/tools, and use https://tools.sambro.space/en/tools/word-counter to keep the surrounding explanation concise. A webhook payload example is useful when another person can paste it into a test, compare it with logs, and see exactly what changed without asking for the raw secret-filled version.

Back to Sambro Blog