How to Send Headers in Postman: Step-by-Step Guide
To send headers in Postman, open your request, go to the
Headers tab, and add key-value pairs for each header you want to send. Postman includes these headers automatically when you send the request.Syntax
In Postman, headers are sent as key-value pairs under the Headers tab of your request. Each header has a Key (header name) and a Value (header content).
Example headers include Content-Type, Authorization, and Accept.
text
Key: Content-Type Value: application/json Key: Authorization Value: Bearer your_token_here
Example
This example shows how to send a JSON POST request with an Authorization header and Content-Type header in Postman.
http
POST https://api.example.com/data Headers: Content-Type: application/json Authorization: Bearer abc123token Body (raw JSON): { "name": "John", "age": 30 }
Output
Status: 200 OK
Response Body:
{
"success": true,
"message": "Data received"
}
Common Pitfalls
- Forgetting to add the
Content-Typeheader when sending JSON causes the server to misinterpret the data. - Using incorrect header names or typos prevents the server from recognizing your headers.
- Not including authorization headers when required leads to authentication errors.
- Headers set in the
Headerstab override any automatic headers Postman adds.
text
Wrong way:
Key: content-type
Value: application/json
Right way:
Key: Content-Type
Value: application/jsonQuick Reference
| Header Name | Purpose | Example Value |
|---|---|---|
| Content-Type | Tells server the data format | application/json |
| Authorization | Sends credentials or tokens | Bearer abc123token |
| Accept | Tells server what response formats are accepted | application/json |
| User-Agent | Identifies the client software | PostmanRuntime/7.29.0 |
Key Takeaways
Add headers as key-value pairs in the Headers tab before sending your request.
Always use correct header names with proper capitalization.
Include Content-Type header when sending JSON or other data formats.
Authorization headers are required for protected APIs.
Headers in Postman override automatic headers if set manually.