A request payload is data that clients send to the server in the body of an HTTP POST, PUT, or PATCH message that contains important information about the request. To send the JSON message payload to the REST API endpoint, you need to enclose the JSON data in the body of the HTTP request and indicate the data type of the request body with the "Content-Type: application/json" request header. If the client expects a response from the server in JSON format, it also needs to send the "Accept: application/json" header to the server. In this JSON Payload Example, we send JSON to the ReqBin echo URL. Click Send to execute the JSON Payload request online and see the results. The Curl/Bash code was automatically generated for the JSON Payload example.
What is JSON Payload?
Payload is the essential information in a data block that you send to or receive from the server when making API requests. The Payload can be sent or received in a variety of formats, including JSON. In programming, the payload is used in the context of a message protocol to distinguish between ancillary and actual data in a request. For example, request headers are required by the server to correctly interpret and process the request from a client, but they are not the payload of the request. JSON syntax elements are also not a payload.