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

# Create a personal API key

`POST /v1/auth/api-keys`

## Request

- Base URL: `https://api.1claw.co`
- URL: `https://api.1claw.co/v1/auth/api-keys`
- Auth: HTTP bearer

## Request body

- CreateApiKeyRequest
  - `name` string, required
  - `scopes` string[]
  - `expires_at` string, date-time

## Response `201`

API key created (full key shown once)

- ApiKeyCreatedResponse
  - `key` ApiKeyResponse
    - `id` string, uuid
    - `name` string
    - `key_prefix` string
    - `scopes` string[]
    - `is_active` boolean
    - `created_at` string, date-time
    - `expires_at` string, date-time
    - `last_used_at` string, date-time
  - `api_key` string: Full key (shown once)

## Other responses

- `400`: Invalid request

---

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