Recuro.

Payload

Quick Summary — TL;DR

  • A payload is the data in an HTTP request body — typically JSON — that carries the information a server needs to process the request.
  • Used in webhooks, API calls, and background jobs to transmit event data or job parameters.
  • Keep payloads small (pass IDs, not full records), validate on receipt, and watch for size limits (413 errors).

A payload is the data sent in the body of an HTTP request. When you POST to an API, the payload is the JSON (or form data) that carries the information the server needs to process the request. In webhooks and background jobs, the payload contains the event data or job parameters.

Payload vs headers vs URL

An HTTP request has three places to put data:

GET requests usually don't have a payload. POST, PUT, and PATCH requests almost always do.

Common payload formats

Format Content-Type Use case
JSONapplication/jsonAPIs, webhooks, background jobs
Form dataapplication/x-www-form-urlencodedHTML form submissions
Multipartmultipart/form-dataFile uploads
XMLapplication/xmlLegacy SOAP APIs, some payment gateways
Plain texttext/plainSimple notifications, logs

JSON is the standard for modern APIs and webhooks. Unless you have a specific reason to use another format, use JSON.

Payload size considerations

Payloads have practical limits:

If your payload exceeds the limit, the request will fail with a 413 (Payload Too Large) status code. For large data, store it externally (S3, database) and pass a reference URL in the payload instead.

Payload best practices for background jobs

FAQ

What is a payload in an HTTP request?

The payload is the data in the request body — typically JSON — that carries the information needed to process the request. It's the "content" as opposed to the metadata (headers) and address (URL).

Do GET requests have payloads?

Technically the HTTP spec doesn't forbid it, but in practice GET requests send data via URL query parameters, not a body. Most servers and frameworks ignore or reject GET request bodies.

What happens if my payload is too large?

The server returns a 413 Payload Too Large status code. The fix is to reduce the payload size or store the data externally and reference it by URL or ID.

Payloads carry the data for webhooks, webhook events, and background jobs. They should be verified via webhook signatures when receiving external events. The server's response to a payload is indicated by an HTTP status code, and oversized payloads can cause timeouts.

Stop managing infrastructure. Start scheduling jobs.

Recuro handles cron scheduling, retries, alerts, and execution logs -- so you can focus on building your product.

No credit card required