> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hexclave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create user API key

> Create a new API key for a user or team



## OpenAPI

````yaml /openapi/client.json post /user-api-keys
openapi: 3.1.0
info:
  title: Hexclave REST API
  version: 1.0.0
  description: >-
    The Hexclave REST API. All request headers are documented as canonical
    `X-Hexclave-*`; the equivalent `X-Stack-*` aliases are accepted on every
    endpoint for backwards compatibility. Response headers
    `X-Hexclave-actual-status`, `X-Hexclave-known-error`, and
    `X-Hexclave-request-id` are emitted alongside their legacy `X-Stack-*`
    equivalents.
servers:
  - url: https://api.hexclave.com/api/v1
    description: Hexclave REST API
security: []
paths:
  /user-api-keys:
    post:
      tags:
        - API Keys
      summary: Create user API key
      description: Create a new API key for a user or team
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type: string
                expires_at_millis:
                  type: number
                is_public:
                  type: boolean
                user_id:
                  type: string
                  example: 3241a285-8329-4d69-8f3d-316e08cf140c
                  description: >-
                    The ID of the user, or the special value `me` for the
                    currently authenticated user
              required:
                - description
                - user_id
              example:
                user_id: 3241a285-8329-4d69-8f3d-316e08cf140c
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    type: string
                  id:
                    type: string
                  description:
                    type: string
                  expires_at_millis:
                    type: number
                  manually_revoked_at_millis:
                    type: number
                  created_at_millis:
                    type: number
                  is_public:
                    type: boolean
                  type:
                    type: string
                    enum:
                      - user
                  user_id:
                    type: string
                    example: 3241a285-8329-4d69-8f3d-316e08cf140c
                    description: >-
                      The ID of the user, or the special value `me` for the
                      currently authenticated user
                required:
                  - value
                  - id
                  - description
                  - created_at_millis
                  - is_public
                  - type
                  - user_id

````