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 clientUploadContext 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.

clientUploadContext
object

Returned when the request includes head. Send it unchanged as the clientUploadContext of the Payload upload.

libraryId
number

Bunny Stream library the video lives in.

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.