> ## 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.

# Set a key's Admin/Usage type

> Admin only. Change a key's capability class — e.g. downgrade a key you handed to a customer from Admin to Usage.



## OpenAPI

````yaml /openapi.json patch /admin/keys/{ApiKeyId}/type
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/{ApiKeyId}/type:
    parameters:
      - $ref: '#/components/parameters/Accept'
    patch:
      tags:
        - account
      summary: Set a key's Admin/Usage type
      description: >-
        Admin only. Change a key's capability class — e.g. downgrade a key you
        handed to a customer from Admin to Usage.
      operationId: SetApiKeyType
      parameters:
        - name: ApiKeyId
          in: path
          required: true
          schema:
            type: string
        - name: KeyType
          in: query
          x-nullable: false
          schema:
            type: string
            enum:
              - Usage
              - Admin
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetApiKeyType'
      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:
    SetApiKeyType:
      title: SetApiKeyType
      properties:
        ApiKeyId:
          type: string
        KeyType:
          type: string
      description: SetApiKeyType
      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

````