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

# Update SSH Keys



## OpenAPI

````yaml POST /io.pocketenv.sandbox.putSshKeys
openapi: 3.1.0
info:
  title: AT Protocol XRPC API
  summary: >-
    An unofficial conversion of AT Protocol's lexicons to OpenAPI's schema
    format.
  version: 0.0.0
  license:
    name: MIT License
    identifier: MIT
servers:
  - url: https://api.pocketenv.io/xrpc/
    description: AT Protocol PDS XRPC server
  - url: https://api.pocketenv.io/xrpc/
    description: AT Protocol AppView XRPC server
security: []
tags:
  - name: io.pocketenv.actor
  - name: app.bsky.actor
  - name: io.pocketenv.file
  - name: io.pocketenv.port
  - name: io.pocketenv.publicKey
  - name: io.pocketenv.sandbox
  - name: io.pocketenv.secret
  - name: io.pocketenv.service
  - name: com.atproto.repo
  - name: io.pocketenv.variable
  - name: io.pocketenv.volume
paths:
  /io.pocketenv.sandbox.putSshKeys:
    post:
      tags:
        - io.pocketenv.sandbox
      summary: Add or update SSH keys for a sandbox.
      operationId: io.pocketenv.sandbox.putSshKeys
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - id
                - privateKey
                - publicKey
              properties:
                id:
                  type: string
                  description: The sandbox ID.
                privateKey:
                  type: string
                  description: The private SSH key (encrypted)
                publicKey:
                  type: string
                  description: The public SSH key.
                redacted:
                  type: string
                  description: The redacted SSH key.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/io.pocketenv.sandbox.defs.sshKeysView'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - message
                properties:
                  error:
                    type: string
                    oneOf:
                      - const: InvalidRequest
                      - const: ExpiredToken
                      - const: InvalidToken
                  message:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - message
                properties:
                  error:
                    const: AuthMissing
                  message:
                    type: string
      security:
        - Bearer: []
components:
  schemas:
    io.pocketenv.sandbox.defs.sshKeysView:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the SSH key.
        publicKey:
          type: string
          description: The public SSH key.
        privateKey:
          type: string
          description: The private SSH key (redacted in API responses)
        createdAt:
          type: string
          description: The timestamp when the SSH key was created.
          format: date-time
        updatedAt:
          type: string
          description: The timestamp when the SSH key was last updated.
          format: date-time
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````