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": "john@example.com",
"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>john@example.com</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 syntax validation is performed.
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 file selector to choose a file from your system. The file path is displayed after selection. The file's MIME type is automatically detected and included in the multipart boundary.
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 "Select File" to choose a file from your system
- The file name and path are displayed
- Content-Type is automatically detected from the file extension
- When sent, the raw file bytes become the request body
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.