---
title: "Create Api Key"
method: POST
path: "/api/v1/user/api-keys"
tags: ["main"]
---

# Create Api Key

`POST /api/v1/user/api-keys`

Create a new API key for the user's selected organization.

## Headers

- `authorization` string, nullable
- `X-API-Key` string, nullable

## Request body

- CreateAPIKeyRequest
  - `name` string, required

## Response `200`

Successful Response

- CreateAPIKeyResponse
  - `id` integer, required
  - `name` string, required
  - `key_prefix` string, required
  - `api_key` string, required
  - `created_at` string, date-time, required

## Other responses

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

---

[API](https://skmtc.net/dograh/apis/dograh-api.md) · [All operations](https://skmtc.net/dograh/apis/dograh-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dograh/dograh-api/versions/e7d045c0295a/schema)
