REST API

Authentication, request and response formats, paging, and every endpoint of the storage REST API.

The Storage API manages a project’s buckets and files. Send every request to https://storage-api.digitospace.com. The paths below are relative to it.

Authentication

Send an API key with Storage permissions as a bearer token on every request:

Authorization: Bearer dsk_…

A missing, unknown, or expired key gets 401 with the code unauthenticated. See API keys.

Requests and responses

  • Request bodies are JSON, sent with Content-Type: application/json, and at most 1 MB. File contents never go in a request to the API. See Uploads.
  • Times are RFC 3339 in UTC, such as 2026-09-26T10:15:00Z.
  • Sizes are whole bytes.
  • {bucket} in a path is the bucket’s name or its ID.
  • {key} is the file’s key. Encode each part of it for a URL, and keep the slashes, such as 2026/Dar%20es%20Salaam/report.pdf.

Every successful response wraps its result in data, with details about the request in meta:

{
  "data": { "id": "01m3c081d2wj4g63qcr53pa1yh", "name": "invoices" },
  "meta": { "requestId": "01m3c081dbf3j55x7hsa7wc1yj" }
}

Every failure is a problem document with a stable code. See Errors.

Paging

Buckets come in pages of 50, or up to 200 with limit. Files come in pages of 100, or up to 1,000 with limit.

For the next page, pass meta.page.nextCursor from the last response as cursor. It is null on the last page.

GET /v1/projects/{project}/buckets/{bucket}/objects?limit=500&cursor=…

Endpoints

MethodPathDoes
GET/v1/projects/{project}/usageRead the project’s storage use
GET/v1/projects/{project}/metricsRead storage, requests and files served over time
GET/v1/projects/{project}/bucketsList buckets
POST/v1/projects/{project}/bucketsCreate a bucket
GET/v1/projects/{project}/buckets/{bucket}Read a bucket
PATCH/v1/projects/{project}/buckets/{bucket}Rename it, or make it public or private
DELETE/v1/projects/{project}/buckets/{bucket}Delete a bucket
GET/v1/projects/{project}/buckets/{bucket}/webhookRead the bucket’s webhook
PUT/v1/projects/{project}/buckets/{bucket}/webhookAdd or change the webhook
POST/v1/projects/{project}/buckets/{bucket}/webhook/secretMake a new signing secret
DELETE/v1/projects/{project}/buckets/{bucket}/webhookRemove the webhook
GET/v1/projects/{project}/buckets/{bucket}/presetsList image presets
PUT/v1/projects/{project}/buckets/{bucket}/presets/{name}Add or change a preset
DELETE/v1/projects/{project}/buckets/{bucket}/presets/{name}Delete a preset
GET/v1/projects/{project}/buckets/{bucket}/objectsList files and folders
GET/v1/projects/{project}/buckets/{bucket}/objects/{key}Read a file’s details
DELETE/v1/projects/{project}/buckets/{bucket}/objects/{key}Delete a file
POST/v1/projects/{project}/buckets/{bucket}/downloadsGet a download link
POST/v1/projects/{project}/buckets/{bucket}/copiesCopy a file
POST/v1/projects/{project}/buckets/{bucket}/foldersCreate a folder
DELETE/v1/projects/{project}/buckets/{bucket}/folders/{path}Delete an empty folder
POST/v1/projects/{project}/buckets/{bucket}/uploadsStart an upload
POST/v1/projects/{project}/buckets/{bucket}/uploads/{upload}/completeFinish an upload
DELETE/v1/projects/{project}/buckets/{bucket}/uploads/{upload}Cancel an upload

Last updated