curl --request PUT \
--url https://api.gcore.com/storage/provisioning/v1/storage \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"location": "s-region-1",
"name": "my-storage-prod",
"type": "s3_compatible",
"generate_sftp_password": true,
"sftp_password": "<string>"
}
'import requests
url = "https://api.gcore.com/storage/provisioning/v1/storage"
payload = {
"location": "s-region-1",
"name": "my-storage-prod",
"type": "s3_compatible",
"generate_sftp_password": True,
"sftp_password": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
location: 's-region-1',
name: 'my-storage-prod',
type: 's3_compatible',
generate_sftp_password: true,
sftp_password: '<string>'
})
};
fetch('https://api.gcore.com/storage/provisioning/v1/storage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/storage/provisioning/v1/storage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'location' => 's-region-1',
'name' => 'my-storage-prod',
'type' => 's3_compatible',
'generate_sftp_password' => true,
'sftp_password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/storage/provisioning/v1/storage"
payload := strings.NewReader("{\n \"location\": \"s-region-1\",\n \"name\": \"my-storage-prod\",\n \"type\": \"s3_compatible\",\n \"generate_sftp_password\": true,\n \"sftp_password\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.gcore.com/storage/provisioning/v1/storage")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"location\": \"s-region-1\",\n \"name\": \"my-storage-prod\",\n \"type\": \"s3_compatible\",\n \"generate_sftp_password\": true,\n \"sftp_password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/storage/provisioning/v1/storage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location\": \"s-region-1\",\n \"name\": \"my-storage-prod\",\n \"type\": \"s3_compatible\",\n \"generate_sftp_password\": true,\n \"sftp_password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"address": "s-region-1.storage.example.com",
"client_id": 1,
"created_at": "2025-08-05T09:17:02Z",
"id": 1,
"location": "s-region-1",
"name": "1-my-storage-prod",
"provisioning_status": "ok",
"reseller_id": 1,
"type": "s3_compatible",
"can_restore": true,
"credentials": {
"keys": [
{
"created_at": "2025-08-05T09:15:00Z",
"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-05T10:30:15Z",
"disable_http": false,
"expires": "2026-08-05T09:17:02Z",
"rewrite_rules": {},
"server_alias": "my-storage.example.com"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Create storage
Creates a new storage instance (S3 or SFTP) in the specified location and returns the storage details including credentials.
Deprecated: Use POST /v4/object_storages for S3 storage or
POST /v4/sftp_storages for SFTP storage instead.
curl --request PUT \
--url https://api.gcore.com/storage/provisioning/v1/storage \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"location": "s-region-1",
"name": "my-storage-prod",
"type": "s3_compatible",
"generate_sftp_password": true,
"sftp_password": "<string>"
}
'import requests
url = "https://api.gcore.com/storage/provisioning/v1/storage"
payload = {
"location": "s-region-1",
"name": "my-storage-prod",
"type": "s3_compatible",
"generate_sftp_password": True,
"sftp_password": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
location: 's-region-1',
name: 'my-storage-prod',
type: 's3_compatible',
generate_sftp_password: true,
sftp_password: '<string>'
})
};
fetch('https://api.gcore.com/storage/provisioning/v1/storage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/storage/provisioning/v1/storage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'location' => 's-region-1',
'name' => 'my-storage-prod',
'type' => 's3_compatible',
'generate_sftp_password' => true,
'sftp_password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/storage/provisioning/v1/storage"
payload := strings.NewReader("{\n \"location\": \"s-region-1\",\n \"name\": \"my-storage-prod\",\n \"type\": \"s3_compatible\",\n \"generate_sftp_password\": true,\n \"sftp_password\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.gcore.com/storage/provisioning/v1/storage")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"location\": \"s-region-1\",\n \"name\": \"my-storage-prod\",\n \"type\": \"s3_compatible\",\n \"generate_sftp_password\": true,\n \"sftp_password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/storage/provisioning/v1/storage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location\": \"s-region-1\",\n \"name\": \"my-storage-prod\",\n \"type\": \"s3_compatible\",\n \"generate_sftp_password\": true,\n \"sftp_password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"address": "s-region-1.storage.example.com",
"client_id": 1,
"created_at": "2025-08-05T09:17:02Z",
"id": 1,
"location": "s-region-1",
"name": "1-my-storage-prod",
"provisioning_status": "ok",
"reseller_id": 1,
"type": "s3_compatible",
"can_restore": true,
"credentials": {
"keys": [
{
"created_at": "2025-08-05T09:15:00Z",
"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-05T10:30:15Z",
"disable_http": false,
"expires": "2026-08-05T09:17:02Z",
"rewrite_rules": {},
"server_alias": "my-storage.example.com"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
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
Geographic location where the storage will be provisioned. Each location represents a specific data center region.
"s-region-1"
Unique storage name identifier. Must contain only letters, numbers, dashes, and underscores. Cannot be empty and must be less than 256 characters.
256^[a-zA-Z0-9_-]+$"my-storage-prod"
Storage protocol type. Choose 's3_compatible' for S3-compatible object storage
with API access, or sftp for SFTP file transfer protocol.
sftp, s3_compatible "s3_compatible"
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.
true
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
Full hostname/address for accessing the storage endpoint
"s-region-1.storage.example.com"
Client identifier who owns this storage
1
ISO 8601 timestamp when the storage was created
"2025-08-05T09:17:02Z"
Unique identifier for the storage instance
1
Geographic location code where the storage is provisioned
"s-region-1"
User-defined name for the storage instance
"1-my-storage-prod"
Current provisioning status of the storage instance
creating, ok, updating, deleting, deleted "ok"
Reseller technical client ID associated with the client
1
Storage protocol type - either S3-compatible object storage or SFTP file transfer
sftp, s3_compatible "s3_compatible"
Whether this storage can be restored if deleted (S3 storages only, within 2 weeks)
true
Show child attributes
Show child attributes
Whether custom configuration file is used for this storage
false
ISO 8601 timestamp when the storage was deleted (only present for deleted storages)
"2025-08-05T10:30:15Z"
Whether HTTP access is disabled for this storage (HTTPS only)
false
ISO 8601 timestamp when the storage will expire (if set)
"2026-08-05T09:17:02Z"
Custom URL rewrite rules for the storage (admin-configurable)
Show child attributes
Show child attributes
Custom domain alias for accessing the storage
"my-storage.example.com"
Was this page helpful?