---
title: "Headers"
slug: "headers"
abstract: "List of request headers."
---
# Headers

The REST API uses standard HTTP headers to decorate its requests and replies.

The following request headers are extensively used.

| Name | Description |
| --- | --- |
| `Accept` | Indicates the desired media format. At this time, it should always be `application/json`. |
| `If-None-Match` | Indicates that if the `ETag` header of the resource matches any of those submitted, the request may be fulfilled with a `304 Not Modified` reply so that a locally [cached](https://doc.sitecore.com/ch/en/developers/cloud-dev/caching.html) version are used instead. |
| `Content-Type` | If the request contains content, this header indicates the media format used. At this time, only `application/json` is supported. |
| `X-Auth-Token` | Used to [authenticate](https://doc.sitecore.com/ch/en/developers/cloud-dev/authentication.html) requests. |
| `X-Impersonate` | Used to impersonate a username. |

The following returned response headers are the most common.

| Name | Description |
| --- | --- |
| `Content-Type` | Media format used in the body of the response. At this time, only JSON is supported, so this should always return `application/json`. |
| `ETag` | String representation of the version returned by the resource that can be used with the `If-None-Match` header to optimize network bandwidth usage. See [Caching](https://doc.sitecore.com/ch/en/developers/cloud-dev/caching.html). |
| `Location` | In response to creating a new resource, the server responds with `201 Created` and includes this header to provide the URL of the newly created resource. |
| `X-Global-Identifier` | In response to creating a new resource, the server responds with `201 Created` and includes this header information to provide the GLOBAL IDENTIFIER of the newly created resource. |

> [!note]
> For brevity, these headers are not explained again in the documentation when discussing the specific details of a resource.

## Example

The following example shows how to use the headers in HTTP requests:

```html
curl --request GET \
--url https://MyInstance/api/entities/48109 \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: XXXXXX' \
--header 'X-Impersonate: TheUsernameToImpersonate'

```