Upload a zip pack of playback artifacts bound to attachment id
const url = 'https://example.com/wp-json/wp2/media-converter/v1/attachments/1/artifacts/pack';const form = new FormData();form.append('pack', 'file');form.append('mode', 'replace');
const options = {method: 'POST', headers: {'X-WP-Nonce': '<X-WP-Nonce>'}};
options.body = form;
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://example.com/wp-json/wp2/media-converter/v1/attachments/1/artifacts/pack \ --header 'Content-Type: multipart/form-data' \ --header 'X-WP-Nonce: <X-WP-Nonce>' \ --form pack=@file \ --form mode=replaceAccepts a ZIP of artifact trees (roots sources/, subtitles/, chapters/, thumbnails/, plus *_thumbN.jpg stills at zip root). mode=replace replaces folders; merge adds files. HLS .ts segments over the size limit appear in rejected.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Numeric entity id.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Playback-artifacts ZIP payload.
Mode (connection, replace, or pack).
Responses
Section titled “Responses”Listing after pack, plus accepted/rejected/mode/touched.
object
Video attachment ID.
Movie basename without extension.
Files in the sources folder (HLS/MP4, etc.).
object
File name relative to the artifacts folder.
Public file URL.
File size in bytes.
Subtitle files on disk.
object
File name relative to the artifacts folder.
Public file URL.
File size in bytes.
Chapter files on disk.
object
File name relative to the artifacts folder.
Public file URL.
File size in bytes.
Seekbar sprite/VTT files.
object
File name relative to the artifacts folder.
Public file URL.
File size in bytes.
Still frames (*_thumbN.jpg).
object
File name relative to the artifacts folder.
Public file URL.
File size in bytes.
Map of format key → exists/url.
object
object
True if this format file already exists on disk.
Format file URL, or an empty string.
Poster URL from attachment meta (may be empty).
Files PHP stored.
object
Relative path in the request or ZIP.
Rejection code (rejected items) or reason.
File-save error message.
Accepted file name.
Accepted file URL.
Files PHP rejected (name, size, HLS limit).
object
Relative path in the request or ZIP.
Rejection code (rejected items) or reason.
File-save error message.
Accepted file name.
Accepted file URL.
ZIP pack mode (pack only).
Folders the pack actually changed.
Example
{ "mode": "replace"}Invalid zip / naming / oversized segment
object
Machine-readable error or event code.
Message text (log, PIN, or password reset).
Extra WP_Error or license payload.
object
Examplegenerated
{ "code": "example", "message": "example", "data": {}}Not authenticated. WordPress REST: rest_not_logged_in / rest_forbidden. Use cookie + X-WP-Nonce or Application Password.
object
Machine-readable error or event code.
Message text (log, PIN, or password reset).
Extra WP_Error or license payload.
object
Examplegenerated
{ "code": "example", "message": "example", "data": {}}Insufficient capability or invalid REST nonce. WordPress REST: rest_forbidden / rest_cookie_invalid_nonce.
object
Machine-readable error or event code.
Message text (log, PIN, or password reset).
Extra WP_Error or license payload.
object
Examplegenerated
{ "code": "example", "message": "example", "data": {}}