curl --request POST \
--url https://api.uplint.dev/api/v1/tenants/{tenant_id}/storage-configs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Patient Documents",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"region": "ap-south-1",
"default_bucket": "acme-patient-docs",
"base_path": "file-service/",
"set_as_default": false
}
'import requests
url = "https://api.uplint.dev/api/v1/tenants/{tenant_id}/storage-configs"
payload = {
"name": "Patient Documents",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"region": "ap-south-1",
"default_bucket": "acme-patient-docs",
"base_path": "file-service/",
"set_as_default": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Patient Documents',
access_key_id: 'AKIAIOSFODNN7EXAMPLE',
secret_access_key: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY',
region: 'ap-south-1',
default_bucket: 'acme-patient-docs',
base_path: 'file-service/',
set_as_default: false
})
};
fetch('https://api.uplint.dev/api/v1/tenants/{tenant_id}/storage-configs', 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.uplint.dev/api/v1/tenants/{tenant_id}/storage-configs",
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([
'name' => 'Patient Documents',
'access_key_id' => 'AKIAIOSFODNN7EXAMPLE',
'secret_access_key' => 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY',
'region' => 'ap-south-1',
'default_bucket' => 'acme-patient-docs',
'base_path' => 'file-service/',
'set_as_default' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.uplint.dev/api/v1/tenants/{tenant_id}/storage-configs"
payload := strings.NewReader("{\n \"name\": \"Patient Documents\",\n \"access_key_id\": \"AKIAIOSFODNN7EXAMPLE\",\n \"secret_access_key\": \"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\",\n \"region\": \"ap-south-1\",\n \"default_bucket\": \"acme-patient-docs\",\n \"base_path\": \"file-service/\",\n \"set_as_default\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.uplint.dev/api/v1/tenants/{tenant_id}/storage-configs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Patient Documents\",\n \"access_key_id\": \"AKIAIOSFODNN7EXAMPLE\",\n \"secret_access_key\": \"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\",\n \"region\": \"ap-south-1\",\n \"default_bucket\": \"acme-patient-docs\",\n \"base_path\": \"file-service/\",\n \"set_as_default\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uplint.dev/api/v1/tenants/{tenant_id}/storage-configs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Patient Documents\",\n \"access_key_id\": \"AKIAIOSFODNN7EXAMPLE\",\n \"secret_access_key\": \"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\",\n \"region\": \"ap-south-1\",\n \"default_bucket\": \"acme-patient-docs\",\n \"base_path\": \"file-service/\",\n \"set_as_default\": false\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "Storage bucket added successfully",
"data": {
"config_id": "cfg_a1b2c3d4e5f6",
"tenant_id": "tnt_9f8e7d6c",
"name": "Patient Documents",
"provider": "aws_s3",
"access_key_id": "AKIA...MPLE",
"region": "ap-south-1",
"default_bucket": "acme-patient-docs",
"base_path": "file-service/",
"is_active": true,
"is_default": false,
"created_at": "2026-02-10T12:00:00Z",
"updated_at": null
},
"timestamp": "2026-02-10T12:00:00Z"
}{
"status": "ERROR",
"message": "Invalid or missing API key",
"errors": [
"Authentication required"
],
"timestamp": "2026-02-10T12:00:00Z"
}{
"status": "ERROR",
"message": "Admin scope required",
"errors": [
"Insufficient permissions"
],
"timestamp": "2026-02-10T12:00:00Z"
}{
"status": "ERROR",
"message": "<string>",
"errors": [
"<string>"
],
"timestamp": "2023-11-07T05:31:56Z"
}{
"status": "ERROR",
"message": "Validation error",
"errors": [
"name: field required"
],
"timestamp": "2026-02-10T12:00:00Z"
}Add Storage Bucket
Register a new S3 bucket for the tenant. Unlike single-bucket configuration, this does not deactivate existing buckets. The first bucket added — or any created with set_as_default: true — becomes the tenant’s default (fallback) bucket.
curl --request POST \
--url https://api.uplint.dev/api/v1/tenants/{tenant_id}/storage-configs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Patient Documents",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"region": "ap-south-1",
"default_bucket": "acme-patient-docs",
"base_path": "file-service/",
"set_as_default": false
}
'import requests
url = "https://api.uplint.dev/api/v1/tenants/{tenant_id}/storage-configs"
payload = {
"name": "Patient Documents",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"region": "ap-south-1",
"default_bucket": "acme-patient-docs",
"base_path": "file-service/",
"set_as_default": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Patient Documents',
access_key_id: 'AKIAIOSFODNN7EXAMPLE',
secret_access_key: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY',
region: 'ap-south-1',
default_bucket: 'acme-patient-docs',
base_path: 'file-service/',
set_as_default: false
})
};
fetch('https://api.uplint.dev/api/v1/tenants/{tenant_id}/storage-configs', 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.uplint.dev/api/v1/tenants/{tenant_id}/storage-configs",
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([
'name' => 'Patient Documents',
'access_key_id' => 'AKIAIOSFODNN7EXAMPLE',
'secret_access_key' => 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY',
'region' => 'ap-south-1',
'default_bucket' => 'acme-patient-docs',
'base_path' => 'file-service/',
'set_as_default' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.uplint.dev/api/v1/tenants/{tenant_id}/storage-configs"
payload := strings.NewReader("{\n \"name\": \"Patient Documents\",\n \"access_key_id\": \"AKIAIOSFODNN7EXAMPLE\",\n \"secret_access_key\": \"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\",\n \"region\": \"ap-south-1\",\n \"default_bucket\": \"acme-patient-docs\",\n \"base_path\": \"file-service/\",\n \"set_as_default\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.uplint.dev/api/v1/tenants/{tenant_id}/storage-configs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Patient Documents\",\n \"access_key_id\": \"AKIAIOSFODNN7EXAMPLE\",\n \"secret_access_key\": \"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\",\n \"region\": \"ap-south-1\",\n \"default_bucket\": \"acme-patient-docs\",\n \"base_path\": \"file-service/\",\n \"set_as_default\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uplint.dev/api/v1/tenants/{tenant_id}/storage-configs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Patient Documents\",\n \"access_key_id\": \"AKIAIOSFODNN7EXAMPLE\",\n \"secret_access_key\": \"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\",\n \"region\": \"ap-south-1\",\n \"default_bucket\": \"acme-patient-docs\",\n \"base_path\": \"file-service/\",\n \"set_as_default\": false\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "Storage bucket added successfully",
"data": {
"config_id": "cfg_a1b2c3d4e5f6",
"tenant_id": "tnt_9f8e7d6c",
"name": "Patient Documents",
"provider": "aws_s3",
"access_key_id": "AKIA...MPLE",
"region": "ap-south-1",
"default_bucket": "acme-patient-docs",
"base_path": "file-service/",
"is_active": true,
"is_default": false,
"created_at": "2026-02-10T12:00:00Z",
"updated_at": null
},
"timestamp": "2026-02-10T12:00:00Z"
}{
"status": "ERROR",
"message": "Invalid or missing API key",
"errors": [
"Authentication required"
],
"timestamp": "2026-02-10T12:00:00Z"
}{
"status": "ERROR",
"message": "Admin scope required",
"errors": [
"Insufficient permissions"
],
"timestamp": "2026-02-10T12:00:00Z"
}{
"status": "ERROR",
"message": "<string>",
"errors": [
"<string>"
],
"timestamp": "2023-11-07T05:31:56Z"
}{
"status": "ERROR",
"message": "Validation error",
"errors": [
"name: field required"
],
"timestamp": "2026-02-10T12:00:00Z"
}Authorizations
Pass an API key or JWT token. API keys can be sent as Authorization: Bearer <key> or Authorization: <key>.
Path Parameters
The tenant's unique identifier.
Body
Human-friendly label for this bucket (unique per tenant).
1 - 100AWS access key ID.
16 - 128AWS secret access key. Encrypted at rest and never returned.
1S3 bucket name. Immutable after creation.
3 - 63Make this the tenant's default (fallback) bucket. The first bucket added always becomes the default.
AWS region of the bucket.
Key prefix applied to every object written to this bucket. Immutable after creation.
Was this page helpful?

