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

# Get or create SFTP credentials



## OpenAPI

````yaml api-reference/openapi.yaml post /servers/{id}/sftp
openapi: 3.1.0
info:
  title: Minenet Client API
  version: 1.0.0
  description: >
    Team-scoped API for deployments, servers, snapshots, files, and mod platform
    metadata.


    Authentication:

    - Bearer user token (`mnp_*`)

    - Bearer agent token (`mna_*`)


    Global rate limit: 100 requests/minute per token.
servers:
  - url: https://your-domain.com/api/client/v1
security:
  - bearerAuth: []
tags:
  - name: Deployments
  - name: Servers
  - name: Snapshots
  - name: Files
  - name: Modrinth
  - name: CurseForge
paths:
  /servers/{id}/sftp:
    post:
      tags:
        - Servers
      summary: Get or create SFTP credentials
      operationId: createSftpCredentials
      parameters:
        - $ref: '#/components/parameters/ServerId'
      responses:
        '200':
          $ref: '#/components/responses/SftpCredentials'
        '403':
          description: Unsupported token type (agent tokens)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    ServerId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Server UUID.
  responses:
    SftpCredentials:
      description: SFTP credentials
      content:
        application/json:
          schema:
            type: object
            properties:
              username:
                type: string
              password:
                type: string
              computedUsername:
                type: string
              host:
                type: string
              port:
                type: integer
              uri:
                oneOf:
                  - type: string
                  - type: 'null'
    RateLimited:
      description: Rate limit exceeded
      headers:
        Retry-After:
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token

````