---
title: "Create a new API key"
method: POST
path: "/v1/auth/keys"
tags: ["v1 auth keys"]
---

# Create a new API key

`POST /v1/auth/keys`

Create a new API key for the authenticated user.
    
    This endpoint:
    - Validates the current API key authentication
    - Creates a new API key for the same user/organization
    - Returns the new API key (only shown once)
    - Supports optional labeling for key management
    
    **Authentication**: Requires valid API key in Authorization header

## Request body

- CreateApiKeyRequest
  - `label` string, nullable — Optional label for the API key

## Response `200`

Successful Response

- CreateApiKeyResponse
  - `id` string, required — Unique identifier for the API key
  - `api_key` string, required — The actual API key (only shown once)
  - `org_id` string, required — Organization ID
  - `user_id` string, required — User ID
  - `label` string, nullable — Label for the API key
  - `created_at` string, required — Creation timestamp
  - `success` boolean — Indicates successful creation

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/elicitlabs/apis/elicit-labs-api.md) · [All operations](https://skmtc.net/elicitlabs/apis/elicit-labs-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elicitlabs/elicit-labs-api/revisions/27701839a070/schema)
