---
title: "POST /api/v1/user/api-keys"
method: POST
path: "/api/v1/user/api-keys"
tags: ["user"]
---

# POST /api/v1/user/api-keys

`POST /api/v1/user/api-keys`

## Request

- Base URL: `https://api.ekiden.fi`
- URL: `https://api.ekiden.fi/api/v1/user/api-keys`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/ekidenfi/apis/ekiden-gateway/docs/api/v1/user/api-keys/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- CreateApiKeyRequest
  - `expires_at` integer, nullable
  - `name` string, required
  - `public_key` string, required
  - `scopes` Scope[], required

## Response `200`

API key created

- CreateApiKeyResponse
  - `created_at` integer, required
  - `expires_at` integer, nullable
  - `id` string, required
  - `public_key` string, required
  - `scopes` Scope[], required

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden

## Changes

- **2026-02-23** `75c5584f10a5`: 2 info
  - the endpoint scheme security `api_key_auth` was removed from the API
  - added the non-success response with the status `400`
- **2026-01-29** `16fe50636aa5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ekidenfi/apis/ekiden-gateway/changes/api/v1/user/api-keys/post.md)

---

[API](https://skmtc.dev/ekidenfi/apis/ekiden-gateway.md) - [All operations](https://skmtc.dev/ekidenfi/apis/ekiden-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/ekidenfi/apis/ekiden-gateway/revisions/fad9eecaba2e?raw)
