payload
The actual data a message carries, as opposed to the headers and framing around it.
In more detail
In an HTTP message the payload is the body after the headers and a blank line: a JSON representation, a problem document or form data. Content-Type says what format it is in and Content-Length how many bytes it has, and some responses, such as 204, 304 and every answer to HEAD, have none. In a JSON Web Token the payload is the middle part holding the claims, and in a webhook or socket message it is the event data.
Example
In the browser: A CustomEvent's payload goes in detail, a postMessage payload is structured-cloned, and a Background Sync queue stores request payloads until they can be sent.Related terms
- JSON Web Token — A compact signed token made of three base64url parts separated by dots: a header, a payload of claims and a signature.
- webhook — An HTTP request a provider sends to an address you registered, to tell you an event happened, instead of you polling for it.
- API contract — The written promise an API makes about its operations, inputs, outputs and errors, which callers rely on while the code behind it changes.
- client-generated identifier — An identifier the client creates before its first attempt and reuses on every resend.
- event envelope — A standard outer structure that wraps an event's business payload with metadata such as event ID, type, version and time.
- record value — The main content of a record, stored by Kafka as raw bytes it never inspects.
- model binding — Turning parts of an HTTP request, such as route values, the query string, headers and the JSON body, into typed parameters for your handler.
- JSON — A simple text format for structured data made of keys, values, lists and nested objects.
- serialization — Turning an in-memory object into bytes, such as JSON text, that can be sent or stored, and parsing it back again.
- CustomEvent — A browser event type you create and name yourself, which carries any data you like in its detail property.
- postMessage() — The method used to send data between a page and a worker, or between windows, delivered as a message event on the other side.
- DTO — A plain object whose only job is to carry data across a boundary, such as the body of an API request or response.
- input validation — Checking that data from a user, file or caller is acceptable before using it, and rejecting or asking again if not.
- HTTP header — A named line of metadata in an HTTP message, such as Content-Type: application/json, that describes the body, the caller or how to handle the exchange.
- transport layer — The layer that carries data between programs on two machines, identified by port numbers, using TCP or UDP.
- application layer — The top layer, where protocols such as HTTP, DNS and SSH give the bytes meaning as requests, answers and commands.
- RSC payload — The compact data stream React produces from Server Components, describing the rendered tree, props for Client Components and placeholders.
- untrusted input — Any data a program did not create itself, including arguments, form fields, request bodies, file contents, file names and environment variables.
- packet — A chunk of data with a header giving its source and destination addresses, which the network routes independently towards its destination.
- message body — The data carried after the headers in an HTTP request or response, such as a JSON document.
- reducer action — A plain object describing something that happened, usually with a type string and optional payload data, sent to a reducer through dispatch.
- Fetch API — The standard JavaScript function fetch() for making HTTP requests, built into browsers and current server runtimes, which returns a promise for the response.
Taught in
- Streaming Responses — AI Engineering: LLM Apps, RAG & Agents
- Images, Audio And Speech — AI Engineering: LLM Apps, RAG & Agents
- Large Payloads And Streaming — Modern API Architecture: REST, GraphQL & gRPC
- JSON Web Tokens — Modern API Architecture: REST, GraphQL & gRPC
- WebSockets — Modern API Architecture: REST, GraphQL & gRPC
- Server-Sent Events — Modern API Architecture: REST, GraphQL & gRPC
- The Edge: WAF, Shield, CloudFront And GuardDuty — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- KMS And Envelope Encryption: Who Can Still Decrypt? — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Retention Deletes Files, Not Records — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- The Field The Registry Refused — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Twelve Lines Instead Of Four Hundred — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Building Routes with Controllers — Modern .NET Core, C# & Enterprise Microservices
- Building Routes with Minimal APIs — Modern .NET Core, C# & Enterprise Microservices
- Comparing Controllers and Minimal APIs — Modern .NET Core, C# & Enterprise Microservices
- CustomEvent Dispatching And Decoupled Component Event Buses — Frontend Architecture & Web Platform
- Web Workers: Off-Thread Computation And Structured Clone — Frontend Architecture & Web Platform
- Background Sync, Push Notifications And PWA Manifests — Frontend Architecture & Web Platform
- End-to-End Type Safety: Shared Schemas & DTOs — Production Full-Stack Engineering
- API Contract Architecture: OpenAPI 3.1 & Schema Truth — Production Full-Stack Engineering
- API Gateway & BFF Patterns: Backend-for-Frontend — Production Full-Stack Engineering
- Asynchronous Event Processing: Outbox Pattern & Queues — Production Full-Stack Engineering
- Retries With Backoff Topics — Apache Kafka & Event Streaming
- Headers, Envelopes And Event Metadata — Apache Kafka & Event Streaming
- The Transactional Outbox — Apache Kafka & Event Streaming
- TCP Versus UDP — Linux Fundamentals & Systems Administration
- App Router Architecture: Server-First Paradigms — Next.js 15 & Modern App Router Architecture
- Client Components: use client & Hydration Models — Next.js 15 & Modern App Router Architecture
- Server Action Security: Zod Validation & Auth Gates — Next.js 15 & Modern App Router Architecture
- Data Cache: Cross-Request Persistence & Fetch Tags — Next.js 15 & Modern App Router Architecture
- Full Route Cache: Static Rendering & Segment Config — Next.js 15 & Modern App Router Architecture
- Router Cache: In-Memory Client Prefetch Semantics — Next.js 15 & Modern App Router Architecture
- Node.js Process Architecture: Memory & Heap Spaces — Node.js Internals & Backend Services
- Poll & Check Phases: I/O Callbacks & setImmediate — Node.js Internals & Backend Services
- Binary Data Manipulation: TypedArrays & Endianness — Node.js Internals & Backend Services
- Transform Streams: Custom Packet Decoding & Codecs — Node.js Internals & Backend Services
- Complex State with useReducer: State Machines And Action Types — React 19 & Modern Component Architecture
- useEffect Lifecycle: Mount, Dependencies, And Cleanup Phases — React 19 & Modern Component Architecture
- Creating Event Listener Hooks with Clean Teardown Logic — React 19 & Modern Component Architecture
- useActionState: Async Action Handlers And Pending States — React 19 & Modern Component Architecture
- The use() Hook: Reading Promises And Context Directly — React 19 & Modern Component Architecture
- Error Boundaries: componentDidCatch And Fallback UI Trees — React 19 & Modern Component Architecture
- Client-Side Data Fetching Architectures with Suspense — React 19 & Modern Component Architecture
- Worked Design Two: A Global Chat System — Scalable System Design & Distributed Architecture
- Why TypeScript: Contracts, Erased Types And Soundness — Production TypeScript
- Literal Types: String, Number, Boolean Literals And const — Production TypeScript
- any Versus unknown: Defensive Typing In Practice — Production TypeScript
- void, undefined And null: Exact Optional Property Types — Production TypeScript
- Type Aliases Versus Interfaces: Declaration Merging — Production TypeScript
- Discriminated Unions: Tagged Variants And Pattern Matching — Production TypeScript
- The in Operator And Instanceof Narrowing — Production TypeScript
- Custom Type Predicates: Functions Returning is Type — Production TypeScript
- Exhaustive Narrowing With never In Production Handlers — Production TypeScript
- Why Generics: Functions, Identities And Type Variables — Production TypeScript
- Generic Interfaces, Classes And Type Aliases — Production TypeScript
- Default Generic Arguments And Multi-Type Parameters — Production TypeScript
- Core Utilities: Partial, Required, Readonly, Pick And Omit — Production TypeScript
- Union Utilities: Exclude, Extract, NonNullable And Awaited — Production TypeScript
- Function Utilities: ReturnType, Parameters And Constructor — Production TypeScript
- The Spine Artifact: Generating Typed Models From OpenAPI — Production TypeScript
- The Customers Noticed First: SLAs, SLOs, Alerts, SNMP And Log Aggregation — CompTIA Linux+ (XK0-006) Exam Prep
References
- RFC 9110: HTTP Semantics, section 6.4 Content
- MDN Web Docs glossary: Payload body
- Enterprise Integration Patterns: message
- RFC 9110: content
- MDN: CustomEvent.detail
- RFC 9293: Transmission Control Protocol
- RFC 9110: HTTP Semantics