---
title: "Create New Api Key"
method: POST
path: "/auth/api-keys"
tags: ["internal"]
---

# Create New Api Key

`POST /auth/api-keys`

## Request

- Base URL: `https://api.companydata.dk` (the document declares no server; this is the origin it was published from)
- URL: `https://api.companydata.dk/auth/api-keys`
- Auth: HTTP bearer

Create a new API key. The full key is only shown once.

## Request body

- APIKeyCreate
  - `name` string

## Response `200`

Successful Response

- APIKeyWithSecret: Response when creating a new API key - includes the full key (only shown once).
  - `id` string, required
  - `key` string, required
  - `key_prefix` string, required
  - `name` string, required
  - `permissions` string[], required
  - `rate_limit` RateLimit, required
    - `requests_per_minute` integer
    - `requests_per_month` integer
  - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

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