---
title: "Mint an API key (role&#58; viewer+; raw key returned once)"
method: POST
path: "/api/keys"
tags: ["API Keys"]
---

# Mint an API key (role&#58; viewer+; raw key returned once)

`POST /api/keys`

## Request

- Base URL: `https://api.witwiki.app`
- URL: `https://api.witwiki.app/api/keys`
- Auth: HTTP bearer

## Request body

- object
  - `label` string, required
  - `project_id` string

## Response `201`

Created key — the `key` field is shown only on creation

- object
  - `id` string
  - `label` string
  - `project_id` string
  - `owner_user_id` string
  - `created_at` string, date-time
  - `key` string: Raw secret

---

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