SnozeDevelopers
API referenceAssets

Begin a direct multipart upload session

Validates the declared name, MIME type, size, and per-part checksums, checks the workspace storage quota, opens a multipart upload against the object store, and returns the session with one presigned URL per part and an expiry. Requires a workspace member with the `files:write` permission. Refused when the storage backend does not support direct uploads, when the declared metadata or part layout is invalid, or when the workspace is over its storage quota. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.

POST
/v1/workspaces/{workspaceId}/assets/uploads

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

Path Parameters

workspaceId*string

Request Body

application/json
  1. body
name*string
mimeType*string
byteSize*number
partSize*number
parts*array<>
origin?|null

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.snoze.dev/v1/workspaces/string/assets/uploads' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "mimeType": "string",  "byteSize": 0,  "partSize": 0,  "parts": [    {      "partNumber": 0,      "checksumSha256": "string"    }  ]}'
Example Response
{  "data": {    "id": "string",    "expiresAt": "string",    "parts": [      {        "partNumber": 0,        "checksumSha256": "string",        "url": "string"      }    ]  }}