---
title: "Generate API key"
method: POST
path: "/api/auth/api-keys"
tags: ["auth"]
---

# Generate API key

`POST /api/auth/api-keys`

## Request

- Base URL: `https://api.ivive.app`
- URL: `https://api.ivive.app/api/auth/api-keys`
- Auth: OAuth 2 (password, token URL `/api/auth/login`)

Generate a new API key. The plaintext is shown only once — save it now.

## Request body

- APIKeyCreateRequest
  - `name` string, nullable

## Response `201`

Successful Response

- APIKeyCreateResponse: Plaintext key shown only once at creation.
  - `id` string, required
  - `name` string, nullable, required
  - `api_key` string, required
  - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

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