Skip to content

createUploadSession

POST
/api/v1/uploads
curl --request POST \
--url https://example.com/api/v1/uploads \
--header 'Content-Type: application/json' \
--data '{ "filename": "example", "mimeType": "example", "sizeBytes": 1, "folderId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Create upload session. Requires an authenticated dashboard user.

X-CSRF-Token
string

Cookie-backed browser requests only, and only on unsafe methods. Bearer grants never send it.

Media typeapplication/json
object
filename
required
string
>= 1 characters <= 255 characters
mimeType
required
string
sizeBytes
required
integer format: int64
>= 1
folderId

Folder the asset is created in. Omitted or null is the library root, which only an account with access to the whole library may use; an account with restricted content access must name one of its folders. The server authorizes the folder now and again when the upload completes.

string | null format: uuid
Examplegenerated
{
"filename": "example",
"mimeType": "example",
"sizeBytes": 1,
"folderId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Resumable upload session created

Media typeapplication/json
object
data
required
object
id
required
string format: uuid
filename
required
string
mimeType
required
string
sizeBytes
required
integer format: int64
offset
required
integer format: int64
status
required
string
Allowed values: pending uploading finalizing finalized failed expired cancelled
expiresAt
required
string format: date-time
assetId
string format: uuid
uploadEndpoint
required
string
maximumSizeBytes
required
integer format: int64
folderId

Destination folder; absent for the library root.

string format: uuid
Example
{
"data": {
"status": "pending"
}
}

The role cannot upload media

Destination folder not found or outside the caller’s access

Upload exceeds the configured maximum

A folder is required for an account with restricted content access

Reserved free storage would be violated