Request Body

Send data in POST, PUT, and PATCH requests using JSON, form-data, or binary content.

The request body contains data sent to the server. It is used with POST, PUT, and PATCH methods. Select the appropriate Content-Type for your data format.

Content Types

Content-TypeUse Case
application/jsonJSON payload (most common)
application/xmlXML payload
application/x-www-form-urlencodedForm data encoded in URL format
text/plainRaw text content

Writing JSON Body

The Body tab includes a Monaco editor with syntax highlighting, auto-completion, and validation for JSON.

  • Beautify — Format and indent your JSON
  • Clear — Clear the body content
  • Upload File — Load body content from a file
  • Use {{variable_name}} to reference environment variables

Sending a POST Request

  1. Select POST as the HTTP method
  2. Switch to the Body tab
  3. Select application/json as Content-Type
  4. Write your JSON payload
  5. Click Send

Example — Create a post on JSONPlaceholder:

json
{
  "title": "foo",
  "body": "bar",
  "userId": 1
}

Code Examples

curl
curl -X POST "https://jsonplaceholder.typicode.com/posts" \
  -H "Content-Type: application/json" \
  -d '{"title":"foo","body":"bar","userId":1}'
javascript
fetch("https://jsonplaceholder.typicode.com/posts", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ title: "foo", body: "bar", userId: 1 })
})
On this page