---
title: "Add Key"
method: POST
path: "/keys"
tags: ["Keys"]
---

# Add Key

`POST /keys`

## Request

- The document declares no server URL.
- Auth: HTTP bearer

## Request body

- KeyGenerationRequest
  - `name` string, required

## Response `201`

Successful Response

- KeyResponse
  - `id` string
  - `name` string
  - `organization_id` string, required
  - `created_at` string, date-time
  - `key_preview` string
  - `api_key` string

## Other responses

- `404`: Not found
- `422`: Validation Error

---

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