---
title: "Create API key"
method: POST
path: "/auth/keys"
tags: ["ApiKeys"]
---

# Create API key

`POST /auth/keys`

## Request

- Base URL: `https://api.crevio.co/v1`
- URL: `https://api.crevio.co/v1/auth/keys`
- Auth: API key in header `Authorization`

Creates a new API key. The full secret (`token`) is returned only in this response—store it securely, it cannot be retrieved again.

## Headers

- `Idempotency-Key` string

## Request body

- ApiKeyCreateRequest
  - `name` string, nullable: Optional human-readable label for the key. Defaults to "Default" when omitted.

## Response `201`

API key created (includes the full secret)

- ApiKey
  - `object` string, required
  - `id` string, required
  - `name` string, nullable, required
  - `last4` string, required
  - `token_type` string, required
  - `token` string, nullable, required
  - `last_used_at` string, nullable, required
  - `expires_at` string, nullable, required
  - `created_at` string, required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `422`: Validation error
- `429`: Rate limit exceeded — 600 requests per minute per credential. Retry after the number of seconds in `Retry-After`.
- `500`: Internal server error

---

[API](https://skmtc.dev/crevio/apis/crevio-api-v1.md) · [All operations](https://skmtc.dev/crevio/apis/crevio-api-v1/llms.txt) · [OpenAPI document](https://skmtc.dev/crevio/apis/crevio-api-v1/revisions/2219f18ad651?raw)
