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

# Create Api Key

`POST /api/v1/api-keys`

## Request body

- CreateApiKeyRequest
  - `label` string, required
  - `description` string, nullable
  - `scoped_identity_id` string, uuid, nullable — Scope this key to a specific agent identity. Omit or null for an admin (unscoped) key with full org-wide authority.

## Response `201`

Successful Response

- CreateApiKeyResponse
  - `api_key` string, required — Full API key string. Shown once, cannot be retrieved later.
  - `record` ApiKey, required
    - `id` string, required
    - `organization_id` string, required
    - `created_by` string, required
    - `creator_type` 'human' | 'agent', required
    - `scoped_identity_id` string, uuid, nullable, required
    - `label` string, required
    - `description` string, nullable, required
    - `status` 'active' | 'revoked', required
    - `last4` string, required
    - `display_prefix` string, required
    - `last_used_at` string, date-time, nullable, required
    - `expires_at` string, date-time, nullable, required
    - `revoked_at` string, date-time, nullable, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `422` — Validation Error
- `4XX` — Client error with Support Agent information.
- `5XX` — Server error with Support Agent information.

---

[API](https://skmtc.dev/inkbox/apis/inkbox-api.md) · [All operations](https://skmtc.dev/inkbox/apis/inkbox-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/inkbox/inkbox-api/revisions/31f357e7e6f8/schema)
