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

# Create API key

`POST /api-keys`

Creates a company-scoped API key. The caller must have the `api_keys:manage` permission. The plain key is returned only once.

## Request body

- object
  - `name` string — Human-readable key name.
  - `preset` 'full_access' | 'read_only' | 'agent_safe' | 'ai_drafting' | 'data_ingest_safe' | 'data_ingest_automations' | 'transactional_sender' | 'marketing_sender' — Permission preset to apply when scopes is omitted. Defaults to full_access. Full-access keys are stored with scopes set to null, meaning all current and future permissions.
  - `scopes` string[] — Explicit permission scopes for the new key. Overrides preset when provided.

## Response `200`

API key created

- object
  - `success` boolean
  - `apiKey` object
    - `id` string
    - `name` string
    - `key` string — Plain API key. This is shown only on creation.
    - `prefix` string
    - `scopes` string[], nullable — Explicit permission scopes, or null for full access.
    - `createdAt` string, date-time
  - `message` string
  - `instructions` object

## Other responses

- `400` — Invalid permission preset or scope list
- `401` — Unauthorized
- `403` — Missing required API key management permission
- `500` — API key could not be created

## Changes

- **2026-07-05** `39ea778e9d6b` — 5 info
  - added the new optional request property `preset`
  - added the new optional request property `scopes`
  - added the non-success response with the status `400`
  - added the non-success response with the status `403`
  - …1 more
- **2026-05-11** `ee7b7111c55b` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/sequenzy/apis/sequenzy-api/changes/api-keys/post.md)

---

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