Skip to content

Set poster image

PUT
/wp-json/wp2/media-converter/v1/attachments/{id}/thumbnails/poster
curl --request PUT \
--url https://example.com/wp-json/wp2/media-converter/v1/attachments/1/thumbnails/poster \
--header 'Content-Type: application/json' \
--header 'X-WP-Nonce: <X-WP-Nonce>' \
--data '{ "attachment_id": 1, "url": "example", "set_featured": true }'

Sets the player poster file (image upload, not an auto-extracted frame).

id
required
integer

Numeric entity id.

object
attachment_id

Media library attachment ID.

integer
url

URL.

string format: uri
set_featured

Set the uploaded file as the post thumbnail.

boolean
Example
{
"attachment_id": 1,
"url": "example",
"set_featured": true
}
Media typeapplication/json
object
attachment_id

Media library attachment ID.

integer
poster

Current attachment poster.

object
attachment_id

Poster attachment ID, or null.

integer
nullable
url

Poster URL, or null.

string
nullable
featured_id

Field “featured_id” as returned or accepted by PHP.

integer
nullable
thumbnails

Generated child thumbnails.

Array<object>
object
attachment_id

Thumbnail attachment ID.

integer
url

Thumbnail URL.

string
Examplegenerated
{
"attachment_id": 1,
"poster": {
"attachment_id": 1,
"url": "example"
},
"featured_id": 1,
"thumbnails": [
{
"attachment_id": 1,
"url": "example"
}
]
}

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": {}
}