---
updatedAt: 2026-03-01T18:44:12.000Z
---

# Create a key collection

```curl cURL
egcurl --eg-section default --request POST \
  --url "https://$hostname/jwt-api/v1/key-collections" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '
{
    "name": "EdgeConnectKeySet"
}'
```

```node Node
const EdgeGrid = require("akamai-edgegrid");
const os = require("os");
const edgercPath = os.homedir + "/.edgerc.txt";
const edgercSection = "default";
const eg = new EdgeGrid({
    path: edgercPath,
    section: edgercSection
});

eg.auth({
    path: `/jwt-api/v1/key-collections`,
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        "Accept": "application/json"
    },
    body: {
        "name": "EdgeConnectKeySet"
    }
});
eg.send(function (error, response, body) {
    console.log(body);
});
```

```python Python
import requests
from akamai.edgegrid import EdgeGridAuth, EdgeRc
from urllib.parse import urljoin

edgerc = EdgeRc('~/.edgerc.txt')
section = 'default'
baseurl = 'https://%s' % edgerc.get(section, 'host')

session = requests.Session()
session.auth = EdgeGridAuth.from_edgerc(edgerc, section)

path = '/jwt-api/v1/key-collections'
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json"}
payload = {
    "name": "EdgeConnectKeySet"
}

result = session.post(urljoin(baseurl, path), headers=headers, json=payload)
print(result.status_code)
print(result.json())
```

```json Response Example
{
    "id": 12,
    "name": "EdgeConnectKeySet",
    "createdDate": 1522747964221,
    "createdBy": "keyAdministrator_EdgeConnect",
    "jwt": "12"
}
```

# Set up authorization



Before you can use this API, you need to [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials). 

Then, you can use these code samples to apply the token values to your requests.

# Specify a name

<!-- curl@6-9 -->
<!-- node@17-19 -->
<!-- python@16-19 -->

Specify a `name` for you collection for identification purposes.

# Call the API

<!-- curl@0-100 -->
<!-- node@0-100 -->
<!-- python@0-100 -->

Run POST on the request URL, providing the object in the request body.

# Review the response



The response provides an empty key collection object that you can populate with public keys.

# Add public keys to the collection



To add public keys to the collection, store the response's  `id` value and run the [Create a key collection version](https://techdocs.akamai.com/iot-token-access-control/reference/post-key-collection-version) operation.