Skip to main content
PATCH
/
storage
/
v4
/
sftp_storages
/
{storage_id}
Update SFTP storage
curl --request PATCH \
  --url https://api.gcore.com/storage/v4/sftp_storages/{storage_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "expires": "2 years 6 months",
  "has_custom_config_file": false,
  "is_http_disabled": false,
  "password_mode": "auto",
  "server_alias": "my-storage.example.com",
  "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

Path Parameters

storage_id
integer<int64>
required

Storage ID

Body

application/json
expires
string

Duration when the storage should expire (e.g., "2 years 6 months"). Empty string to remove.

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

password_mode
enum<string>

Password handling mode. Omit to leave password unchanged. 'auto': regenerate password (returned in response) 'none': remove password Note: 'set' is not allowed in PATCH.

Available options:
auto,
none
Example:

"auto"

server_alias
string

Custom domain alias for accessing the storage. Empty string to remove.

Example:

"my-storage.example.com"

ssh_key_ids
integer<int64>[]

SSH key IDs to associate with this storage. Replaces all existing keys. If omitted, existing keys are unchanged. If empty array, all keys are removed.

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"