Body Tab
The Body tab configures the data sent with your request. Not all HTTP methods use a body—GET, HEAD, and OPTIONS typically do not, while POST, PUT, and PATCH require one. DELETE may optionally include a body depending on the API.
Body Type Selector
The dropdown in the top-right corner of the Body tab determines how your data is formatted and which Content-Type header is sent.
| Type | Content-Type Header | Use Case |
|---|---|---|
| none | Not sent | Requests without a body (GET, HEAD, OPTIONS) |
| JSON | application/json | REST APIs, structured data |
| XML | application/xml | SOAP APIs, legacy systems |
| Text | text/plain | Plain text, custom formats |
| form-data | multipart/form-data | File uploads, mixed content |
| x-www-form-urlencoded | application/x-www-form-urlencoded | HTML form submissions |
| Binary | Auto-detected from file | Single file upload as raw bytes |
JSON Body
The most common format for modern REST APIs. The editor provides syntax highlighting and real-time validation.
Example
{
"name": "John Doe",
"email": "[email protected]",
"age": 30,
"active": true,
"roles": ["admin", "user"]
}Validation
Invalid JSON is highlighted with warning markers in the editor. A message appears at the bottom describing the syntax error and its location.
- Missing commas between properties
- Trailing commas (not allowed in JSON)
- Unquoted keys
- Single quotes instead of double quotes
- Mismatched brackets or braces
Format and Minify
Hover over the editor to reveal action buttons in the top-right corner:
- Copy — Copies the entire body to clipboard
- Format — Pretty-prints the JSON with proper indentation
- Minify — Removes whitespace to create a compact single line
XML Body
Used for SOAP APIs and systems that require XML format. The editor provides XML syntax highlighting.
Example
<?xml version="1.0" encoding="UTF-8"?> <user> <name>John Doe</name> <email>[email protected]</email> <age>30</age> </user>
Format and Minify buttons work the same as JSON—hover over the editor to access them.
Text Body
Plain text format for custom content types or raw data. No structured-syntax validation is performed (there is no JSON or XML parser running over the body), but random variable syntax is still checked — invalid {{random.*}} expressions show an error message beneath the editor. Format and Minify buttons are hidden for Text bodies; the Copy button is still available on hover.
Use Cases
- GraphQL queries (when not using the GraphQL panel)
- Custom text-based protocols
- Debug logging
- Webhook payloads with custom formats
Form Data (multipart/form-data)
Used for file uploads or when sending mixed content types. Each field can be either text or a file.
Field Table
The form-data editor displays a table with the following columns:
| Column | Description |
|---|---|
| Checkbox | Enable/disable the field without deleting |
| Key | The field name (form input name) |
| Value/File | Text value or file selector depending on type |
| Type | Toggle between Text and File |
| Delete | Remove the field |
File Upload
When type is set to File, click the Select File button to choose a file from your system. The selected file's name is displayed in the Value cell; hover over it to see the full absolute path as a tooltip. The file's MIME type is automatically detected from the file extension and emitted as a Content-Type header inside that file's form-data part when the request is sent.
URL Encoded (x-www-form-urlencoded)
Traditional HTML form encoding. Data is sent as key-value pairs encoded in the URL format.
How It Works
Your key-value entries are converted to the format:
key1=value1&key2=value2&key3=value3Special characters are percent-encoded (e.g., spaces become %20 or +).
When to Use
- OAuth token requests
- Legacy APIs expecting form data
- Simple key-value submissions without files
Binary
Sends a single file as the raw request body. Unlike form-data, the file content is sent directly without any encoding or wrapping.
How It Works
- Click Click to select a file to open the system file picker
- After selection, the file name is shown prominently and the full absolute path appears below it in a smaller muted line
- The Content-Type header is automatically detected from the file extension
- When the request is sent, the raw file bytes become the request body
- Click Remove file to clear the selection and choose a different file
MIME Type Detection
Common file types and their detected Content-Type:
When to Use
- Image upload APIs (avatar, thumbnail)
- Document processing services
- Streaming media uploads
- APIs that expect raw file content without form encoding
None
Select "none" when the request should not include a body. This is the default for GET, HEAD, and OPTIONS methods. The editor displays a message indicating no body will be sent, and no Content-Type header is added.
Using Variables in Body
You can use environment variables and random variables within JSON, XML, or Text bodies.
Environment Variables
{
"api_key": "{{apiKey}}",
"user_id": "{{userId}}",
"base_url": "{{baseUrl}}"
}Values are replaced from the active environment when the request is sent.
Random Variables
{
"id": "{{random.uuid}}",
"email": "{{random.email}}",
"timestamp": {{random.timestamp}}
}Random variables (prefixed with random.) generate new values on each request. See the Random Variables section for the complete list.