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

# Create SFTP storage

> Creates a new SFTP storage instance in the specified location and returns the storage details including credentials.



## OpenAPI

````yaml /api-reference/services_docs_mintlify/object_storage_api.yaml post /storage/v4/sftp_storages
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Object Storage API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: 4b5ff58882b3
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Notifications
  - name: S3-Compatible Storage
  - name: SFTP Storage
  - name: SSHKeys
  - name: Storage
  - name: Storage Locations
  - name: Storage Statistics
paths:
  /storage/v4/sftp_storages:
    post:
      tags:
        - SFTP Storage
      summary: Create SFTP storage
      description: >-
        Creates a new SFTP storage instance in the specified location and
        returns the storage details including credentials.
      operationId: createSftpStorageV4
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SFTPStorageCreateBodyV4'
        required: true
      responses:
        '201':
          description: SFTPStorageItemV4
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SFTPStorageItemV4'
        '400':
          description: ErrResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrResponse'
        '401':
          description: ErrResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrResponse'
        '403':
          description: ErrResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrResponse'
        '409':
          description: ErrResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrResponse'
components:
  schemas:
    SFTPStorageCreateBodyV4:
      title: SFTPStorageCreateBodyV4 Request body for creating an SFTP storage.
      required:
        - location_name
        - name
        - password_mode
      type: object
      properties:
        expires:
          type: string
          description: >-
            Duration when the storage should expire (e.g., "2 years 6 months").
            Omit for no expiration.
          example: 2 years 6 months
        has_custom_config_file:
          type: boolean
          description: Whether this storage should use a custom configuration file
          example: false
        is_http_disabled:
          type: boolean
          description: Whether HTTP access should be disabled (HTTPS only)
          example: false
        location_name:
          type: string
          description: Location code where the storage should be created
          example: s-region-1
        name:
          type: string
          description: User-defined name for the storage instance
          example: my-sftp-storage
        password_mode:
          type: string
          description: |-
            Password handling mode for SFTP access:
            'auto': generate a random password (returned in the response)
            'set': use the password provided in `sftp_password`
            'none': no password (SSH-key-only access)
          example: auto
          enum:
            - auto
            - set
            - none
        server_alias:
          type: string
          description: Custom domain alias for accessing the storage. Omit for no alias.
          example: my-storage.example.com
        sftp_password:
          type: string
          description: |-
            SFTP password (8-63 chars). Required when `password_mode` is 'set'.
            Must be omitted when `password_mode` is 'auto' or 'none'.
        ssh_key_ids:
          type: array
          description: >-
            SSH key IDs to associate with this storage at creation time. If
            omitted, no keys are linked.
          example:
            - 1
            - 2
            - 3
          items:
            type: integer
            format: int64
    SFTPStorageItemV4:
      title: >-
        SFTPStorageItemV4 SFTP storage with connection details and
        authentication config. Connect using address with SSH keys or password.
      required:
        - address
        - created_at
        - expires
        - full_name
        - has_custom_config_file
        - has_password
        - id
        - is_http_disabled
        - location_name
        - name
        - provisioning_status
        - server_alias
        - ssh_key_ids
      type: object
      properties:
        address:
          type: string
          description: Full hostname/address for accessing the storage endpoint
          example: luxembourg-2.storage.example.com
        created_at:
          type: string
          description: ISO 8601 timestamp when the storage was created
          format: date-time
          example: '2025-08-05T09:17:02Z'
        expires:
          type: string
          description: Duration when the storage will expire. Null if no expiration is set.
          example: 2 years 6 months
        full_name:
          type: string
          description: >-
            Read-only internal full name of the storage, composed as
            "{`client_id`}-{name}".

            Used by the SFTP backend as the login username. Clients should use
            this value when connecting

            but should continue to identify the storage by `name` in their own
            configuration.
          example: 696-my-sftp-storage
        has_custom_config_file:
          type: boolean
          description: Whether this storage uses a custom configuration file
          example: false
        has_password:
          type: boolean
          description: Whether password authentication is configured for this storage
          example: true
        id:
          type: integer
          description: Unique identifier for the storage instance
          format: int64
          example: 1
        is_http_disabled:
          type: boolean
          description: Whether HTTP access is disabled for this storage (HTTPS only)
          example: false
        location_name:
          type: string
          description: Geographic location code where the storage is provisioned
          example: luxembourg-2
        name:
          type: string
          description: >-
            User-defined name for the storage instance, as supplied at creation
            time.
          example: my-sftp-storage
        password:
          type: string
          description: >-
            SFTP password. Only returned when newly generated or set
            (create/patch). Omitted in GET/list responses.
          example: Xy9$mN2p!qR8
        provisioning_status:
          type: string
          description: >-
            Lifecycle status of the storage. Use this to check readiness before
            operations.
          example: active
          enum:
            - creating
            - active
            - updating
            - deleting
            - deleted
        server_alias:
          type: string
          description: >-
            Custom domain alias for accessing the storage. Null if no alias is
            configured.
          example: my-storage.example.com
        ssh_key_ids:
          type: array
          description: IDs of SSH keys associated with this SFTP storage
          example:
            - 1
            - 2
          items:
            type: integer
            format: int64
    ErrResponse:
      type: object
      properties:
        error:
          type: string
      description: ErrResponse is an error response
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````