Skip to content

place.stream.media.createUpload

Lexicon Version: 1

Type: procedure

Start a resumable upload of arbitrary media content. Returns a TUS upload URL and a short-lived bearer token used to authenticate subsequent chunk requests (no DPoP required on chunks). The DID of the authenticated user is recorded against the upload; on completion a VOD processing task is enqueued.

Parameters: (None defined)

Input:

  • Encoding: application/json
  • Schema:

Schema Type: object

NameTypeReq’dDescriptionConstraints
sizeintegerTotal size of the upload in bytes.
mimeTypestringMIME type of the content being uploaded (e.g. video/mp4).
filenamestringOptional filename hint to attach as upload metadata.

Output:

  • Encoding: application/json
  • Schema:

Schema Type: object

NameTypeReq’dDescriptionConstraints
uploadIdstringServer-side identifier for this upload.
uploadUrlstringAbsolute URL to PATCH/HEAD per the TUS protocol.Format: uri
uploadTokenstringShort-lived bearer token bound to this upload. Send as ‘Authorization: Bearer ’ on TUS requests.
expiresAtstringWhen the upload token expires.Format: datetime

Possible Errors:

  • UploadTooLarge: The requested upload exceeds the server’s maximum allowed size.
  • UnsupportedMimeType: The server does not accept this MIME type for upload.

{
"lexicon": 1,
"id": "place.stream.media.createUpload",
"defs": {
"main": {
"type": "procedure",
"description": "Start a resumable upload of arbitrary media content. Returns a TUS upload URL and a short-lived bearer token used to authenticate subsequent chunk requests (no DPoP required on chunks). The DID of the authenticated user is recorded against the upload; on completion a VOD processing task is enqueued.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["size", "mimeType"],
"properties": {
"size": {
"type": "integer",
"description": "Total size of the upload in bytes."
},
"mimeType": {
"type": "string",
"description": "MIME type of the content being uploaded (e.g. video/mp4)."
},
"filename": {
"type": "string",
"description": "Optional filename hint to attach as upload metadata."
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["uploadUrl", "uploadToken", "expiresAt", "uploadId"],
"properties": {
"uploadId": {
"type": "string",
"description": "Server-side identifier for this upload."
},
"uploadUrl": {
"type": "string",
"format": "uri",
"description": "Absolute URL to PATCH/HEAD per the TUS protocol."
},
"uploadToken": {
"type": "string",
"description": "Short-lived bearer token bound to this upload. Send as 'Authorization: Bearer <token>' on TUS requests."
},
"expiresAt": {
"type": "string",
"format": "datetime",
"description": "When the upload token expires."
}
}
}
},
"errors": [
{
"name": "UploadTooLarge",
"description": "The requested upload exceeds the server's maximum allowed size."
},
{
"name": "UnsupportedMimeType",
"description": "The server does not accept this MIME type for upload."
}
]
}
}
}