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

# Create an API key

`POST /v1/api-keys`

## Request

- Base URL: `https://api.signvoy.com`
- URL: `https://api.signvoy.com/v1/api-keys`
- Auth: one of:
  - API key in header `X-Workspace-Id`
  - HTTP bearer

Creates a new secret API key scoped to this workspace. The plaintext key is returned **once** in this response and cannot be retrieved again — store it securely.

## Request body

- CreateApiKeyDto
  - `name` string, required: Human-readable label to identify this key in the dashboard
  - `expiresInDays` number: Optional expiry, in days from now. Omit for a key that never expires.

## Response `201`

Key created (includes the plaintext secret, shown once)

- CreatedApiKeyDto
  - `id` string, uuid, required: Unique API key identifier
  - `name` string, required: Human-readable label
  - `prefix` string, required: Non-secret leading segment of the key
  - `last4` string, required: Last 4 characters of the key
  - `lastUsedAt` string, date-time, nullable: When the key was last used to authenticate a request
  - `expiresAt` string, date-time, nullable: When the key expires (null = never)
  - `revoked` boolean, required: Whether the key has been revoked
  - `createdAt` string, date-time, required: Creation timestamp
  - `key` string, required: The full secret key. Shown only once, at creation — store it securely. Use it as a Bearer token: `Authorization: Bearer sk_live_...`

## Other responses

- `403`: Not a workspace owner or admin

---

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