Docs

HTTP API: storage

Upload, download, list, move, delete and sign files, resumable uploads, public URLs and buckets — every request and response.

Updated Nov 25, 2026

Files in buckets over HTTP. Each call is checked against the bucket's rules (READ, LIST, WRITE, DELETE — Access, links and delivery). Guides: Working with files, Access, links and delivery; SDK: JavaScript: Storage.

URL=https://<project-ref>.sovarias.in
ANON_KEY=<anon key>
ACCESS_TOKEN=<a signed-in user's access token>
Base URLhttps://<project-ref>.sovarias.in — your project URL from Connect.
KeysSend the project's key as apikey. Calls made for a signed-in user also send Authorization: Bearer <access token>.
ErrorsA status code and {"detail": …} — a sentence, or {code, message} for errors your code may branch on (HTTP API).

#Files

POST/api/v1/store/objects/{bucket_name}/{object_path}

Upload a file.

Send the file as multipart form data in a field named file. Without upsert=true, a path that already holds a file is refused (409) — nothing is overwritten. Your bucket rules must allow WRITE on the path.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/objects/{bucket_name}/{object_path}

Path parameters

bucket_namestringrequired
The bucket.
object_pathstringrequired
The file's path in the bucket, e.g. <user-id>/photo.png (URL-encode each segment).

Query parameters

upsertbooleanoptionaldefault false
Replace the file if one exists at the path.
cache_controlstring | nulloptional
0–32 characters

Body (multipart/form-data)

filestringrequired
The file. Its part's Content-Type becomes the stored content type (set it — browsers display files by it).
cacheControlstring | nulloptional
0–32 characters

Returns

bucket, pathstring
Where the file is.
sizeinteger
Bytes.
content_typestring
As stored — sent with downloads.
checksumstring
MD5 of the content, hex.
created_at, updated_atstring
ISO 8601; created_at stays the same when a file is replaced.

Responses

  • 201Created.
  • 400Invalid path (for example ..).
  • 403Storage access denied — no bucket rule allows this action for the caller (Access, links and delivery).
  • 403A plan code — the project's storage is full (Free) — Billing, invoices and overage.
  • 404No such bucket.
  • 409A file exists at the path and upsert isn't set.
  • 413Bigger than the bucket's (or plan's) largest file.
  • 415The content type isn't in the bucket's allowed types.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/store/objects/<bucket_name>/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/photo.png?upsert=true" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -F file=@photo.png
Response
{
  "bucket": "avatars",
  "path": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/photo.png",
  "size": 48213,
  "content_type": "image/png",
  "checksum": "9e107d9d372bb6826bd81d3542a419d6",
  "created_at": "2026-10-17T13:02:44Z",
  "updated_at": "2026-10-17T13:02:44Z"
}

GET/api/v1/store/objects/{bucket_name}/{object_path}

Download a file.

Streams the content with its stored Content-Type. Your bucket rules must allow READ. For <img> tags and links use a public URL (public buckets) or a signed URL.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/objects/{bucket_name}/{object_path}

Path parameters

bucket_namestringrequired
The bucket.
object_pathstringrequired
The file's path in the bucket, e.g. <user-id>/photo.png (URL-encode each segment).

Responses

  • 200The file's bytes, with Content-Type and Content-Length.
  • 403Storage access denied — no bucket rule allows this action for the caller (Access, links and delivery).
  • 404No such bucket or file.
  • 401No valid session or key.
curl -s "$URL/api/v1/store/objects/<bucket_name>/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/photo.png" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

DELETE/api/v1/store/objects/{bucket_name}/{object_path}

Delete a file.

Immediate and permanent — there is no trash. Needs DELETE in your bucket rules.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/objects/{bucket_name}/{object_path}

Path parameters

bucket_namestringrequired
The bucket.
object_pathstringrequired
The file's path in the bucket, e.g. <user-id>/photo.png (URL-encode each segment).

Responses

  • 200Success.
  • 403Storage access denied — no bucket rule allows this action for the caller (Access, links and delivery).
  • 404No such bucket or file.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/store/objects/<bucket_name>/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/old.png" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "status": "deleted",
  "bucket": "avatars",
  "path": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/old.png"
}

GET/api/v1/store/objects/{bucket_name}

List the files in a bucket (optionally under a folder).

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/objects/{bucket_name}

Path parameters

bucket_namestringrequired
The bucket.

Query parameters

prefixstringoptional
Only paths starting with this, e.g. <user-id>/.
limitintegeroptionaldefault 100
How many (default 100).
offsetintegeroptionaldefault 0
How many to skip.

Returns

namestring
The file's path in the bucket.
sizeinteger
content_typestring
created_at, updated_atstring
checksumstring
MD5, hex.

Responses

  • 200Success.
  • 403Storage access denied — no rule allows LIST.
  • 404No such bucket.
  • 401No valid session or key.
curl -s "$URL/api/v1/store/objects/<bucket_name>?prefix=6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
[
  {
    "name": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/photo.png",
    "size": 48213,
    "content_type": "image/png",
    "created_at": "2026-10-17T13:02:44Z",
    "updated_at": "2026-10-17T13:02:44Z",
    "checksum": "9e107d9d372bb6826bd81d3542a419d6"
  }
]

POST/api/v1/store/objects/move

Move or rename a file (within or between buckets).

Needs WRITE on both the old and the new path. Fails rather than overwrite a file at the destination.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/objects/move

Body

from_pathstringrequired
bucket/path of the file.
at least 1 characters
to_pathstringrequired
bucket/path to move it to.
at least 1 characters

Responses

  • 200Success.
  • 400A path isn't bucket/path.
  • 403Storage access denied — no bucket rule allows this action for the caller (Access, links and delivery).
  • 404No such bucket or source file.
  • 409A file already exists at to_path.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/store/objects/move" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"from_path": "avatars/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/old.png", "to_path": "avatars/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/new.png"}'
Response
{
  "status": "moved",
  "from": "avatars/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/old.png",
  "to": "avatars/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/new.png"
}

POST/api/v1/store/objects/copy

Copy a file, within a bucket or to another one (supabase's copy).

Needs READ on the source and WRITE on the destination path. The copy meets the destination bucket's type and size rules and the plan's storage quota, as an upload of the same file would; it keeps the source's cacheControl. Without upsert an existing file at the destination is a conflict.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/objects/copy

Body

from_pathstringrequired
bucket/path of the file.
3–1,024 characters
to_pathstringrequired
bucket/path of the copy.
3–1,024 characters
upsertbooleanoptionaldefault false
Replace a file at the destination (default false).

Responses

  • 201Created.
  • 400A path isn't bucket/path.
  • 403No bucket rule allows reading the source or writing the destination.
  • 404No such bucket or source file.
  • 409A file already exists at to_path (send upsert).
  • 413Larger than the destination bucket or the plan allows.
  • 415The destination bucket doesn't allow this file type.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/store/objects/copy" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"from_path": "avatars/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/me.png", "to_path": "avatars/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/backup.png"}'
Response
{
  "status": "copied",
  "from": "avatars/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/me.png",
  "to": "avatars/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/backup.png",
  "path": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/backup.png",
  "key": "avatars/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/backup.png"
}

GET/api/v1/store/object-info/{bucket_name}/{object_path}

A file's details without its bytes: size, type, cache control, etag and dates (supabase's info / exists).

Needs READ on the file. A missing or unreadable file is a 404, so exists() in the SDKs is this call.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/object-info/{bucket_name}/{object_path}

Path parameters

bucket_namestringrequired
The bucket.
object_pathstringrequired
The file's path (URL-encode each segment).

Responses

  • 200Success.
  • 403No bucket rule allows reading the file.
  • 404No such bucket or file.
  • 401No valid session or key.
curl -s "$URL/api/v1/store/object-info/avatars/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/me.png" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "name": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/me.png",
  "bucket_id": "avatars",
  "size": 48213,
  "content_type": "image/png",
  "cache_control": "max-age=3600",
  "etag": "9a0364b9e99bb480dd25e1f0284c8555",
  "created_at": "2026-10-30T11:02:09+00:00",
  "updated_at": "2026-10-31T08:44:51+00:00"
}

POST/api/v1/store/objects/{bucket_name}/{object_path}/sign-download

Create a signed URL that lets anyone holding it download one file until it expires.

Create it for a caller allowed to READ the file. It carries no other access and can't be revoked before it expires — keep lifetimes short. In production the URL points straight at the storage service.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/objects/{bucket_name}/{object_path}/sign-download

Path parameters

bucket_namestringrequired
The bucket.
object_pathstringrequired
The file's path in the bucket, e.g. <user-id>/photo.png (URL-encode each segment).

Body

expires_ininteger | nulloptional
Seconds, 1–86,400 (1 day). Default 900 (15 minutes); the SDKs send 3,600.
1.0–86400.0
content_typestring | nulloptional
Content type to serve the download with.
0–256 characters
size_bytesinteger | nulloptional
0.0–…
downloadboolean | string | nulloptional
upsertboolean | nulloptional

Returns

urlstring
Open or GET it — no key or session needed.
expires_atstring
ISO 8601.
methodstring
GET.

Responses

  • 200Success.
  • 403Storage access denied — no bucket rule allows this action for the caller (Access, links and delivery).
  • 404No such bucket or file.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/store/objects/invoices/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/2026-10.pdf/sign-download" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"expires_in": 600}'
Response
{
  "url": "https://<storage-host>/<object>?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=600&X-Amz-Signature=…",
  "expires_at": "2026-10-17T13:14:44Z",
  "method": "GET"
}

POST/api/v1/store/objects/{bucket_name}/{object_path}/sign-upload

Create a signed URL that lets a browser upload one file straight to storage.

Create it on your server for a caller allowed to WRITE the path, hand the URL to the browser, and let it PUT the file. Send size_bytes (the file's exact size) to get a URL that goes straight to storage and only accepts a file of that size; the size is checked against the bucket's and the plan's file-size limit and your storage quota when you create the URL. Without size_bytes the URL points at api.sovaria.in/api/v1/store/signed/… and the upload goes through Sovaria, which checks the limits as the bytes arrive. The bucket's type limits apply either way.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/objects/{bucket_name}/{object_path}/sign-upload

Path parameters

bucket_namestringrequired
The bucket.
object_pathstringrequired
The file's path in the bucket, e.g. <user-id>/photo.png (URL-encode each segment).

Body

expires_ininteger | nulloptional
Seconds, 1–86,400. Default 900; the SDKs send 3,600.
1.0–86400.0
content_typestring | nulloptional
The content type the upload must have.
0–256 characters
size_bytesinteger | nulloptional
The file's exact size in bytes. The upload must send exactly this many bytes.
0.0–…
downloadboolean | string | nulloptional
upsertboolean | nulloptional

Returns

urlstringrequired
expires_atstringrequired
methodstringrequired

Responses

  • 200Success.
  • 403Storage access denied — no bucket rule allows this action for the caller (Access, links and delivery).
  • 403PLAN_LIMIT_REACHED — size_bytes is over the plan's file-size limit; PLAN_QUOTA_EXHAUSTED — it would take the project over a hard storage quota.
  • 413size_bytes is larger than the bucket's file-size limit.
  • 404No such bucket.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/store/objects/uploads/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/video.mp4/sign-upload" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"expires_in": 900, "content_type": "video/mp4", "size_bytes": 48213504}'
Response
{
  "url": "https://<storage-host>/<object>?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=900&X-Amz-Signature=…",
  "expires_at": "2026-10-17T13:19:44Z",
  "method": "PUT"
}

GET/api/v1/store/public/{project_id}/{bucket_name}/{object_path}

A file in a public bucket, by its permanent URL — no key needed.

Query options: download (an attachment; a value names the file) and the image transform options width, height, resize, quality, format (plans with image transforms; otherwise 403 PLAN_IMAGE_TRANSFORMS_REQUIRED). A file uploaded with cacheControl is served with that Cache-Control.

Who
Anyone: no key or session is needed.
Also at
/storage/v1/public/{project_id}/{bucket_name}/{object_path}

Path parameters

project_idstringrequired
The project id.
bucket_namestringrequired
The bucket.
object_pathstringrequired
The file's path in the bucket, e.g. <user-id>/photo.png (URL-encode each segment).

Query parameters

downloadstring | nulloptional
0–255 characters
widthinteger | nulloptional
1–2500
heightinteger | nulloptional
1–2500
resizestring | nulloptional
0–16 characters
qualityinteger | nulloptional
20–100
formatstring | nulloptional
0–16 characters

Responses

  • 200The file's bytes.
  • 403Bucket is private (or the project holds PHI).
  • 404No such bucket or file.
curl -s "$URL/api/v1/store/public/<project-id>/product-images/shoes/runner-01.webp" \
  -H "apikey: $ANON_KEY"

GET/api/v1/store/render/image/{bucket}/{path}

A resized or re-encoded image (supabase's render/image): width, height, resize, quality, format.

Needs READ on the file and a plan with image transforms. Sovaria resizes it itself (JPEG, PNG, WebP, GIF first frame, AVIF; up to 25 MB and 50 megapixels, checked before decoding — bigger is 413, anything else 422), never past the source size, and caches the result (ETag, 304). Without any option the stored file is returned as it is. Limits are platform settings staff change in Control Center.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/render/image/{bucket}/{path}

Path parameters

bucketstringrequired
The bucket.
pathstringrequired
The image's path.

Query parameters

widthinteger | nulloptional
1–4096 pixels.
1–2500
heightinteger | nulloptional
1–4096 pixels.
1–2500
resizestring | nulloptional
0–16 characters
qualityinteger | nulloptional
1–100.
20–100
formatstring | nulloptional
webp, avif, png, jpg, jpeg or gif.
0–16 characters

Responses

  • 200The image (today: the original).
  • 401No valid session or key.
curl -s "$URL/api/v1/store/render/image/avatars/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/photo.png?width=256&format=webp" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/store/render/sign/{bucket}/{path}

A signed link to a resized image (createSignedUrl with transform).

Needs READ on the file and a plan with image transforms. The options are signed into the link, so it can't be re-sized to something else; the transformed image is made by Sovaria (Pillow) from JPEG, PNG, WebP, GIF or AVIF sources up to 25 MB and 50 megapixels, and cached. download serves it as an attachment (named when a string).

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/render/sign/{bucket}/{path}

Path parameters

bucketstringrequired
The bucket.
pathstringrequired
The image's path.

Body

expires_ininteger | nulloptional
Seconds the link works (default from the project's signed-URL setting).
1.0–604800.0
transformobjectrequired
width, height (1–2500), resize (cover, contain, fill), quality (20–100), format (origin, webp, avif, png, jpeg).
5 fields
widthinteger | nulloptional
1.0–2500.0
heightinteger | nulloptional
1.0–2500.0
resizestring | nulloptional
0–16 characters
qualityinteger | nulloptional
20.0–100.0
formatstring | nulloptional
0–16 characters
downloadboolean | string | nulloptional
true or a file name: download instead of showing.

Returns

urlstringrequired
expires_atstringrequired
methodstringrequired

Responses

  • 200Success.
  • 400No transform option, or one out of range.
  • 403The plan has no image transforms (PLAN_IMAGE_TRANSFORMS_REQUIRED), or no rule allows reading.
  • 404No such bucket or file.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/store/render/sign/avatars/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/me.png" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"expires_in": 3600, "transform": {"width": 128, "height": 128, "format": "webp"}}'
Response
{
  "url": "https://<project-ref>.sovarias.in/api/v1/store/signed/eyJ…",
  "expires_at": "2026-10-31T10:00:00+00:00",
  "method": "GET"
}

#Resumable uploads

POST/api/v1/store/resumable/{bucket}/{path}

Start a resumable upload (for large files or unreliable networks).

Answers 201 with Location: /api/v1/store/resumable/<upload-id>, Upload-Offset: 0 and Tus-Resumable: 1.0.0 — no body. Then send chunks with PATCH.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/resumable/{bucket}/{path}

Path parameters

bucketstringrequired
The bucket.
pathstringrequired
The file's path.

Headers

Upload-Lengthintegeroptional
Total size in bytes, checked against the bucket's and plan's limits up front.

Responses

  • 201Started: Location and Upload-Offset headers.
  • 403Storage access denied — no bucket rule allows this action for the caller (Access, links and delivery).
  • 404No such bucket.
  • 413Upload-Length is over the limit.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/store/resumable/videos/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/clip.mp4" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Upload-Length: 734003200"

PATCH/api/v1/store/resumable/{upload_id}

Send the next chunk of a resumable upload.

Body: the raw bytes (Content-Type: application/offset+octet-stream). Upload-Offset must equal the bytes received so far, so a chunk can't be applied twice. On the last chunk add X-Upload-Complete: 1: the file then appears in the bucket.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/resumable/{upload_id}

Path parameters

upload_idstringrequired
From the Location header.

Headers

Upload-Offsetintegerrequired
Where this chunk starts.
X-Upload-Completestringoptional
1 on the final chunk.

Responses

  • 204Stored: Upload-Offset is the new total.
  • 400Upload-Offset header required.
  • 404No such upload (or it expired).
  • 409Offset mismatch — HEAD the upload and resume from its offset.
  • 413Over the bucket's file size limit.
  • 401No valid session or key.
curl -s -X PATCH "$URL/api/v1/store/resumable/up_7f2c…" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Upload-Offset: 0" \
  -H "Content-Type: application/offset+octet-stream"

HEAD /api/v1/store/resumable/{upload_id}

How much of a resumable upload has arrived (Upload-Offset).

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/resumable/{upload_id}

Path parameters

upload_idstringrequired
From the Location header.

Responses

  • 200No body; Upload-Offset is the bytes received.
  • 404No such upload.
  • 401No valid session or key.
curl -s -X HEAD "$URL/api/v1/store/resumable/up_7f2c…" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

#Buckets

GET/api/v1/store/buckets

The project's buckets with file counts and sizes.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/buckets

Returns

idstring (uuid)
namestring
publicboolean
Anyone can download its files by public URL.
file_size_limitinteger
Largest file, in bytes.
allowed_mime_typesarray<string> | null
Accepted content types (image/* patterns), or null for any.
created_at, updated_atstring
ISO 8601.
size_bytesinteger
Total size of its files.
object_countinteger
How many files.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/store/buckets" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
[
  {
    "id": "1d0b7c52-5a0e-4c3a-8f7e-2b6d9a1c4e33",
    "name": "avatars",
    "public": false,
    "file_size_limit": 5242880,
    "allowed_mime_types": [
      "image/*"
    ],
    "created_at": "2026-10-02T09:14:07Z",
    "updated_at": "2026-10-02T09:14:07Z",
    "size_bytes": 182934211,
    "object_count": 3120
  }
]

POST/api/v1/store/buckets

Create a bucket.

Administration: app users need the admin app role, whatever the file rules say. A new bucket has no file rules — only the public flag decides until you add some (Access, links and delivery).

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/buckets

Body

namestringrequired
Lower-case letters, digits, ., _, -; starts with a letter or digit.
1–128 characters, pattern `^[a-z0-9][a-z0-9._-]*$`
publicbooleanoptionaldefault false
Files can be downloaded by public URL without a key.
public_listbooleanoptionaldefault false
file_size_limitintegeroptionaldefault 52428800
Largest file in bytes (default 50 MB), up to your plan's.
1.0–…
allowed_mime_typesarray<string>optional
Accepted content types, e.g. ["image/*", "application/pdf"].

Returns

idstring (uuid)
namestring
publicboolean
Anyone can download its files by public URL.
file_size_limitinteger
Largest file, in bytes.
allowed_mime_typesarray<string> | null
Accepted content types (image/* patterns), or null for any.
created_at, updated_atstring
ISO 8601.

Responses

  • 201Created.
  • 400A content-type pattern is invalid.
  • 403Not an admin, or PHI_PUBLIC_BUCKET_DISABLED (public bucket in a HIPAA project), or the plan's bucket limit.
  • 409A bucket with that name exists.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/store/buckets" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"name": "avatars", "public": false, "file_size_limit": 5242880, "allowed_mime_types": ["image/*"]}'
Response
{
  "id": "1d0b7c52-5a0e-4c3a-8f7e-2b6d9a1c4e33",
  "name": "avatars",
  "public": false,
  "file_size_limit": 5242880,
  "allowed_mime_types": [
    "image/*"
  ],
  "created_at": "2026-10-02T09:14:07Z",
  "updated_at": "2026-10-02T09:14:07Z"
}

GET/api/v1/store/buckets/{bucket_name}

One bucket's settings, file count and size.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/buckets/{bucket_name}

Path parameters

bucket_namestringrequired
The bucket.

Responses

  • 200Success.
  • 404No such bucket.
  • 401No valid session or key.
curl -s "$URL/api/v1/store/buckets/<bucket_name>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "id": "1d0b7c52-5a0e-4c3a-8f7e-2b6d9a1c4e33",
  "name": "avatars",
  "public": false,
  "file_size_limit": 5242880,
  "allowed_mime_types": [
    "image/*"
  ],
  "created_at": "2026-10-02T09:14:07Z",
  "updated_at": "2026-10-02T09:14:07Z",
  "object_count": 3120,
  "size_bytes": 182934211
}

PATCH/api/v1/store/buckets/{bucket_name}

Change a bucket: public or private, largest file, allowed types.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/buckets/{bucket_name}

Path parameters

bucket_namestringrequired
The bucket.

Body

publicboolean | nulloptional
Public or private.
public_listboolean | nulloptional
file_size_limitinteger | nulloptional
Largest file in bytes.
1.0–…
allowed_mime_typesarray<string> | nulloptional
Accepted content types; null for any.

Responses

  • 200Success.
  • 403Not an admin, or a public bucket in a HIPAA project.
  • 404No such bucket.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PATCH "$URL/api/v1/store/buckets/<bucket_name>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"public": true}'
Response
{
  "id": "1d0b7c52-5a0e-4c3a-8f7e-2b6d9a1c4e33",
  "name": "avatars",
  "public": true,
  "file_size_limit": 5242880,
  "allowed_mime_types": [
    "image/*"
  ],
  "created_at": "2026-10-02T09:14:07Z",
  "updated_at": "2026-10-17T13:20:00Z"
}

DELETE/api/v1/store/buckets/{bucket_name}

Delete a bucket and every file in it.

Permanent.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/buckets/{bucket_name}

Path parameters

bucket_namestringrequired
The bucket.

Responses

  • 200Success.
  • 403Not an admin.
  • 404No such bucket.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/store/buckets/<bucket_name>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "status": "deleted",
  "bucket": "avatars"
}

POST/api/v1/store/buckets/{bucket_name}/empty

Delete every file in a bucket and keep the bucket (supabase's emptyBucket).

Project administration, like deleting the bucket: app users need the project's admin app role. Up to 1,000 files per call; has_more says to call again (the SDKs repeat it until the bucket is empty). Deleted files can't be brought back.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/storage/v1/buckets/{bucket_name}/empty

Path parameters

bucket_namestringrequired
The bucket.

Responses

  • 200Success.
  • 403Not a project admin, or no bucket rule allows DELETE.
  • 404No such bucket.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/store/buckets/scratch/empty" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "status": "emptied",
  "bucket": "scratch",
  "deleted": 1000,
  "has_more": true
}

#S3 access keys

GET/api/v1/store/s3/info

The S3-compatible endpoint and the project's S3 access keys.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Returns

endpointstring
Use as the S3 endpoint URL.
regionstring
auto.
force_path_styleboolean
Path-style addressing (<endpoint>/<bucket>/<key>).
availableboolean
Whether your plan includes the S3 protocol.
keysarray<object>
Existing keys (never the secret).
max_keysinteger

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/store/s3/info" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "endpoint": "https://api.sovaria.in/storage/v1/s3",
  "region": "auto",
  "force_path_style": true,
  "available": true,
  "keys": [
    {
      "access_key_id": "SOVA1EXAMPLE7Q2K",
      "name": "rclone backup",
      "created_at": "2026-10-10T08:00:00Z"
    }
  ],
  "max_keys": 20
}

POST/api/v1/store/s3/keys

Create an S3 access key (the secret is shown once).

S3 keys have full access to the project's buckets and bypass storage rules, like a service key — servers and tools only (S3-compatible storage access).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Body

namestringoptionaldefault S3 key
A label.
1–80 characters

Responses

  • 201Created.
  • 403Not an organization owner or admin, or the plan doesn't include the S3 protocol (PLAN_FEATURE_REQUIRED).
  • 409The project already has 20 S3 keys.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/store/s3/keys" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"name": "rclone backup"}'
Response
{
  "access_key_id": "SOVA1EXAMPLE7Q2K",
  "name": "rclone backup",
  "created_at": "2026-10-17T13:25:00Z",
  "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "endpoint": "https://api.sovaria.in/storage/v1/s3",
  "region": "auto"
}

DELETE/api/v1/store/s3/keys/{access_key_id}

Revoke an S3 access key.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

access_key_idstringrequired
The key's id.

Responses

  • 204Success, with no body.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/store/s3/keys/<access_key_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/store/signed/{token}

Download through a Sovaria-signed link (image transforms, and files Sovaria serves itself).

Signed image-transform links always use this route. For plain files, most signed URLs point at the storage provider directly; this route serves the ones Sovaria signs and serves itself.

Who
Anyone: no key or session is needed.
Also at
/storage/v1/signed/{token}

Path parameters

tokenstringrequired
From the signed URL.

Responses

  • 200The file's bytes.
curl -s "$URL/api/v1/store/signed/<token>" \
  -H "apikey: $ANON_KEY"

PUT/api/v1/store/signed/{token}

Upload through a Sovaria-signed upload link.

Sovaria gives one instead of a storage-provider link when the upload's size isn't declared, your organization uses its own encryption key, or the storage can't bind a link to a size; Sovaria then checks the size limit and quota.

Who
Anyone: no key or session is needed.
Also at
/storage/v1/signed/{token}

Path parameters

tokenstringrequired
From the signed URL.

Body (multipart/form-data)

filestring | nulloptional

Responses

  • 201Created.
  • 400Not used with cloud storage.
  • 405The URL was signed for downloads.
  • 413Over the size limit.
  • 415Content type not allowed.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/store/signed/<token>" \
  -H "apikey: $ANON_KEY"
Response
{
  "bucket": "avatars",
  "path": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/photo.png",
  "size": 48213,
  "content_type": "image/png",
  "checksum": "9e107d9d372bb6826bd81d3542a419d6",
  "created_at": "2026-10-17T13:02:44Z",
  "updated_at": "2026-10-17T13:02:44Z"
}