---
title: "Create an API key for the current user"
method: POST
path: "/zot/auth/apikey"
---

# Create an API key for the current user

`POST /zot/auth/apikey`

Can create an api key for a logged in user, based on the provided label and scopes.

## Request body

- ApiAPIKeyPayload
  - `expirationDate` string
  - `label` string
  - `scopes` string[]

## Response `201`

created

- string

## Other responses

- `400` — bad request
- `401` — unauthorized
- `413` — request entity too large
- `500` — internal server error

---

[API](https://skmtc.net/project-zot/apis/open-container-initiative-distribution-specification.md) · [All operations](https://skmtc.net/project-zot/apis/open-container-initiative-distribution-specification/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/project-zot/open-container-initiative-distribution-specification/revisions/62d5df709bf8/schema)
