---
title: "Create an API key (shown once)"
method: POST
path: "/admin/projects/{project_id}/keys"
tags: ["Admin"]
---

# Create an API key (shown once)

`POST /admin/projects/{project_id}/keys`

## Request

- Base URL: `https://platform.anpheros.com`
- URL: `https://platform.anpheros.com/admin/projects/{project_id}/keys`
- Auth: HTTP bearer

## Path parameters

- `project_id` string, required

## Headers

- `authorization` string, nullable

## Request body

- KeyIn
  - `name` string, required
  - `scopes` string[]

## Response `201`

Successful Response

- KeyOut
  - `id` string, required
  - `project_id` string, required
  - `name` string, required
  - `prefix` string, required
  - `last4` string, required
  - `scopes` string[], required
  - `rate_limit_per_minute` integer, required
  - `created_at` string, required
  - `last_used_at` string, nullable, required
  - `revoked_at` string, nullable, required
  - `key` string, nullable

## Other responses

- `401`: Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`).
- `422`: Validation Error

---

[API](https://skmtc.dev/anpheros/apis/anpheros-platform.md) · [All operations](https://skmtc.dev/anpheros/apis/anpheros-platform/llms.txt) · [OpenAPI document](https://skmtc.dev/anpheros/apis/anpheros-platform/revisions/ff567b232dc3?raw)
