Create S3 Access Key
curl --request POST \
--url https://api.example.com/api/storage/s3/access-keys \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"description": "backup-script"
}
'import requests
url = "https://api.example.com/api/storage/s3/access-keys"
payload = { "description": "backup-script" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: 'backup-script'})
};
fetch('https://api.example.com/api/storage/s3/access-keys', 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.example.com/api/storage/s3/access-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'backup-script'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.example.com/api/storage/s3/access-keys"
payload := strings.NewReader("{\n \"description\": \"backup-script\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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.post("https://api.example.com/api/storage/s3/access-keys")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"backup-script\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/storage/s3/access-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"backup-script\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "11111111-1111-1111-1111-111111111111",
"accessKeyId": "INSFABC123DEF456GH78",
"secretAccessKey": "x7K2-a_pL9qRs4N8vYzWcE1fH5gJ3mUtBoD6ViXk",
"description": "backup-script",
"createdAt": "2026-04-22T00:00:00Z",
"lastUsedAt": null
}
}{
"error": "VALIDATION_ERROR",
"message": "Invalid request",
"statusCode": 400,
"nextActions": "Check your request parameters"
}{
"error": "VALIDATION_ERROR",
"message": "Invalid request",
"statusCode": 400,
"nextActions": "Check your request parameters"
}{
"error": "VALIDATION_ERROR",
"message": "Invalid request",
"statusCode": 400,
"nextActions": "Check your request parameters"
}S3 Access Keys
Create S3 Access Key
Mint a new S3 credential pair usable against the /storage/v1/s3
protocol gateway. The plaintext secretAccessKey in the response
is returned exactly once — it is encrypted at rest and can
never be retrieved again. If you lose it, revoke and re-create.
Limits:
- 50 keys per project (hard cap, enforced transactionally).
- Rate-limited to 20 management requests per 15 min per IP.
POST
/
api
/
storage
/
s3
/
access-keys
Create S3 Access Key
curl --request POST \
--url https://api.example.com/api/storage/s3/access-keys \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"description": "backup-script"
}
'import requests
url = "https://api.example.com/api/storage/s3/access-keys"
payload = { "description": "backup-script" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: 'backup-script'})
};
fetch('https://api.example.com/api/storage/s3/access-keys', 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.example.com/api/storage/s3/access-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'backup-script'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.example.com/api/storage/s3/access-keys"
payload := strings.NewReader("{\n \"description\": \"backup-script\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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.post("https://api.example.com/api/storage/s3/access-keys")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"backup-script\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/storage/s3/access-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"backup-script\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "11111111-1111-1111-1111-111111111111",
"accessKeyId": "INSFABC123DEF456GH78",
"secretAccessKey": "x7K2-a_pL9qRs4N8vYzWcE1fH5gJ3mUtBoD6ViXk",
"description": "backup-script",
"createdAt": "2026-04-22T00:00:00Z",
"lastUsedAt": null
}
}{
"error": "VALIDATION_ERROR",
"message": "Invalid request",
"statusCode": 400,
"nextActions": "Check your request parameters"
}{
"error": "VALIDATION_ERROR",
"message": "Invalid request",
"statusCode": 400,
"nextActions": "Check your request parameters"
}{
"error": "VALIDATION_ERROR",
"message": "Invalid request",
"statusCode": 400,
"nextActions": "Check your request parameters"
}Was this page helpful?
⌘I