> ## Documentation Index
> Fetch the complete documentation index at: https://docs.requestly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Request Headers

> Learn how to configure HTTP headers for authentication, content types, and custom metadata in your API requests.

HTTP headers are key-value pairs that provide additional information about your request. They're essential for authentication, specifying content types, and sending custom metadata to the API.

## Understanding Headers

Headers serve multiple purposes in HTTP requests:

> [card] Authentication
>
> Pass tokens, API keys, or credentials to authenticate with the API

> [card] Content Type
>
> Tell the server what format your data is in (JSON, XML, etc.)

> [card] Accept Type
>
> Specify what response format you expect from the server

> [card] Custom Metadata
>
> Send additional information like user agent, tracking IDs, or custom flags

***

## Adding Headers

The **Headers** tab allows you to add Request Headers in your API request.
Each header consists of:

* **Key**: The header name (e.g., `Authorization`, `Content-Type`)
* **Value**: The header value
* **Description** (optional): Internal documentation to explain the purpose of this header

![Headers - Send API Request](https://mintcdn.com/requestly/hxDG-lNXUZAdWoty/images/Headers-Create-Requests.png?fit=max\&auto=format\&n=hxDG-lNXUZAdWoty\&q=85\&s=6110acb3c0cefae6cc1cf3fac2130b31)

> [!TIP]
>
> The checkboxes next to each header let you include or exclude them without deleting them. This is useful for testing with and without certain headers.

### Bulk Edit Headers

You can also manage headers using **Bulk Edit**. This allows you to add or update multiple headers at once in a `key:value` format.

**How to use:**

1. Click the **Bulk Edit** button in the Headers tab
2. Add one header per line
3. Separate keys and values using a colon `:`
4. Prefix any line with `//` to disable that header

**Example:**

```
Content-Type:application/json
Authorization:Bearer {{token}}
X-API-Version:v2
// X-Debug:true
```

> [!TIP]
>
> Bulk Edit is especially useful when copying headers from documentation or sharing with team members.

## Using Variables in Headers

You can use variables in header values to make them dynamic:

```
Key: Authorization
Value: Bearer {{authToken}}
```

> [!NOTE]
>
> Learn more about using variables in [Variables and Environments](https://docs.requestly.com/api-client/environments-and-variables.md).

## Header Inheritance

Headers can be inherited from collections, making it easy to apply common headers across multiple requests:

**Collection-Level Headers** → **Request-Level Headers** → **Authorization Tab**

* **Collection-Level Headers**: Set headers at the collection level to apply them to all requests in that collection.
* **Request-Level Headers**: Override collection-level headers with the same key.
* **Authorization Tab**: Applied last. A header the Authorization tab adds replaces any header with the same name, whether you added it to the request or a script set it. Auth that adds nothing, such as an empty bearer token, leaves your header in place.

> [!NOTE]
>
> Headers are resolved from most-specific to least-specific. Request-level headers always win over collection-level headers when both define the same key.

## What's Next?

> [card] [Add Authorization](https://docs.requestly.com/api-client/send-api-request/authorization.md)
>
> Use the Authorization tab for easier authentication setup

> [card] [Use Scripts](https://docs.requestly.com/api-client/send-api-request/save-and-manage-data)
>
> Dynamically generate headers with pre-request scripts

> [card] [Environment Variables](https://docs.requestly.com/api-client/environments-and-variables.md)
>
> Learn how to use variables in headers


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.