PeerTube
  1. Video
PeerTube
  • Abuses
    • List abuses
      GET
    • Report an abuse
      POST
    • Delete an abuse
      DELETE
    • Update an abuse
      PUT
    • List messages of an abuse
      GET
    • Add message to an abuse
      POST
    • Delete an abuse message
      DELETE
    • List my abuses
      GET
  • Accounts
    • List accounts
      GET
    • Get an account
      GET
    • List ratings of an account
      GET
    • List videos of an account
      GET
  • Video Channels
    • List video channels of an account
    • List video channels
    • Create a video channel
    • Delete a video channel
    • Get a video channel
    • Update a video channel
    • Delete channel avatar
    • Update channel avatar
    • Delete channel banner
    • Update channel banner
  • Config
    • Get instance public configuration
    • Get instance "About" information
    • Delete instance runtime configuration
    • Get instance runtime configuration
    • Set instance runtime configuration
  • Homepage
    • Get instance custom homepage
    • Set instance custom homepage
  • Feeds
    • List videos of subscriptions tied to a token
    • List comments on videos
    • List videos
  • Job
    • List instance jobs
  • Session
    • Login prerequisite
    • Logout
    • Login
  • Plugins
    • List plugins
    • List available plugins
    • Install a plugin
    • Uninstall a plugin
    • Update a plugin
    • Get a plugin
    • Get a plugin's public settings
    • Get a plugin's registered settings
    • Set a plugin's settings
  • Search
    • Search channels
    • Search playlists
    • Search videos
  • Account Blocks
    • List account blocks
    • Block an account
    • Unblock an account by its handle
  • Server Blocks
    • List server blocks
    • Block a server
    • Unblock a server by its domain
  • Instance Follows
    • List instances following the server
    • Remove or reject a follower to your server
    • Accept a pending follower to your server
    • Reject a pending follower to your server
    • List instances followed by the server
    • Follow a list of actors (PeerTube instance, channel or account)
    • Unfollow an actor (PeerTube instance, channel or account)
  • Video Mirroring
    • List videos being mirrored
    • Mirror a video
    • Delete a mirror done on a video
  • Instance Redundancy
    • Update a server redundancy policy
  • Users
    • List users
    • Create a user
    • Resend user verification link
    • Register a user
    • Delete a user
    • Get a user
    • Update a user
    • Verify a user
  • My User
    • Get my user information
    • Update my user information
    • Delete my avatar
    • Update my user avatar
    • Get my user used quota
    • Get videos of my user
    • Get rate of my user for a video
  • My History
    • List watched videos history
    • Clear video history
  • My Notifications
    • Update my notification settings
    • List my notifications
    • Mark notifications as read by their id
    • Mark all my notification as read
  • My Subscriptions
    • Get my user subscriptions
    • Add subscription to my user
    • Get if subscriptions exist for my user
    • List videos of subscriptions of my user
    • Delete subscription of my user
    • Get subscription of my user
  • Video Playlists
    • Check video exists in my playlists
    • List video playlists
    • Create a video playlist
    • List available playlist privacy policies
    • Delete a video playlist
    • Get a video playlist
    • Update a video playlist
    • Reorder a playlist
    • Delete an element from a playlist
    • Update a playlist element
  • Videos
    • Get video imports of my user
    • List videos of a playlist
    • Add a video in a playlist
  • Video
    • List videos of a video channel
      GET
    • List videos
      GET
    • List available video categories
      GET
    • Import a video
      POST
    • List available video languages
      GET
    • List available video licences
      GET
    • List available video privacy policies
      GET
    • Upload a video
      POST
    • Cancel the resumable upload of a video, deleting any data uploaded so far
      DELETE
    • Initialize the resumable upload of a video
      POST
    • Send chunk for the resumable upload of a video
      PUT
    • Delete a video
      DELETE
    • Get a video
      GET
    • Update a video
      PUT
    • Get complete video description
      GET
    • Add a view to a video
      POST
    • Set watching progress of a video
      PUT
  • Video Blocks
    • List video blocks
    • Unblock a video by its id
    • Block a video
  • Live Videos
    • Create a live
    • Get information about a live
    • Update information about a live
  • Video Ownership Change
    • List video ownership changes
    • Accept ownership change request
    • Refuse ownership change request
    • Request ownership change
  • Video Captions
    • List captions of a video
    • Delete a video caption
    • Add or replace a video caption
  • Video Comments
    • List threads of a video
    • Create a thread
    • Get a thread
    • Delete a comment or a reply
    • Reply to a thread of a video
  • Video Rates
    • Like/dislike a video
  1. Video

Initialize the resumable upload of a video

Live Test Server (live data - latest nightly version)
https://peertube2.cpy.re/api/v1
Live Test Server (live data - latest nightly version)
https://peertube2.cpy.re/api/v1
POST
/videos/upload-resumable
VideoVideo Upload
Uses a resumable protocol to initialize the upload of a video
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://peertube2.cpy.re/api/v1/videos/upload-resumable' \
--header 'X-Upload-Content-Length;' \
--header 'X-Upload-Content-Type;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "category": 15,
    "channelId": 3,
    "commentsEnabled": true,
    "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",
    "downloadEnabled": true,
    "language": "en",
    "licence": 2,
    "name": "What is PeerTube?",
    "nsfw": true,
    "originallyPublishedAt": "2019-08-24T14:15:22Z",
    "previewfile": "string",
    "privacy": 1,
    "scheduleUpdate": {
        "privacy": 1,
        "updateAt": "2019-08-24"
    },
    "support": "Please support our work on https://soutenir.framasoft.org/en/ <3",
    "tags": [
        "framasoft",
        "peertube"
    ],
    "thumbnailfile": "string",
    "waitTranscoding": true,
    "filename": "what_is_peertube.mp4"
}'
Response Response Example
200 - Example 1
{}

Request

Header Params
X-Upload-Content-Length
number 
required
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-Type
string 
required
MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.
Body Params application/json
category
integer 
VideoCategorySet
optional
category id of the video (see /videos/categories)
Example:
15
channelId
integer 
required
Channel id that will contain this video
>= 1
Example:
3
commentsEnabled
boolean 
optional
Enable or disable comments for this video
description
string 
optional
Video description
Example:
**[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)**
downloadEnabled
boolean 
optional
Enable or disable downloading for this video
language
string 
VideoLanguageSet
optional
language id of the video (see /videos/languages)
Example:
en
licence
integer 
VideoLicenceSet
optional
licence id of the video (see /videos/licences)
Example:
2
name
string 
required
Video name
>= 3 characters<= 120 characters
Example:
What is PeerTube?
nsfw
boolean 
optional
Whether or not this video contains sensitive content
originallyPublishedAt
string <date-time>
optional
Date when the content was originally published
previewfile
string <binary>
optional
Video preview file
privacy
enum<integer> 
VideoPrivacySet
optional
privacy id of the video (see /videos/privacies)
Allowed values:
1234
scheduleUpdate
object 
VideoScheduledUpdate
optional
privacy
enum<integer> 
VideoPrivacySet
optional
privacy id of the video (see /videos/privacies)
Allowed values:
1234
updateAt
string <date>
required
When to update the video
support
string 
optional
A text tell the audience how to support the video creator
Example:
Please support our work on https://soutenir.framasoft.org/en/ <3
tags
array[string]
optional
Video tags (maximum 5 tags each between 2 and 30 characters)
>= 1 items<= 5 items
Example:
["framasoft","peertube"]
thumbnailfile
string <binary>
optional
Video thumbnail file
waitTranscoding
boolean 
optional
Whether or not we wait transcoding before publish the video
filename
string <filename>
required
Video filename including extension
Example:
what_is_peertube.mp4
Examples

Responses

🟢200file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead
application/json
Body
object {0}
🟢201created
🟠413Disambiguate via `type`: - `max_file_size_reached` for the absolute file size limit - `quota_reached` for quota limits whether daily or global
🟠415video type unsupported
Modified at 2022-09-10 22:29:50
Previous
Cancel the resumable upload of a video, deleting any data uploaded so far
Next
Send chunk for the resumable upload of a video
Built with