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

# Create an API key

> Admin only. Programmatically issue a key to one of your customers. Defaults to a Usage key; set KeyType=Admin to mint another admin key. Subject to the plan's active-key cap.



## OpenAPI

````yaml /openapi.json post /admin/keys
openapi: 3.0.0
info:
  title: NestAPI
  version: '1.0'
servers:
  - description: Staging
    url: https://dev.api.nestapi.com
security: []
tags:
  - name: account
    description: API key and account management
  - name: ApiAdmin
  - name: auth
  - name: fairness
    description: >-
      Per-customer nesting-minutes fairness config, weights and usage (requires
      an Admin API key)
  - name: importer
  - name: nesting
    description: Submit nesting jobs, retrieve results and exports
  - name: public
    description: Health check and public utility endpoints
paths:
  /admin/keys:
    parameters:
      - $ref: '#/components/parameters/Accept'
    post:
      tags:
        - account
      summary: Create an API key
      description: >-
        Admin only. Programmatically issue a key to one of your customers.
        Defaults to a Usage key; set KeyType=Admin to mint another admin key.
        Subject to the plan's active-key cap.
      operationId: CreateApiKey
      parameters:
        - name: Reference
          in: query
          schema:
            type: string
        - name: Expires
          in: query
          schema:
            type: string
            format: date-time
        - name: Email
          in: query
          schema:
            type: string
        - name: Parallelism
          in: query
          x-nullable: false
          schema:
            type: integer
            format: int32
        - name: KeyType
          in: query
          x-nullable: false
          schema:
            type: string
            enum:
              - Usage
              - Admin
        - name: Trial
          in: query
          x-nullable: false
          schema:
            type: boolean
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateApiKey'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientKey'
      deprecated: false
      security:
        - Bearer: []
components:
  parameters:
    Accept:
      name: Accept
      in: header
      description: Accept Header
      required: true
      schema:
        type: string
        enum:
          - application/json
  schemas:
    CreateApiKey:
      title: CreateApiKey
      properties:
        Reference:
          type: string
        Expires:
          type: string
          format: date-time
        Email:
          type: string
        Parallelism:
          type: integer
          format: int32
          nullable: false
        KeyType:
          type: string
        Trial:
          type: boolean
          nullable: false
      description: CreateApiKey
      type: object
    ClientKey:
      title: ClientKey
      properties:
        ApiKey:
          type: string
        ClientRef:
          type: string
        Expired:
          type: boolean
          nullable: false
        IsActive:
          type: boolean
          nullable: false
        Expires:
          type: string
          format: date-time
        CancelledDate:
          type: string
          format: date-time
        Parallelism:
          type: integer
          format: int32
          nullable: false
        IsTrial:
          type: boolean
          nullable: false
        KeyType:
          type: string
      description: ClientKey
      type: object
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header

````