---
title: "POST /v2/CreateKey"
method: POST
path: "/v2/CreateKey"
tags: ["Access key"]
---

# POST /v2/CreateKey

`POST /v2/CreateKey`

Creates a new API access key.

## Request body

- CreateKeyRequest
  - `allow` KeyPerm
    - `createBucket` boolean
  - `deny` KeyPerm
    - `createBucket` boolean
  - `expiration` string, date-time, nullable — Expiration time and date, formatted according to RFC 3339
  - `name` string, nullable — Name of the API key
  - `neverExpires` boolean — Set the access key to never expire

## Response `200`

Access key has been created

- CreateKeyResponse
  - `accessKeyId` string, required
  - `buckets` KeyInfoBucketResponse[], required
    - `globalAliases` string[], required
    - `id` string, required
    - `localAliases` string[], required
    - `permissions` ApiBucketKeyPerm, required
      - `owner` boolean
      - `read` boolean
      - `write` boolean
  - `created` string, date-time, nullable
  - `expiration` string, date-time, nullable
  - `expired` boolean, required
  - `name` string, required
  - `permissions` KeyPerm, required
    - `createBucket` boolean
  - `secretAccessKey` string, nullable

## Other responses

- `500` — Internal server error

---

[API](https://skmtc.dev/deuxfleurs/apis/garage-administration-api.md) · [All operations](https://skmtc.dev/deuxfleurs/apis/garage-administration-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/deuxfleurs/garage-administration-api/revisions/07ffb2d0febb/schema)
