Skip to main content
POST
Create or resume a TUS upload session

Authorizations

payload-token
string
cookie
required

Payload authentication cookie. These endpoints run Payload access control; an authenticated admin session is required.

Body

application/json
collection
string
required

Target upload collection.

filename
string
required

Original file name.

filesize
number
required

File size in bytes.

filetype
string
required

File MIME type.

head
string

Base64 of the first bytes of the file (at most 8192 characters). When sent, the response includes a filename and a signedReceipt for a client-direct upload.

title
string

Video title. Required when creating a new video.

videoId
string

Existing Bunny video GUID, to resume an upload. Used only with a matching videoToken.

videoToken
string

The videoToken returned with videoId.

Response

TUS authorization for a new/resumed upload, or an uploaded short-circuit when the video is already processed.

authorizationExpire
number

Signature expiry as a UNIX timestamp (seconds).

authorizationSignature
string

SHA-256 TUS authorization signature.

filename
string

Returned when the request includes head. Unique sanitized file name the signedReceipt is bound to; submit the file under this name.

libraryId
number

Bunny Stream library the video lives in.

signedReceipt
string

Returned when the request includes head. Send it as uploadReference.signedReceipt of the file submitted with the Payload document.

thumbnailTime
number

Thumbnail capture time (ms), when configured.

type
enum<string>

upload returns a signature to proceed; uploaded means the video already exists.

Available options:
upload,
uploaded
videoId
string

Bunny video GUID.

videoToken
string

Token bound to videoId and the signed-in user, valid for 24 hours. Send it as bunnyData.stream.videoToken when saving the document, and with videoId to resume.