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

# Delete SSH key

> Soft-deletes an SSH key. Key must belong to the authenticated user.



## OpenAPI

````yaml /openapi.json delete /api/v1/user/ssh-keys/{key_id}
openapi: 3.1.0
info:
  title: Phala Cloud API
  version: 0.1.0
servers:
  - url: https://cloud-api.phala.com
security: []
tags:
  - name: CVMs
    description: Confidential Virtual Machine (CVM) lifecycle management on Phala Network
  - name: Apps
    description: App template management and CVM deployment from app blueprints
  - name: Webhooks
    description: Manage webhook endpoints and monitor delivery history
  - name: SSH Keys
    description: SSH public key management for CVM access
  - name: KMS
    description: >-
      Key Management Service — key derivation, on-chain anchoring, and
      inspection
  - name: Instance Types
    description: Available hardware configurations for CVM deployment
  - name: Attestations
    description: Remote attestation and TEE verification endpoints
paths:
  /api/v1/user/ssh-keys/{key_id}:
    delete:
      tags:
        - SSH Keys
      summary: Delete SSH key
      description: Soft-deletes an SSH key. Key must belong to the authenticated user.
      operationId: delete_user_ssh_key_api_v1_user_ssh_keys__key_id__delete
      parameters:
        - name: key_id
          in: path
          required: true
          schema:
            type: string
            description: SSH key hashid
            title: Key Id
          description: SSH key hashid
      responses:
        '204':
          description: Key deleted
        '400':
          description: Invalid key ID format
        '401':
          description: Not authenticated
        '404':
          description: Key not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````