Delete track by index
DELETE
/wp-json/wp2/media-subtitles-timecodes/v1/attachments/{id}/tracks/{index}
const url = 'https://example.com/wp-json/wp2/media-subtitles-timecodes/v1/attachments/1/tracks/1';const options = {method: 'DELETE', headers: {'X-WP-Nonce': '<X-WP-Nonce>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/wp-json/wp2/media-subtitles-timecodes/v1/attachments/1/tracks/1 \ --header 'X-WP-Nonce: <X-WP-Nonce>'Deletes the track at the given index. Remaining track indexes then shift.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Numeric entity id.
index
required
integer
Track index in the list.
Responses
Section titled “Responses”Track deleted.
Media typeapplication/json
object
deleted
True if the entity was removed (queue entry or track).
boolean
Examplegenerated
{ "deleted": true}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": {}}