Skip to content
CheckcraftDownload
Practical workflow

POST request in Postman: JSON body, form-data, file and headers

Checkcraft is a desktop app for checking APIs and logs without code, with a free edition. Download, no sign-up →

For POST in Postman the Body tab and the body type matter most. The wrong type is the most common reason for 400 and 415 responses: the server expects JSON and gets a form, or the other way round. Below is which type to pick, a body example and how to check what reached the server.

Checkcraft ·

Get help with your first test →

Which body type to choose

raw with JSON for most REST APIs. x-www-form-urlencoded for classic forms and some OAuth calls. form-data when you send a file or mix a file and fields. binary when the body itself is a file. GraphQL for GraphQL servers.

How to see what reached the server

Open the Postman Console (Console at the bottom or View, Show Postman Console). It shows the final URL, all headers including automatic ones, and the body. On a 415 check Content-Type there first.

JSON check diagram: syntax, required fields, types, values, extra fields

Repeat the request outside Postman

The Code button on the right shows the same request as curl or code in your language. If it works in curl but not in Postman, check Postman settings: proxy, certificates or an extra header.

Body types and Content-Type

Body typeContent-TypeUsed for
raw → JSONapplication/jsonREST APIs
x-www-form-urlencodedapplication/x-www-form-urlencodedForms, some OAuth
form-datamultipart/form-dataFiles with fields
binaryfile typeThe body is the file
GraphQLapplication/jsonGraphQL queries
API call diagram: method and URL, headers, body, status and response body, logs and database

Sample JSON body

{
  "customerId": 7,
  "items": [
    { "sku": "MON-24", "qty": 2, "price": 15900 },
    { "sku": "KB-01",  "qty": 1, "price": 2490 }
  ],
  "discount": 300
}

Variables work in the body: "customerId": {{customerId}}. Without quotes the value goes in as a number, with quotes as a string.

POST errors

ResponseCommon cause
400 Bad RequestTrailing comma, single quotes or wrong field types in JSON
415 Unsupported Media TypeWrong body type, Content-Type is not application/json
413 Payload Too LargeThe file exceeds the server limit
422 Unprocessable EntityValid JSON, but the server rejected the data

If the body looks right, compare with a working curl: curl POST with JSON.

More on Postman

Section overview and all guides: Postman requests: how to send GET, POST, PUT and DELETE with examples.

Frequently asked questions

How do I POST JSON in Postman?

POST, Body → raw → JSON, paste the body, Send; Postman sets Content-Type.

How do I send a file?

Body → form-data, switch the field type to File.

Why does Postman return 415?

The body type does not match what the server expects.

Next step

Repeat this on your own API

Checkcraft is a desktop app that saves API response checks without code and shows what did not match. Start with a sample, then use your own sanitized data. Free runs on Windows and Linux with no time limit.

Download FreeDownload and first run

No sign-up or email needed, the archive is ready in a couple of minutes. See the edition limits.

References

Postman: request basics

Start with the linked example and compare its result with your own test requirement.

Ask a person

Get help with your first test

Tell us what you want to test or where you got stuck. We can help you start Checkcraft, choose an example and understand your first run. You can ask before downloading.

The Telegram group is public: do not post passwords, tokens or confidential work data. A description of your task is enough to start.

You can also email us support@checkcraft.ru

No account required. We will reply by email. This is a support request, not a newsletter subscription.