v1

latestOpenAPI 3.0.0AGPLv3.02026-07-14186117194.3 KB
Video
Video Upload

Initialize the resumable upload of a video

Uses a resumable protocol to initialize the upload of a video

post/api/v1/videos/upload-resumable

Headers

X-Upload-Content-Lengthnumber required
Example:2469036

Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading.

X-Upload-Content-Typestring mimetype required
Example:video/mp4

MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.

Request body

categoryinteger

category id of the video (see /videos/categories)

channelIdinteger required

Channel id that will contain this video

commentsEnabledboolean

Enable or disable comments for this video

descriptionstring

Video description

downloadEnabledboolean

Enable or disable downloading for this video

languagestring

language id of the video (see /videos/languages)

licenceinteger

licence id of the video (see /videos/licences)

namestring required

Video name

nsfwboolean

Whether or not this video contains sensitive content

originallyPublishedAtstring date-time

Date when the content was originally published

previewfilestring binary

Video preview file

privacy1 | 2 | 3 | 4

privacy id of the video (see /videos/privacies)

supportstring

A text tell the audience how to support the video creator

tagsstring[]

Video tags (maximum 5 tags each between 2 and 30 characters)

thumbnailfilestring binary

Video thumbnail file

waitTranscodingboolean

Whether or not we wait transcoding before publish the video

filenamestring filename required

Video filename including extension

Example request

{
  "category": 15,
  "channelId": 3,
  "description": "**[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\\r\\n\\r\\n**Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\n",
  "language": "en",
  "licence": 2,
  "name": "What is PeerTube?",
  "support": "Please support our work on https://soutenir.framasoft.org/en/ <3",
  "tags": [
    "framasoft",
    "peertube"
  ],
  "filename": "what_is_peertube.mp4"
}

Response

file already exists, send a resume request instead