Files
List, read, download, copy, and delete the files in a bucket.
The file object
{
"type": "file",
"bucket": "01m3c081d2wj4g63qcr53pa1yh",
"key": "2026/0001.pdf",
"size": 48213,
"contentType": "application/pdf",
"etag": "5d41402abc4b2a76b9719d911017c592",
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"createdAt": "2026-09-26T09:30:00Z",
"updatedAt": "2026-09-26T09:30:00Z"
}typestringfile. In lists, folders havefolder.bucketstringThe ID of the bucket that holds it.
keystringIts name and place in the bucket, up to 1,024 bytes.
sizeintegerIts size in bytes, as stored.
contentTypestringIts media type, from the upload.
application/octet-streamwhen none was given.etagstringChanges whenever the file’s contents change.
publicUrlstringOnly in public buckets. The file’s permanent public address.
sha256stringThe SHA-256 digest sent with the upload, in hexadecimal. Left out when none was sent.
createdAtstringWhen a file was first stored at this key.
updatedAtstringWhen the file at this key was last replaced.
List files
/v1/projects/{project}/buckets/{bucket}/objectsReturns files in key order, a page at a time. Needs Storage files: View and download.
prefixstringOnly keys that start with this, such as
2026/.delimiterstring/to list one folder level. Keys below it are grouped into one entry each, with the size of every file inside it:{ "type": "folder", "prefix": "2026/03/", "size": 48213 }.limitinteger1 to 1,000 entries a page. 100 when you leave it out.
cursorstringmeta.page.nextCursorfrom the previous page.
Read a file
/v1/projects/{project}/buckets/{bucket}/objects/{key}Returns the file object, not its contents. Needs Storage files: View and download.
Get a download link
/v1/projects/{project}/buckets/{bucket}/downloads{ "key": "2026/0001.pdf", "attachment": true }Returns a link to fetch the file with, which works for 15 minutes. Needs Storage files: View and download.
keystringThe file’s key.
attachmentbooleantrueto save the file under its name,falseto let a browser show it.truewhen you leave it out, orfalsewith apreset.presetstringA preset to resize an image to, such as
thumb.
The answer:
{
"method": "GET",
"url": "https://files.digitospace.com/s/…/0001.pdf",
"headers": {},
"expiresAt": "2026-09-26T10:15:00Z"
}Copy a file
/v1/projects/{project}/buckets/{bucket}/copies{ "key": "2026/0001.pdf", "toBucket": "archive", "toKey": "2026/0001.pdf" }Returns 201 with the new file. Needs Storage files: Upload. toBucket is another bucket in the project, by name or ID, and the same bucket when you leave it out. A file already at toKey is replaced. A copy that does not fit in the project’s storage gets 403 with storage_quota_reached.
Delete a file
/v1/projects/{project}/buckets/{bucket}/objects/{key}Returns 204. Needs Storage files: Delete. This cannot be undone.
Create a folder
/v1/projects/{project}/buckets/{bucket}/folders{ "path": "2026/invoices" }Returns 201 with the folder, { "type": "folder", "prefix": "2026/invoices/" }. Needs Storage files: Upload.
Folders also appear on their own when you upload a file into them. Create one to show an empty folder in lists before it holds any files. Creating a folder that already exists returns it again.
Delete a folder
/v1/projects/{project}/buckets/{bucket}/folders/{path}Returns 204, and removes the folder and any empty folders inside it. Needs Storage files: Delete. A folder that still holds files gets 409 with folder_not_empty.
Last updated