BevylDevelopers

Prepare an upload

POST
/api/partner/v1/videos/upload/prepare

Reserves an upload and returns a signed URL to PUT the file to.

Authorization

partnerApiKey
headerAuthorizationBearer <token>

Send as Authorization: Bearer bvl_….

Request Body

application/json
  1. body
workspaceId*string

Your ID for the customer workspace.

Length1 <= length
filename*string

Original file name.

Length1 <= length
fileSize*integer

File size in bytes, up to 5 GB.

Range0 < value <= 5000000000
contentType?|

Video MIME type, such as video/mp4.

Response Body

Success.

application/json
  1. response
ok*boolean
uploadId*string

The upload, from prepareVideoUpload.

Formatuuid
expiresAt*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
upload*
next*string
Length1 <= length
curl -X POST 'https://www.bevyl.ai/api/partner/v1/videos/upload/prepare' \  -H 'Content-Type: application/json' \  -d '{  "workspaceId": "customer-123",  "filename": "kitchen-broll.mp4",  "fileSize": 48000000}'
{  "ok": true,  "uploadId": "ef523ba8-509e-47af-8e2c-5fa751596497",  "expiresAt": "2019-08-24T14:15:22Z",  "upload": {    "method": "PUT",    "url": "http://example.com",    "headers": {      "property1": "string",      "property2": "string"    }  },  "next": "string"}