Skip to content

Upload a zip pack of playback artifacts bound to attachment id

POST
/wp-json/wp2/media-converter/v1/attachments/{id}/artifacts/pack
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=replace

Accepts 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.

id
required
integer

Numeric entity id.

Media typemultipart/form-data
object
pack
required

Playback-artifacts ZIP payload.

string format: binary
mode

Mode (connection, replace, or pack).

string
default: replace
Allowed values: replace merge

Listing after pack, plus accepted/rejected/mode/touched.

Media typeapplication/json
object
attachment_id

Video attachment ID.

integer
basename

Movie basename without extension.

string
sources

Files in the sources folder (HLS/MP4, etc.).

Array<object>
object
name

File name relative to the artifacts folder.

string
url

Public file URL.

string
bytes

File size in bytes.

integer
subtitles

Subtitle files on disk.

Array<object>
object
name

File name relative to the artifacts folder.

string
url

Public file URL.

string
bytes

File size in bytes.

integer
chapters

Chapter files on disk.

Array<object>
object
name

File name relative to the artifacts folder.

string
url

Public file URL.

string
bytes

File size in bytes.

integer
thumbnails

Seekbar sprite/VTT files.

Array<object>
object
name

File name relative to the artifacts folder.

string
url

Public file URL.

string
bytes

File size in bytes.

integer
stills

Still frames (*_thumbN.jpg).

Array<object>
object
name

File name relative to the artifacts folder.

string
url

Public file URL.

string
bytes

File size in bytes.

integer
formats

Map of format key → exists/url.

object
key
additional properties
object
exists

True if this format file already exists on disk.

boolean
url

Format file URL, or an empty string.

string
poster

Poster URL from attachment meta (may be empty).

string
accepted

Files PHP stored.

Array<object>
object
path

Relative path in the request or ZIP.

string
reason

Rejection code (rejected items) or reason.

string
message

File-save error message.

string
name

Accepted file name.

string
url

Accepted file URL.

string
rejected

Files PHP rejected (name, size, HLS limit).

Array<object>
object
path

Relative path in the request or ZIP.

string
reason

Rejection code (rejected items) or reason.

string
message

File-save error message.

string
name

Accepted file name.

string
url

Accepted file URL.

string
mode

ZIP pack mode (pack only).

string
Allowed values: replace merge
touched

Folders the pack actually changed.

Array<string>
Example
{
"mode": "replace"
}

Invalid zip / naming / oversized segment

Media typeapplication/json
object
code

Machine-readable error or event code.

string
message

Message text (log, PIN, or password reset).

string
data

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.

Media typeapplication/json
object
code

Machine-readable error or event code.

string
message

Message text (log, PIN, or password reset).

string
data

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.

Media typeapplication/json
object
code

Machine-readable error or event code.

string
message

Message text (log, PIN, or password reset).

string
data

Extra WP_Error or license payload.

object
Examplegenerated
{
"code": "example",
"message": "example",
"data": {}
}