---
title: "Create an API key for the authenticated user"
method: POST
path: "/v1/user/api_keys"
tags: ["api_keys"]
---

# Create an API key for the authenticated user

`POST /v1/user/api_keys`

Create a personal API key for the currently authenticated user. The key inherits the user's role, so it grants no more access than the user already has. The response contains the key itself, which is shown only once and cannot be retrieved afterwards.

## Request body

- CreateApiKeyRequestBody
  - `data` ApiKeyData, required
    - `name` string, required — A human-readable name for the API key.
    - `description` string, nullable — An optional description of what the API key is for.
    - `expires_at` string, date-time, nullable — When the API key expires. The key never expires when omitted.

## Response `201`

The newly created API key, including the key itself.

- CreateApiKeyResponseBody
  - `data` CreatedApiKey, required
    - `id` string, required
    - `name` string, required
    - `description` string, nullable
    - `created_at` string, date-time, required
    - `expires_at` string, date-time, nullable
    - `key` string, required — The API key. This is the only time it is returned; it cannot be recovered from the listing endpoints.

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `422` — Unprocessable Entity
- `507` — Insufficient Storage

## Changes

- **2026-07-14** `a577c4cd0974` — 1 info
  - endpoint added
- **2026-04-29** `c81391216eb5` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/arize-ai/apis/arize-phoenix-rest-api/changes/v1/user/api_keys/post.md)

---

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