Register a storage
PUT /storages/{name} registers one of your S3-compatible storages (AWS S3, Cloudflare R2, Backblaze B2,
Wasabi, MinIO, DigitalOcean Spaces …) by a name of your choosing, or replaces the one you have of that name. Once
registered, name it in requests to read templates from it (source) and save files to it (Save).
The name is lower case letters, digits, - and _, up to 63. The body:
| Field | |
|---|---|
serviceUrl |
The service's endpoint: https://s3.eu-west-2.amazonaws.com, https://ACCOUNT.r2.cloudflarestorage.com … It must be https, on the public internet. |
region |
The region requests are signed for: the bucket's region for AWS, auto for R2, us-east-1 (the default) for most others. |
bucket |
The bucket. |
prefix |
A folder in the bucket that this storage is: keys are inside it, and can't reach above it. Left out: the whole bucket. |
pathStyle |
Path-style addressing (endpoint/bucket/key), as most services other than AWS want. True unless given. |
accessKeyId, secretAccessKey |
The keys. Give keys that can only read and write this bucket or prefix. |
Example
PUT /storages/main
X-API-KEY: your-api-key
Content-Type: application/json
{
"serviceUrl": "https://ACCOUNT.r2.cloudflarestorage.com",
"region": "auto",
"bucket": "my-bucket",
"prefix": "piq/",
"accessKeyId": "your-access-key-id",
"secretAccessKey": "your-secret-access-key"
}
201 Created for a new storage, 200 for one registered again:
{
"name": "main",
"serviceUrl": "https://ACCOUNT.r2.cloudflarestorage.com",
"region": "auto",
"bucket": "my-bucket",
"prefix": "piq/",
"pathStyle": true,
"accessKeyId": "…MPLE",
"createdAt": "2026-10-31T09:59:42.527Z",
"updatedAt": "2026-10-31T09:59:42.527Z"
}
The storage is tried before it is kept, by listing it with the keys given. If it can't be reached, has no such bucket
or refuses the keys, it isn't registered, and the answer (502, or 504 if it doesn't answer in time) says why. The
secret access key is kept encrypted, and never given back; the access key ID only by its last four characters.
A licence can have up to 10 storages: one more is refused (409).
See also: API, Your storages, Try a storage, Save.