# Create a Global Config

POST `https://api.vercel.com/v1/global-config`

Creates a Global Config.

## Request Example

```typescript
const response = await fetch('https://api.vercel.com/v1/global-config?teamId=string&slug=string', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "slug": "string",
    "items": "value"
  }),
});

const data = await response.json();
console.log(data);
```

## Response Example

```json
{
  "createdAt": "123",
  "createdBy": "string",
  "deletedAt": "123",
  "digest": "string",
  "id": "icfg_1234567890",
  "ownerId": "example_id",
  "purpose": {
    "projectId": "example_id",
    "type": "flags"
  },
  "schema": "value",
  "slug": "string",
  "syncedToDynamoAt": "123",
  "transfer": {
    "doneAt": "123",
    "fromAccountId": "example_id",
    "startedAt": "123"
  },
  "updatedAt": "123",
  "itemCount": "123",
  "sizeInBytes": "123"
}
```

## Authentication

### Authorization
*Bearer Token*

Default authentication mechanism.

## Query Parameters

- **teamId**: `string` (Optional) - The Team identifier to perform the request on behalf of.
- **slug**: `string` (Optional) - The Team slug to perform the request on behalf of.

## Body

- **slug**: `string` (Required) - Name for the Global Config (Names are not unique and must start with an alphabetic character and can contain only alphanumeric characters and underscores).
- **items**: `object` (Optional)

## Response

201 Success

### Response Fields
- **createdAt**: `number` (Required) 
- **createdBy**: `string` (Optional) - The ID of the user who created the Global Config, optional because it is not always set.
- **deletedAt**: `number` (Optional) 
- **digest**: `string` (Required) 
- **id**: `string` (Required) 
- **ownerId**: `string` (Required) 
- **purpose**: `object` (Optional) 
- **schema**: `object` (Optional) 
- **slug**: `string` (Required) 
- **syncedToDynamoAt**: `number` (Optional) 
- **transfer**: `object` (Optional) - Keeps track of the current state of the Global Config while it gets transferred.
- **updatedAt**: `number` (Required) 
- **itemCount**: `number` (Required) 
- **sizeInBytes**: `number` (Required)

## Errors

- **400**: One of the provided values in the request body is invalid.
- **401**: The request is not authorized.
- **402**: The account is missing a payment so the payment method must be updated.
- **403**: You do not have permission to access this resource.
