---
title: "Create an API key; the full key is returned only here"
method: POST
path: "/api-keys"
tags: ["Dashboard"]
---

# Create an API key; the full key is returned only here

`POST /api-keys`

## Request

- Base URL: `https://api.eu.doconda.com/v1`
- URL: `https://api.eu.doconda.com/v1/api-keys`
- Auth: HTTP bearer

## Request body

- object
  - `name` string

## Response `201`

Created.

- object
  - `id` string, required
  - `name` string, nullable, required
  - `prefix` string, required: First characters of the key, to tell keys apart.
  - `created_at` string, date-time, required
  - `last_used_at` string, date-time, nullable, required
  - `key` string, required

## Other responses

- `401`: unauthorized (missing, unknown or revoked key; expired session).
- `403`: session_required: dashboard only.

---

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