Register a video and return the R2 presigned URL to upload it directly
const url = 'https://api.replifier.com/v1/brands/brd_01hx0000000000000000000000/videos';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"title":"example","fileName":"example","contentType":"video/mp4","sizeBytes":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.replifier.com/v1/brands/brd_01hx0000000000000000000000/videos \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "example", "fileName": "example", "contentType": "video/mp4", "sizeBytes": 1 }'Up to 2 GB and 60 minutes (MP4, MOV, WebM or MKV). The file does NOT go through the API: PUT to upload.url (valid for 15 minutes, without Authorization) and then POST /v1/videos/{video}/complete.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
brd_01hx0000000000000000000000Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”Video registered (status uploading)
Upload the file with a direct PUT to upload.url, with exactly the headers in upload.headers and WITHOUT Authorization. Then call complete.
object
object
uploading (waiting for the PUT to R2), queued, encoding, ready or failed
Actual size measured in R2 when the upload completed
object
M12.4: a lightweight animated preview for email is available
Only in failed: the cause in the language of the request. retryable: false = a retry will not fix it; another file must be uploaded.
object
M12.3: if set, only that contact can watch the video with their link
object
object
Example
{ "video": { "status": "uploading" }, "upload": { "method": "PUT" }}Invalid data
object
object
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
object
object
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
object
object
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
object
object
Example
{ "error": { "code": "not_found" }}Internal error
object
object
Example
{ "error": { "code": "not_found" }}Service temporarily unavailable
object
object
Example
{ "error": { "code": "not_found" }}