Skip to main content
POST
/
storage
/
v4
/
sftp_storages
Create SFTP storage
curl --request POST \
  --url https://api.gcore.com/storage/v4/sftp_storages \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "location_name": "mia",
  "name": "my-sftp-storage",
  "password_mode": "auto",
  "expires": "2 years 6 months",
  "has_custom_config_file": false,
  "is_http_disabled": false,
  "server_alias": "my-storage.example.com",
  "sftp_password": "<string>",
  "ssh_key_ids": [
    1,
    2,
    3
  ]
}
'
{
  "address": "luxembourg-2.storage.example.com",
  "created_at": "2025-08-05 09:17:02+00:00",
  "expires": "2 years 6 months",
  "has_custom_config_file": false,
  "has_password": true,
  "id": 1,
  "is_http_disabled": false,
  "location_name": "luxembourg-2",
  "name": "my-sftp-storage",
  "provisioning_status": "active",
  "server_alias": "my-storage.example.com",
  "ssh_key_ids": [
    1,
    2
  ],
  "password": "Xy9$mN2p!qR8"
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Body

application/json
location_name
string
required

Location code where the storage should be created

Example:

"mia"

name
string
required

User-defined name for the storage instance

Example:

"my-sftp-storage"

password_mode
enum<string>
required

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)

Available options:
auto,
set,
none
Example:

"auto"

expires
string

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
boolean

Whether this storage should use a custom configuration file

Example:

false

is_http_disabled
boolean

Whether HTTP access should be disabled (HTTPS only)

Example:

false

server_alias
string

Custom domain alias for accessing the storage. Omit for no alias.

Example:

"my-storage.example.com"

sftp_password
string

SFTP password (8-63 chars). Required when password_mode is 'set'. Must be omitted when password_mode is 'auto' or 'none'.

ssh_key_ids
integer<int64>[]

SSH key IDs to associate with this storage at creation time. If omitted, no keys are linked.

Example:
[1, 2, 3]

Response

SFTP StorageItemV4

address
string
required

Full hostname/address for accessing the storage endpoint

Example:

"luxembourg-2.storage.example.com"

created_at
string<date-time>
required

ISO 8601 timestamp when the storage was created

Example:

"2025-08-05 09:17:02+00:00"

expires
string
required

Duration when the storage will expire. Null if no expiration is set.

Example:

"2 years 6 months"

has_custom_config_file
boolean
required

Whether this storage uses a custom configuration file

Example:

false

has_password
boolean
required

Whether password authentication is configured for this storage

Example:

true

id
integer<int64>
required

Unique identifier for the storage instance

Example:

1

is_http_disabled
boolean
required

Whether HTTP access is disabled for this storage (HTTPS only)

Example:

false

location_name
string
required

Geographic location code where the storage is provisioned

Example:

"luxembourg-2"

name
string
required

User-defined name for the storage instance

Example:

"my-sftp-storage"

provisioning_status
enum<string>
required

Lifecycle status of the storage. Use this to check readiness before operations.

Available options:
creating,
active,
updating,
deleting,
deleted
Example:

"active"

server_alias
string
required

Custom domain alias for accessing the storage. Null if no alias is configured.

Example:

"my-storage.example.com"

ssh_key_ids
integer<int64>[]
required

IDs of SSH keys associated with this SFTP storage

Example:
[1, 2]
password
string

SFTP password. Only returned when newly generated or set (create/patch). Omitted in GET/list responses.

Example:

"Xy9$mN2p!qR8"