> For the complete documentation index, see [llms.txt](https://docs.serverlessapigateway.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.serverlessapigateway.com/glossary/p/payload.md).

# Payload

The part of transmitted data that is the actual intended message.

A payload is the part of transmitted data that carries the actual content or message, as opposed to headers, metadata, or protocol overhead. In API communication, the payload is the body of an HTTP request or response -- the data that the client sends to the server or receives back.

API request payloads typically contain data needed for an operation, such as user information for creating an account or search criteria for querying records. Response payloads contain the requested data or confirmation of an action. Payloads are most commonly formatted as JSON, though XML, form data, and binary formats are also used depending on the API.

Payload management is an important concern in API gateway design. Gateways can validate incoming payloads against schemas to reject malformed requests early. They can transform payloads between formats (e.g., XML to JSON), strip unnecessary fields to reduce response size, and enforce maximum payload size limits to protect backend services from oversized requests that could cause memory or processing issues.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.serverlessapigateway.com/glossary/p/payload.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
