Skip to article
TOOLS. SYSTEMS. BETTER DECISIONS.
Stack & Method

The journal

What is a payload in a REST API?

A clear definition of payload in REST APIs, where it appears in requests and responses, common formats, and practical steps to build and validate one.

Diagram of an HTTP request card with icon markers for method URL headers and a highlighted request body payload area in Stack and Method brand colors

In a REST API, a payload is the actual data carried in the HTTP message body of a request or response. It is the information your client sends to the server (for example, to create or update a resource) or the data the server returns to your client. Common formats include JSON and XML, and files are often sent using multipart form-data (Adchitects: API payloads guide). Many platforms document exactly which fields a request payload must contain for each endpoint (Payload CMS: REST API overview), and some vendors use the term to describe resource-specific bodies you read or send (Microsoft Fabric: Get Item Payload).

Where the payload appears

Request payload vs. response payload

Common formats and methods

Minimalist full frame editorial graphic showing two side by side simplified code panels representing a JSON payload example and an API schema snippet, visual marks indicate required and optional fields

How to build a correct payload

The API’s schema defines the shape

Always match the keys, types, and nesting the API expects. Vendor docs typically specify required and optional fields, examples, and constraints. For example, Microsoft Fabric describes an item payload as the object containing properties specific to that item type (Microsoft Fabric: Get Item Payload).

Size limits and the 413 error

Servers may enforce maximum request sizes. If the request entity exceeds limits, you can receive HTTP 413 Content Too Large. Some servers include a Retry-After header to indicate when to try again (MDN: 413 Content Too Large).

Quick checklist to prepare a request payload

Troubleshooting tips

Common causes of payload errors

Minimalist 2D vector checklist diagram with four icons showing read schema validate json test minimal payload and expand fields on a pale blue brand background

Examples you’ll see in docs

Related reading

FAQ

Is a payload the same as the HTTP body?

Yes. In API discussions, payload usually means the data in the HTTP message body of a request or response (Adchitects: API payloads guide).

What formats are most common?

JSON is widely used, and XML appears in some systems. File uploads commonly use multipart form-data (Adchitects: API payloads guide).

What happens if my payload is too large?

The server may return HTTP 413 Content Too Large, and sometimes a Retry-After header. Reduce size by chunking, pagination, or compression if supported (MDN: 413 Content Too Large).

Stack & Method logo

A useful next step

If the different uses of JSON become confusing, CheckMySchema compares JSON Schema and JSON-LD, including validation and linked page data. JSON Schema vs JSON-LD: what is the difference?.

Related guides

Sources and further reading

Your privacy choices

Optional analytics helps us improve these guides. It stays off until you allow it. Privacy details