Copyright (C) 2025 Lucentinian Works Co Ltd
This endpoint allows a logged-in video owner to change the status of their video between draft and pending.
draft to pending makes the video ready for moderator review.pending to draft allows the owner to make further modifications before resubmitting for review.PUT /me/videos/{id}/status
id (integer, required): The ID of the video to update.status (string, required): The new status for the video. Must be either "draft" or "pending".curl -X PUT \
http://localhost:8080/me/videos/123/status \
-H 'Authorization: Bearer YOUR_JWT_TOKEN' \
-H 'Content-Type: application/json' \
-d '{ "status": "pending" }'
curl -X PUT \
http://localhost:8080/me/videos/123/status \
-H 'Authorization: Bearer YOUR_JWT_TOKEN' \
-H 'Content-Type: application/json' \
-d '{ "status": "draft" }'
{
"message": "Video status updated successfully."
}
{
"error": "New status is missing."
}
{
"error": "Invalid status specified. Only 'draft' or 'pending' are allowed for this operation."
}
{
"error": "Unauthorized: Missing or invalid token."
}
{
"error": "Failed to update video status, video not found, not owned by user, or not in an eligible status (draft or pending)."
}