---
title: "Create user API key"
method: POST
path: "/user-api-keys"
tags: ["API Keys"]
---

# Create user API key

`POST /user-api-keys`

Create a new API key for a user or team

## Request body

- object
  - `description` string, required
  - `expires_at_millis` number, nullable
  - `is_public` boolean
  - `user_id` string, required — The ID of the user, or the special value `me` for the currently authenticated user

## Response `200`

Successful response

- object
  - `value` string, required
  - `id` string, required
  - `description` string, required
  - `expires_at_millis` number
  - `manually_revoked_at_millis` number
  - `created_at_millis` number, required
  - `is_public` boolean, required
  - `type` 'user', required
  - `user_id` string, required — The ID of the user, or the special value `me` for the currently authenticated user

## Changes

- **2026-07-23** `fc669d833a13` — 1 info
  - the request property `expires_at_millis` became nullable
- **2026-05-15** `f135fd8ca8b4` — 1 warning
  - added the new `user` enum value to the `type` response property for the response status `200`

[Change history](https://skmtc.dev/hexclave/apis/hexclave-rest-api/changes/user-api-keys/post.md)

---

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