---
title: "Create a new API key"
method: POST
path: "/api/tenants/me/api-keys"
tags: ["Tenants"]
---

# Create a new API key

`POST /api/tenants/me/api-keys`

Generate a new API key with specified scopes. The full key is returned only once in the response — store it securely.

## Request body

- CreateApiKeyBodyDto
  - `name` string, required
  - `scopes` string[], required
  - `expiresAt` string

## Response `201`

API key created. The key value is shown only once.

- ApiKeyResponse
  - `id` string, required
  - `key` string, required
  - `name` string, required
  - `scopes` string[], required
  - `lastUsed` string
  - `expiresAt` string
  - `createdAt` string, required

---

[API](https://skmtc.net/novabilling/apis/novabilling-api.md) · [All operations](https://skmtc.net/novabilling/apis/novabilling-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/novabilling/novabilling-api/versions/0e449a4e0dc8/schema)
