---
title: "Create"
slug: "create"
abstract: "How to generate an API key."
---
# Create

The *Create* endpoint generates an API key.

| Relative Route | `/` |
| --- | --- |
| `HTTP Verb` | `POST` |

## Request body

The structure of `DeliveryApiKeyInfo` is as follows:

```json
{
 "CreatedBy": "ADN",
 "Label": "Example key",
 "Scopes": ["scope1", "scope2"]
}

```

For additional information on scopes, see [Scopes](https://doc.sitecore.com/ch/en/developers/cloud-dev/authentication-1523482.html "Authentication").

## Response body

The response is the token:

```text
MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3

```

## Example

The following example requests the scopes of `audience-preview` and `audience-delivery`. This means that the returned `X-GQL-Token` is valid for both the [Preview API](https://doc.sitecore.com/ch/en/developers/cloud-dev/preview-api.html "Preview API") and the [Delivery API](https://doc.sitecore.com/ch/en/developers/cloud-dev/delivery-api.html "Delivery API"):

```json
{
    "createdBy": "somebody",
    "label": "Testing Access",
    "scopes": [
      "content-#everything#",
      "audience-preview",
      "audience-delivery"
    ]
  }

```