Skip to main content
PATCH
/
storage
/
provisioning
/
v3
/
storages
/
sftp
/
{storage_id}
/
credentials
Update SFTP credentials
curl --request PATCH \
  --url https://api.gcore.com/storage/provisioning/v3/storages/sftp/{storage_id}/credentials \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "delete_sftp_password": false,
  "generate_sftp_password": true,
  "reset_all_keys": false,
  "sftp_password": "MySecurePassword123",
  "ssh_key_ids": [
    1,
    2,
    3
  ]
}
'
{
  "sftp_password": "Xy9$mN2p!qR8",
  "ssh_keys": [
    {
      "created_at": "2025-08-05 09:15:00+00:00",
      "id": 123,
      "name": "my-production-key",
      "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAA... user@example.com"
    }
  ]
}

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
delete_sftp_password
boolean

Remove the SFTP password

Example:

false

generate_sftp_password
boolean

Generate a random SFTP password (mutually exclusive with sftp_password)

Example:

true

reset_all_keys
boolean

Reset (remove) all SSH keys from this storage

Example:

false

sftp_password
string

Set a custom SFTP password (mutually exclusive with generate_sftp_password)

Example:

"MySecurePassword123"

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

SFTPCredentialsV3

SFTPCredentialsV3 credentials for SFTP storage V3

sftp_password
string

SFTP password for authentication. Only returned when newly generated or set. For security, this field is omitted in GET responses and only included when creating storage with generate_sftp_password=true or when setting/generating a new password via the credentials endpoint.

Example:

"Xy9$mN2p!qR8"

ssh_keys
object[]

SSH keys associated with this SFTP storage