PHPeerTube - A PHP‑based federated video platform, inspired by PeerTube.

Copyright (C) 2025 Lucentinian Works Co Ltd

PUT /me/videos/{id}/status - Update Video Status (Draft/Pending)

This endpoint allows a logged-in video owner to change the status of their video between draft and pending.

Request

PUT /me/videos/{id}/status

Path Parameters

Request Body (application/json)

Example cURL Request

Set status to 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" }'

Set status to draft

curl -X PUT \
  http://localhost:8080/me/videos/123/status \
  -H 'Authorization: Bearer YOUR_JWT_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{ "status": "draft" }'

Example Success Response (Status: 200 OK)

{
  "message": "Video status updated successfully."
}

Example Error Responses

400 Bad Request

{
  "error": "New status is missing."
}
{
  "error": "Invalid status specified. Only 'draft' or 'pending' are allowed for this operation."
}

401 Unauthorized

{
  "error": "Unauthorized: Missing or invalid token."
}

404 Not Found

{
  "error": "Failed to update video status, video not found, not owned by user, or not in an eligible status (draft or pending)."
}