---
title: "Create a new API key"
method: POST
path: "/v1/api-keys"
tags: ["API Keys"]
---

# Create a new API key

`POST /v1/api-keys`

## Request body

- ApiKeyCreate
  - `name` string, required — The name of the API key
  - `expires_at` string, date-time, required — The expiration date and time of the API key

## Response `201`

API key created successfully

- ApiKeyWithSecretResponse
  - `id` string, uuid
  - `created_at` string, date-time
  - `last_used_at` string, date-time
  - `expires_at` string, date-time
  - `status` 'ACTIVE' | 'EXPIRED' | 'REVOKED'
  - `name` string
  - `prefix` string
  - `secret` string — The full API key secret (only returned on creation)

## Other responses

- `400` — Bad request
- `401` — Unauthorized

---

[API](https://skmtc.net/luminolabs/apis/api-keys-management-api.md) · [All operations](https://skmtc.net/luminolabs/apis/api-keys-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/luminolabs/api-keys-management-api/revisions/3861e3daa705/schema)
