# Create an API key

> POST /api-keys

Source: https://docs.trykintsugi.com/reference/2026-12-03/create-an-api-key

API version: Tenanted API release 2026-12-03, latest, default in the docs

POST /api-keys

Create an API key

Create an API key and return its one-time secret token (shown only here). Requires a user credential (an Owner or Admin) or a PORTFOLIO-scope Api-Key. Select an organization with an `Organization-Id` to create an organization key (a portfolio Owner/Admin bearer, or a portfolio Api-Key, selecting a client org creates a client-scoped key); omit it to create a portfolio-wide key if you are a portfolio Owner or Admin bearer. Portfolio and client keys are capped per user: creating one past the cap returns 409. Send `kind` as `SERVICE` to create a key with no user, for server-to-server use. Only a signed-in Owner or Admin can do this (a portfolio Api-Key gets 403; any other Api-Key gets 401), and not while impersonating a user (403). It needs an `Organization-Id` (an organization key, or a client-scoped key), never a portfolio-wide key. It is not counted against the per-user cap; instead an organization can hold at most 10 active service keys created through this endpoint (a client organization's count is its own), and the 11th returns 409. Omit `kind` for the default user-bound key. An organization key returns 403 `plan_upgrade_required` when the organization needs a paid plan, or 403 `forbidden` when its plan does not include API keys. Client-scoped and portfolio-wide keys are not plan-gated.

Category: API Keys

Request body:
kind (PublicApiKeyKindEnum) - `USER` (default) creates a key tied to you. `SERVICE` creates a key with no user, for server-to-server use. Only a signed-in Owner or Admin can create one, never an Api-Key. It needs an `Organization-Id`, is never portfolio-wide, and an organization can hold at most 10 active service keys.
  allowed values: USER, SERVICE
expiresAt (string) - When the key should expire (RFC-3339 UTC with an explicit Z). Must be in the future. Omit for a key that does not expire.

Response fields:
id (string, required) - Opaque unique identifier of the created key. Treat as opaque.
token (string, required) - The secret API-key token. Shown ONCE, here, at creation; it cannot be retrieved later. Store it securely.

Response statuses: 201, 400, 401, 403, 404, 409, 422, 503

---

Index of every page: https://docs.trykintsugi.com/llms.txt
