---
title: "POST /user.createApiKey"
method: POST
path: "/user.createApiKey"
tags: ["user"]
---

# POST /user.createApiKey

`POST /user.createApiKey`

## Request body

- object
  - `name` string, required
  - `prefix` string
  - `expiresIn` number
  - `metadata` object, required
    - `organizationId` string, required
  - `rateLimitEnabled` boolean
  - `rateLimitTimeWindow` number
  - `rateLimitMax` number
  - `remaining` number
  - `refillAmount` number
  - `refillInterval` number

## Response `200`

Successful response

- object

## Other responses

- `400` — Invalid input data
- `401` — Authorization not provided
- `403` — Insufficient access
- `500` — Internal server error

## Changes

> 5 revisions in range; 3 could not be searched.

- **2026-07-31** `ef58cac4be06` — 1 warning
  - the `name` request property's maxLength was set to `32`

[Change history](https://skmtc.dev/dokploy/apis/dokploy-api/changes/user.createApiKey/post.md)

---

[API](https://skmtc.dev/dokploy/apis/dokploy-api.md) · [All operations](https://skmtc.dev/dokploy/apis/dokploy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dokploy/dokploy-api/revisions/8d66aacade7f/schema)
