Webhook Authentication: What Integrators Need to Know
When a provider sends an HTTP request to your service because an event occurred, your receiver has to decide whether to accept…
A producer sends an HTTP request to a consumer's endpoint whenever an event occurs. That request carries a body, called the payload, with details about the event. If the payload grows larger than a limit set by the sender, the delivery channel, or the receiving infrastructure, the consumer may get nothing at all, a shorter notification, or a link to fetch the full data. Webhook providers do not follow a single universal size limit or one standard rule for oversized events.
When you write a webhook contract, state the maximum body size in bytes and explain what the sender does when an event exceeds that limit. Consumers can then configure their receivers to accept the documented size and handle missing events or retrieval links. If your events carry large or unpredictable amounts of data, you can send a short notification along with instructions for fetching the full resource so consumers still get everything they need.
State the maximum size of the serialized request body in bytes, including JSON punctuation and field names. Consumers can measure bytes directly, whereas a character count is unreliable because encoded characters take up different numbers of bytes. You should also clarify whether the limit applies before or after compression, and whether each delivery channel enforces its own cap.
Published guidelines are only starting points, so treat them as recommendations rather than hard caps. The Standard Webhooks specification recommends keeping payloads below 20 KB to reduce the load on consumers. That advice does not establish a universal maximum, and it does not guarantee that a given provider will accept larger bodies. Actual limits vary by provider and delivery channel. For example, GitHub documents a 25 MB cap, while Shopify sets different limits for Events delivered over HTTPS, Google Cloud Pub/Sub, and Amazon EventBridge.
On the receiving side, consumers should configure a maximum body size to protect their servers and verify that it fits the sender's documented payloads. OWASP recommends enforcing a maximum request-body size alongside content-type and schema checks. OWASP also advises sending an oversized test request to the receiver to confirm it returns a 400 or 413 response. Keep in mind that this rule only covers how a receiver rejects bad input; it says nothing about what a producer does when an event exceeds its own limit. You should also check the size limits on every proxy, gateway, queue, and service along the delivery path. If any hop enforces a lower cap, it will drop or reject the request before the webhook handler ever sees it.
Your contract should spell out what the producer does when an event exceeds the limit: whether it skips the event, sends a shorter body, marks the payload as truncated, or gives the consumer a way to fetch the full data. Explain how consumers can spot that behavior and what they should do next. Consumers should rely on those documented rules instead of guessing whether the sender will truncate, retry, or drop an oversized event.
Providers handle this in very different ways. GitHub states that it does not deliver a webhook payload at all when an event exceeds 25 MB. Twilio takes a different approach for Batch Transcription status callbacks: it skips the callback if the serialized payload exceeds 1 MB. Twilio still finishes the transcription, but consumers can retrieve the transcript afterward only if they set conversationConfigurationId beforehand. Both rules apply only to those specific products. Because a missing callback looks the same as no event happening, consumers cannot tell from an empty log whether the producer skipped a delivery. The producer needs monitoring or a reconciliation mechanism to account for skipped callbacks.
Other producers send a compact overflow notification when the full payload exceeds a channel limit. Shopify Events uses an overflow payload containing fields such as payload_url, payload_size_bytes, and expires_at. The consumer follows that URL to download the full content before it expires. Shopify treats the URL as a short-lived credential, and for HTTPS delivery it instructs handlers to verify the HMAC on the notification itself rather than on the downloaded content. Those details are specific to Shopify's Events delivery structure. If you adopt a similar pattern in your own contract, document the notification's fields, how consumers authenticate the download, when the link expires, and how consumers verify the notification.
Update your contract whenever delivery-channel limits change. On November 17, 2026, Shopify announced that Amazon EventBridge accepts inline webhook and Events payloads up to 1,000,000 bytes, up from 256 KB. Above that cap, classic webhooks send only an identifier, so consumers have to call the Admin API to fetch the full record. Events deliveries instead send a short notification with a retrieval URL, payload size, and expiry time. According to the Shopify changelog, the inline limit sits below 1 MB to leave room for EventBridge's surrounding message envelope. Consumers using this channel should also confirm that their downstream AWS targets accept events up to 1 MB.
When your events carry large or unpredictable amounts of data, such as long text, attachments, images, or big arrays, you can send a short notification and let consumers fetch the full resource from an endpoint. The producer includes enough information for the consumer to identify the event and decide whether to pull the rest. That setup also saves bandwidth when many consumers only care about a few fields, because they skip downloading data they never use.
Spell out in the contract what that fetch endpoint returns. It might return a snapshot of the resource from the moment the event fired, or it might return the resource's current state. Because those two behaviors produce different results, consumers should never assume that fetched data matches the exact values at the time of the event. Document which credentials authorize the request and how long the data stays available.
Real-world APIs show how retrieval windows vary, even though none of them sets a universal rule for webhooks. Stripe lets callers retrieve an event by its ID for 30 days after it is created. Shopify's overflow URL expires, so consumers have to download the payload before that deadline. In Twilio's transcription case, consumers must configure retrieval before Twilio skips the callback. A fetch endpoint only solves oversized events if the producer retains the data and tells consumers how long they have to retrieve it.
Before you build a separate fetch endpoint, trim unnecessary fields from the payload whenever the provider supports field filtering. Shopify recommends narrowing classic webhook payloads with include_fields and scoping Events queries to the data subscribers need. If you omit a field, consumers should not expect to recover it later unless the provider exposes it through an API.
Producers should track serialized body sizes, count how many events exceed the cap, and log every time the system uses an overflow route. You should also check whether consumers fetch overflow data before the link expires. GitHub recommends monitoring payload sizes, and Shopify recommends keeping queries as small as possible. When a provider skips an oversized event, consumer request logs will never show that a delivery was missed, which makes producer-side metrics and reconciliation tools especially valuable.
Consumers should test requests at and slightly above their configured size limit to verify that their receiver, intermediary infrastructure, and fetch code behave as documented. For more on status codes and delivery failures, see webhook error responses and webhook delivery semantics.
Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.
Take a look at vroni.com