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

# Set Primary Key



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json patch /api/v1/ssh_keys/{key_id}
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/ssh_keys/{key_id}:
    patch:
      tags:
        - SSH Keys
      summary: Set Primary Key
      operationId: set_primary_key_api_v1_ssh_keys__key_id__patch
      parameters:
        - name: key_id
          in: path
          required: true
          schema:
            type: string
            title: Key Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APISSHKeyUpdateRequestConfig'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APISSHKeyUpdateResponseConfig'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    APISSHKeyUpdateRequestConfig:
      properties:
        isPrimary:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Isprimary
          description: >-
            Whether to set the key as the primary key. Must be true when
            provided.
      type: object
      title: APISSHKeyUpdateRequestConfig
    APISSHKeyUpdateResponseConfig:
      properties:
        message:
          type: string
          title: Message
        updated_fields:
          type: object
          title: Updated Fields
      type: object
      required:
        - message
        - updated_fields
      title: APISSHKeyUpdateResponseConfig
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
        - param
        - details
      title: ErrorDetail
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````