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

# Create Api Key

`POST /api/api-keys/`

## Request

- Base URL: `https://zsign.io` (the document declares no server; this is the origin it was published from)
- URL: `https://zsign.io/api/api-keys/`
- Auth: HTTP bearer

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

Verified-email only (ZS-165): an unverified signup proves no inbox
ownership, and a key minted on it survives the real owner's recovery.

## Request body

- CreateAPIKeyRequest
  - `name` string, required: Name for the API key
  - `expires_at` string, date-time, nullable: Expiration date (defaults to 1 year)

## Response `201`

Successful Response

- APIKeyCreateResponse
  - `id` string, uuid, required
  - `name` string, required
  - `key_prefix` string, required
  - `last_used_at` string, date-time, nullable, required
  - `expires_at` string, date-time, nullable, required
  - `created_at` string, date-time, required
  - `creator_email` string, nullable
  - `key` string, required: Full API key (only shown once)

## Other responses

- `422`: Validation Error

---

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