---
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

- Base URL: `https://api.sprixen.com`
- URL: `https://api.sprixen.com/v1/api-keys`
- Auth: `bearer` (a scheme the document does not define)

## Request body

- CreateApiKeyDto
  - `name` string, required: A label to identify this API key

## Response `201`

- ApiKeyCreatedResponseDto
  - `id` string, required
  - `name` string, required
  - `keyPrefix` string, required
  - `lastUsedAt` string, nullable, required
  - `revokedAt` string, nullable, required
  - `createdAt` string, required
  - `key` string, required: The full API key. This will only be shown once.

---

[API](https://skmtc.dev/sprixen/apis/sprixen-api.md) · [All operations](https://skmtc.dev/sprixen/apis/sprixen-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sprixen/apis/sprixen-api/revisions/6c0c57f6da58?raw)
