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

# Create API key

`POST /v1/account/api-keys`

Creates an API key for apps, scripts, agents, and backend jobs. The full token is returned once. Plan apiTokens limits apply to active keys; revoked keys do not count.

## Request body

- AccountApiKeyCreateRequest — API key creation request.
  - `name` string, required

## Response `200`

API key created.

- AccountApiKeyCreateResponse — API key creation response. The token is shown only once.
  - `apiKey` AccountApiKeySummary, required — Customer API key summary without secret token material.
    - `id` string, required
    - `name` string, required
    - `tokenPrefix` string, required
    - `createdAt` string, date-time, required
    - `lastUsedAt` string, date-time, nullable, required
    - `revokedAt` string, date-time, nullable, required
    - `currentDayRequestCount` integer, required
    - `currentMonthRequestCount` integer, required
  - `token` string, required
  - `nextActions` string[], required

## Other responses

- `400` — Bad request.
- `401` — Unauthorized.
- `402` — Payment required.
- `429` — Too many requests.
- `500` — Internal server error.

## Changes

- **2026-07-07** `f83fb883e854` — 1 info
  - added the non-success response with the status `402`
- **2026-07-02** `024ff3141fd7` — 1 info
  - endpoint added

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

---

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