# Payload

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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
