Create an upload session
https://vod-uploads-middleware-api.livepush.io/uploads/new
Base URL https://vod-uploads-middleware-api.livepush.io — Livepush Video Upload Middleware
Opens a one-time upload session for one file. The request body is the response from Create a video upload URL, sent unchanged. The response's uploadUrl is where the file goes next, with Upload a file to a session.
Sessions expire after 24 hours and accept a single upload attempt.
This host authenticates the same bearer token as the rest of the API; the token must belong to the account the upload URL was created for. See the Uploading videos guide.
Authorization
Send a valid access token in the Authorization header.
bearerAuth— Bearer token (JWT)
Authorization: Bearer YOUR_API_TOKEN
Try it
Loading the request builder…
POST
https://vod-uploads-middleware-api.livepush.io/uploads/new
— This call changes live data on your account.
Request body
-
idstringVideo id allocated for this upload. -
KeystringObject key the file will be written to. -
uploadUrlstringStorage endpoint the upload middleware writes to. Do not upload to it yourself. -
uploadTypestringHow storage expects the file. The upload middleware handles every type, so clients do not need to branch on it.directformdatamultipart -
uploadCredentialsVideoUploadCredentialsVendor-specific credentials the client needs to perform the upload. The shape depends onuploadType: multipart uploads receive pool and chunking parameters,formdatauploads receive the signed form fields, anddirectuploads receive nothing. The upload middleware consumes these; clients pass them through unchanged.-
bucketNamestring -
regionstring -
poolIdstringIdentity pool used to authorise the multipart upload. -
concurrencyintegerHow many parts the client should upload in parallel. -
chunkSizeintegerPart size in bytes. -
keyPrefixstring -
useAccelerateEndpointboolean
-
-
zonestringStorage zone the object is being written to.
{
"id": "Xk2fP9qLm",
"Key": "nsAbC123xY_/Xk2fP9qLm.mp4",
"uploadUrl": "https://s3.fr-par.scw.cloud/pre-recorded-live-10",
"uploadType": "formdata",
"uploadCredentials": {
"key": "nsAbC123xY_/Xk2fP9qLm.mp4",
"acl": "public-read",
"X-Amz-Credential": "…",
"X-Amz-Algorithm": "AWS4-HMAC-SHA256",
"X-Amz-Date": "20261202T093242Z",
"Policy": "…",
"X-Amz-Signature": "…",
"success_action_status": "204",
"x-amz-meta-uuid": "…"
},
"zone": "zn_35hk0gxy_pr"
}
Code samples
curl -X POST 'https://vod-uploads-middleware-api.livepush.io/uploads/new' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"id": "Xk2fP9qLm",
"Key": "nsAbC123xY_/Xk2fP9qLm.mp4",
"uploadUrl": "https://s3.fr-par.scw.cloud/pre-recorded-live-10",
"uploadType": "formdata",
"uploadCredentials": {
"key": "nsAbC123xY_/Xk2fP9qLm.mp4",
"acl": "public-read",
"X-Amz-Credential": "…",
"X-Amz-Algorithm": "AWS4-HMAC-SHA256",
"X-Amz-Date": "20261202T093242Z",
"Policy": "…",
"X-Amz-Signature": "…",
"success_action_status": "204",
"x-amz-meta-uuid": "…"
},
"zone": "zn_35hk0gxy_pr"
}'
const response = await fetch('https://vod-uploads-middleware-api.livepush.io/uploads/new', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": "Xk2fP9qLm",
"Key": "nsAbC123xY_/Xk2fP9qLm.mp4",
"uploadUrl": "https://s3.fr-par.scw.cloud/pre-recorded-live-10",
"uploadType": "formdata",
"uploadCredentials": {
"key": "nsAbC123xY_/Xk2fP9qLm.mp4",
"acl": "public-read",
"X-Amz-Credential": "…",
"X-Amz-Algorithm": "AWS4-HMAC-SHA256",
"X-Amz-Date": "20261202T093242Z",
"Policy": "…",
"X-Amz-Signature": "…",
"success_action_status": "204",
"x-amz-meta-uuid": "…"
},
"zone": "zn_35hk0gxy_pr"
}),
});
if (!response.ok) {
throw new Error(`Livepush API error ${response.status}`);
}
const data = await response.json();
import requests
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
}
payload = {
"id": "Xk2fP9qLm",
"Key": "nsAbC123xY_/Xk2fP9qLm.mp4",
"uploadUrl": "https://s3.fr-par.scw.cloud/pre-recorded-live-10",
"uploadType": "formdata",
"uploadCredentials": {
"key": "nsAbC123xY_/Xk2fP9qLm.mp4",
"acl": "public-read",
"X-Amz-Credential": "…",
"X-Amz-Algorithm": "AWS4-HMAC-SHA256",
"X-Amz-Date": "20261202T093242Z",
"Policy": "…",
"X-Amz-Signature": "…",
"success_action_status": "204",
"x-amz-meta-uuid": "…"
},
"zone": "zn_35hk0gxy_pr"
}
response = requests.post('https://vod-uploads-middleware-api.livepush.io/uploads/new', headers=headers, json=payload, timeout=30)
response.raise_for_status()
data = response.json()
Responses
Session created.
-
uploadUrlstringWhere to send the file, withPUTand your bearer token. Accepts exactly one upload attempt; create a new session to retry.
{
"uploadUrl": "https://vod-uploads-middleware-api.livepush.io/uploads/Qe8rT2pZx"
}
Missing or invalid bearer token.
{
"error": "unauthorized"
}
The session could not be stored. Safe to retry.
{
"error": "could not create upload session"
}