> ## 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 fairness weight

> Admin only. Sets the per-customer fairness weight for one of your keys; omit LineageWeight (null) to clear the override and fall back to the plan default.



## OpenAPI

````yaml /openapi.json patch /admin/keys/{ApiKeyId}/weight
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}/weight:
    parameters:
      - $ref: '#/components/parameters/Accept'
    patch:
      tags:
        - fairness
      summary: Set a key's fairness weight
      description: >-
        Admin only. Sets the per-customer fairness weight for one of your keys;
        omit LineageWeight (null) to clear the override and fall back to the
        plan default.
      operationId: SetKeyFairnessWeight
      parameters:
        - name: ApiKeyId
          in: path
          required: true
          schema:
            type: string
        - name: LineageWeight
          in: query
          schema:
            type: integer
            format: int32
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetKeyFairnessWeight'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyFairnessWeightResponse'
      deprecated: false
      security:
        - Bearer: []
components:
  parameters:
    Accept:
      name: Accept
      in: header
      description: Accept Header
      required: true
      schema:
        type: string
        enum:
          - application/json
  schemas:
    SetKeyFairnessWeight:
      title: SetKeyFairnessWeight
      properties:
        ApiKeyId:
          type: string
        LineageWeight:
          type: integer
          format: int32
      description: SetKeyFairnessWeight
      type: object
    KeyFairnessWeightResponse:
      title: KeyFairnessWeightResponse
      properties:
        ApiKeyId:
          type: string
        LineageWeight:
          type: integer
          format: int32
      description: KeyFairnessWeightResponse
      type: object
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header

````