---
title: "Create"
method: POST
path: "/api_keys"
tags: ["apiKeys"]
---

# Create

`POST /api_keys`

Creates a new API key in the workspace.

## Headers

- `Authorization` string, required

## Request body

- CreateApiKeyRequest
  - `name` string, required — A name to identify the API key.

## Response `201`

API key created

- ApiKeyWithSecret
  - `id` string, required — The API key ID.
  - `name` string, required — The name of the API key.
  - `api_key` string, required — The API key secret. Only returned once, when the key is created or rotated.

## Other responses

- `400` — Invalid parameters
- `401` — Unauthorized (authentication missing or invalid)
- `500` — Internal server error

---

[API](https://skmtc.net/phonic/apis/api-reference.md) · [All operations](https://skmtc.net/phonic/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phonic/api-reference/revisions/dd8166a70626/schema)
