POST
/
storage
/
provisioning
/
v2
/
storage
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
storage = client.storage.create(
    location="s-ed1",
    name="my-storage-prod",
    type="s3",
)
print(storage.id)
{
  "address": "s-ed1.cloud.example.com",
  "can_restore": true,
  "client_id": 1,
  "created_at": "2025-08-05 09:17:02.095832+00:00",
  "credentials": {
    "keys": [
      {
        "created_at": "2025-08-05 09:15:00+00:00",
        "id": 123,
        "name": "my-production-key"
      }
    ],
    "s3": {
      "access_key": "AKIAIOSFODNN7EXAMPLE",
      "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
    },
    "sftp_password": "Xy9$mN2p!qR8"
  },
  "custom_config_file": false,
  "deleted_at": "2025-08-05 10:30:15.123456+00:00",
  "disable_http": false,
  "expires": "2026-08-05 09:17:02.095832+00:00",
  "id": 1,
  "location": "s-ed1",
  "name": "1-my-storage-prod",
  "provisioning_status": "ok",
  "reseller_id": 1,
  "rewrite_rules": {},
  "server_alias": "my-storage.example.com",
  "type": "s3"
}

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
enum<string>
required

Geographic location where the storage will be provisioned. Each location represents a specific data center region.

Available options:
s-ed1,
s-drc2,
s-sgc1,
s-nhn2,
s-darz,
s-ws1,
ams,
sin,
fra,
mia
Example:

"s-ed1"

name
string
required

Unique storage name identifier. Must contain only letters, numbers, dashes, and underscores. Cannot be empty and must be less than 256 characters.

Maximum length: 256
Example:

"my-storage-prod"

type
enum<string>
required

Storage protocol type. Choose 's3' for S3-compatible object storage with API access, or sftp for SFTP file transfer protocol.

Available options:
sftp,
s3
Example:

"s3"

generate_sftp_password
boolean

Automatically generate a secure password for SFTP storage access. Only applicable when type is sftp. When true, a random password will be generated and returned in the response.

Example:

true

sftp_password
string

Custom password for SFTP storage access. Only applicable when type is sftp. If not provided and generate_sftp_password is false, no password authentication will be available.

Response

Storage

address
string
required

Full hostname/address for accessing the storage endpoint

Example:

"s-ed1.cloud.example.com"

client_id
integer
required

Client identifier who owns this storage

Example:

1

created_at
string
required

ISO 8601 timestamp when the storage was created

Example:

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

id
integer
required

Unique identifier for the storage instance

Example:

1

location
enum<string>
required

Geographic location code where the storage is provisioned

Available options:
s-ed1,
s-drc2,
s-sgc1,
s-nhn2,
s-darz,
s-ws1,
ams,
sin,
fra,
mia
Example:

"s-ed1"

name
string
required

User-defined name for the storage instance

Example:

"1-my-storage-prod"

provisioning_status
enum<string>
required

Current provisioning status of the storage instance

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

"ok"

reseller_id
integer
required

Reseller technical client ID associated with the client

Example:

1

type
enum<string>
required

Storage protocol type - either S3-compatible object storage or SFTP file transfer

Available options:
sftp,
s3
Example:

"s3"

can_restore
boolean

Whether this storage can be restored if deleted (S3 storages only, within 2 weeks)

Example:

true

credentials
object
custom_config_file
boolean

Whether custom configuration file is used for this storage

Example:

false

deleted_at
string

ISO 8601 timestamp when the storage was deleted (only present for deleted storages)

Example:

"2025-08-05 10:30:15.123456+00:00"

disable_http
boolean

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

Example:

false

expires
string

ISO 8601 timestamp when the storage will expire (if set)

Example:

"2026-08-05 09:17:02.095832+00:00"

rewrite_rules
object

Custom URL rewrite rules for the storage (admin-configurable)

server_alias
string

Custom domain alias for accessing the storage

Example:

"my-storage.example.com"