POST/video/playlists/{playlist_id}/reorder

Reorder videos in a playlist

Reorders videos in a playlist by moving an asset to a specified position or sorting the playlist by title or creation date. Choose one of the two request formats: asset positioning with page details, or sorting with a field and direction.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 4 body fields
playlist_idstringrequired

The ID of the playlist to reorder.

Provide either the asset-positioning fields or the sorting fields.

asset_idstringrequired

Asset id to move.

asset_positionintegerrequired

Zero-based position inside the provided page.

page_numberintegerrequired

Current playlist page number.

page_sizeintegerrequired

Playlist page size used by the caller.

5 status codes
200Returns a success indicator and an array of asset IDs in the reordered playlist.
asset_listarray<string>optional
successbooleanoptional
Default:true
400Returned when the request is invalid or does not satisfy the required fields and constraints for either reorder format.

One documented failure

  • invalid_parameter_value

    The parameter value is invalid.

errorobjectrequired
401Returned when the request has a missing or invalid API key or bearer token.

One documented failure

  • invalid_api_key

    API key supplied with request is invalid

errorobjectrequired
403Returned when the account is unpaid or the authenticated user has insufficient role permissions.

One documented failure

  • unauthorized

    You don't have access to this feature. Please contact your organization owner.

errorobjectrequired
404Returned when the playlist is not found.

One documented failure

  • playlist_not_found

    No playlist with provided id exists.

errorobjectrequired

Error handling

A 400 is returned for a bad request. A 401 is returned when the request has a missing or invalid API key or bearer token. A 403 is returned for an unpaid account or insufficient role permissions. A 404 is returned when the playlist is not found. For asset positioning, asset_id, page_number, page_size, and asset_position are required; page number and page size must be at least 1, page size must not exceed 200, and asset position must be at least 0. For sorting, sort_by must be title or created_at, and sort_order must be asc or desc.