---
title: create-an-edge-config
product: vercel
url: /docs/rest-api/edge-config/create-an-edge-config
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about create-an-edge-config on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# Create an Edge Config

```http
POST /v1/edge-config
```

Creates an Edge Config.

## Authentication

**bearerToken**: HTTP bearer

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `teamId` | string | No | The Team identifier to perform the request on behalf of. |
| `slug` | string | No | The Team slug to perform the request on behalf of. |


## Request body

Required: Yes

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "slug"
  ],
  "properties": {
    "slug": {
      "type": "string",
      "pattern": "^[\\\\w-]+$",
      "maxLength": 64
    },
    "items": {
      "type": "object",
      "additionalProperties": {}
    }
  }
}
```

## Responses

### 201: No description

Content-Type: `application/json`

```json
{
  "type": "object",
  "description": "An Edge Config",
  "required": [
    "createdAt",
    "digest",
    "id",
    "itemCount",
    "ownerId",
    "sizeInBytes",
    "slug",
    "updatedAt"
  ],
  "properties": {
    "transfer": {
      "type": "object",
      "description": "Keeps track of the current state of the Edge Config while it gets transferred.",
      "required": [
        "doneAt",
        "fromAccountId",
        "startedAt"
      ],
      "properties": {
        "fromAccountId": {
          "type": "string"
        },
        "startedAt": {
          "type": "number"
        },
        "doneAt": {
          "type": "number",
          "nullable": true
        }
      }
    },
    "id": {
      "type": "string"
    },
    "createdAt": {
      "type": "number"
    },
    "createdBy": {
      "type": "string",
      "description": "The ID of the user who created the Edge Config, optional because it is not always set."
    },
    "ownerId": {
      "type": "string"
    },
    "slug": {
      "type": "string",
      "description": "Name for the Edge Config Names are not unique. Must start with an alphabetic character and can contain only alphanumeric characters and underscores)."
    },
    "updatedAt": {
      "type": "number"
    },
    "digest": {
      "type": "string"
    },
    "purpose": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "projectId",
            "type"
          ],
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "flags"
              ]
            },
            "projectId": {
              "type": "string"
            }
          }
        },
        {
          "type": "object",
          "required": [
            "resourceId",
            "type"
          ],
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "experimentation"
              ]
            },
            "resourceId": {
              "type": "string"
            }
          }
        }
      ]
    },
    "deletedAt": {
      "type": "number",
      "nullable": true
    },
    "schema": {
      "type": "object"
    },
    "syncedToDynamoAt": {
      "type": "number",
      "description": "Timestamp of when the Edge Config was synced to DynamoDB initially. It is only set when syncing the entire Edge Config, not when updating."
    },
    "sizeInBytes": {
      "type": "number"
    },
    "itemCount": {
      "type": "number"
    }
  }
}
```

### 400: One of the provided values in the request body is invalid.

### 401: The request is not authorized.

### 402: The account was soft-blocked for an unhandled reason.
The account is missing a payment so payment method must be updated

### 403: You do not have permission to access this resource.

---

## Related

- [edge-config endpoints](/docs/rest-api#edge-config)

- [REST API overview](/docs/rest-api)

- [OpenAPI spec](https://openapi.vercel.sh/) (machine-readable, all endpoints)

---

[View full sitemap](/docs/sitemap)
