---
title: "Create an API key. The plain-text key is returned exactly once."
method: POST
path: "/v1/identity/api-keys"
tags: ["identity"]
---

# Create an API key. The plain-text key is returned exactly once.

`POST /v1/identity/api-keys`

## Request body

- ApiKeyCreateRequest
  - `name` string, required
  - `scopes` string[]
  - `expires_at` string, date-time, nullable

## Response `201`

Successful Response

- ApiKeyCreateResponse — Returned exactly once on creation. ``plain_text_key`` is never persisted and never returned again — the caller must store it immediately.
  - `id` string, uuid, required
  - `name` string, required
  - `key_prefix` string, required
  - `scopes` string[], required
  - `is_active` boolean, required
  - `last_used_at` string, date-time, nullable, required
  - `expires_at` string, date-time, nullable, required
  - `created_at` string, date-time, required
  - `plain_text_key` string, required

## Other responses

- `400` — Bad request
- `401` — Authentication required
- `422` — Validation Error

---

[API](https://skmtc.net/oneloop-hq/apis/feather-api.md) · [All operations](https://skmtc.net/oneloop-hq/apis/feather-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneloop-hq/feather-api/versions/888bdd5c076e/schema)
