Create an asset draft
POST
/v1/assets
const url = 'https://api.wirevod.online/v1/assets';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"title":"Launch keynote","drm":false}'};
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.wirevod.online/v1/assets \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "Launch keynote", "drm": false }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
title
string
drm
Enables content protection for this asset. Fixed at creation.
boolean
Example
{ "title": "Launch keynote", "drm": false}Responses
Section titled “ Responses ”Draft created.
Media typeapplication/json
object
asset
required
object
id
required
string
title
required
string
status
required
string
failure_code
required
string | null
source_width
required
integer | null
source_height
required
integer | null
source_fps
required
number | null
source_codec
required
string | null
source_duration_ms
required
integer | null
source_bitrate_kbps
required
integer | null
origin_size_bytes
required
integer | null
checksum_sha256
required
string | null
drm_enabled
required
boolean
visibility
required
string
published_at
required
integer | null
created_at
required
integer
Example
{ "asset": { "id": "ast_01J9Z", "title": "Launch keynote", "status": "pending", "failure_code": null, "source_width": null, "source_height": null, "source_fps": null, "source_codec": null, "source_duration_ms": null, "source_bitrate_kbps": null, "origin_size_bytes": null, "checksum_sha256": null, "drm_enabled": false, "visibility": "private", "published_at": null, "created_at": 1760000000000 }}The request was malformed or failed validation.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "invalid_request", "code": "invalid_request", "message": "asset_id is required"}Missing or invalid credentials.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "unauthorized", "code": "unauthorized", "message": "Authentication required"}The principal lacks the required scope or role.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "forbidden", "code": "forbidden", "message": "Missing required scope: write"}Too many requests in the current window.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "rate_limited", "code": "rate_limited", "message": "Too many requests", "details": { "retry_after": 60 }}Headers
Section titled “Headers”Retry-After
integer
Seconds to wait before retrying.