6 name: PeerTube Community
7 url: https://joinpeertube.org
10 url: https://github.com/Chocobozzz/PeerTube/blob/master/LICENSE
12 url: https://joinpeertube.org/img/brand.png
13 altText: PeerTube Project Homepage
15 The PeerTube API is built on HTTP(S) and is RESTful. You can use your favorite
16 HTTP/REST library for your programming language to use PeerTube. The spec API is fully compatible with
17 [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO)
18 which generates a client SDK in the language of your choice - we generate some client SDKs automatically:
20 - [Python](https://framagit.org/framasoft/peertube/clients/python)
21 - [Go](https://framagit.org/framasoft/peertube/clients/go)
22 - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin)
24 See the [REST API quick start](https://docs.joinpeertube.org/api/rest-getting-started) for a few
25 examples of using the PeerTube API.
29 When you sign up for an account on a PeerTube instance, you are given the possibility
30 to generate sessions on it, and authenticate there using an access token. Only __one
31 access token can currently be used at a time__.
35 Accounts are given permissions based on their role. There are three roles on
36 PeerTube: Administrator, Moderator, and User. See the [roles guide](https://docs.joinpeertube.org/admin/managing-users#roles) for a detail of their permissions.
40 The API uses standard HTTP status codes to indicate the success or failure
41 of the API call, completed by a [RFC7807-compliant](https://tools.ietf.org/html/rfc7807) response body.
44 HTTP 1.1 404 Not Found
45 Content-Type: application/problem+json; charset=utf-8
48 "detail": "Video not found",
49 "docs": "https://docs.joinpeertube.org/api/rest-reference.html#operation/getVideo",
56 We provide error `type` values for [a growing number of cases](https://github.com/Chocobozzz/PeerTube/blob/develop/shared/models/server/server-error-code.enum.ts),
57 but it is still optional. Types are used to disambiguate errors that bear the same status code
61 HTTP 1.1 403 Forbidden
62 Content-Type: application/problem+json; charset=utf-8
65 "detail": "Cannot get this video regarding follow constraints",
66 "docs": "https://docs.joinpeertube.org/api/rest-reference.html#operation/getVideo",
69 "type": "https://docs.joinpeertube.org/api/rest-reference.html#section/Errors/does_not_respect_follow_constraints"
73 Here a 403 error could otherwise mean that the video is private or blocklisted.
77 Each parameter is evaluated on its own against a set of rules before the route validator
78 proceeds with potential testing involving parameter combinations. Errors coming from validation
79 errors appear earlier and benefit from a more detailed error description:
82 HTTP 1.1 400 Bad Request
83 Content-Type: application/problem+json; charset=utf-8
86 "detail": "Incorrect request parameters: id",
87 "docs": "https://docs.joinpeertube.org/api/rest-reference.html#operation/getVideo",
88 "instance": "/api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180",
92 "msg": "Invalid value",
94 "value": "9c9de5e8-0a1e-484a-b099-e80766180"
98 "title": "Bad Request",
103 Where `id` is the name of the field concerned by the error, within the route definition.
104 `invalid-params.<field>.location` can be either 'params', 'body', 'header', 'query' or 'cookies', and
105 `invalid-params.<field>.value` reports the value that didn't pass validation whose `invalid-params.<field>.msg`
108 ### Deprecated error fields
110 Some fields could be included with previous versions. They are still included but their use is deprecated:
111 - `error`: superseded by `detail`
112 - `code`: superseded by `type` (which is now an URI)
116 We are rate-limiting all endpoints of PeerTube's API. Custom values can be set by administrators:
118 | Endpoint (prefix: `/api/v1`) | Calls | Time frame |
119 |------------------------------|---------------|--------------|
120 | `/*` | 50 | 10 seconds |
121 | `POST /users/token` | 15 | 5 minutes |
122 | `POST /users/register` | 2<sup>*</sup> | 5 minutes |
123 | `POST /users/ask-send-verify-email` | 3 | 5 minutes |
125 Depending on the endpoint, <sup>*</sup>failed requests are not taken into account. A service
126 limit is announced by a `429 Too Many Requests` status code.
128 You can get details about the current state of your rate limit by reading the
131 | Header | Description |
132 |-------------------------|------------------------------------------------------------|
133 | `X-RateLimit-Limit` | Number of max requests allowed in the current time period |
134 | `X-RateLimit-Remaining` | Number of remaining requests in the current time period |
135 | `X-RateLimit-Reset` | Timestamp of end of current time period as UNIX timestamp |
136 | `Retry-After` | Seconds to delay after the first `429` is received |
140 This API features [Cross-Origin Resource Sharing (CORS)](https://fetch.spec.whatwg.org/),
141 allowing cross-domain communication from the browser for some routes:
144 |------------------------- ---|
148 | `/.well-known/webfinger` |
150 In addition, all routes serving ActivityPub are CORS-enabled for all origins.
152 url: https://docs.joinpeertube.org/api/rest-reference.html
156 As a visitor, you can use this API to open an account (if registrations are open on
157 that PeerTube instance). As an admin, you should use the dedicated [User creation
158 API](#operation/addUser) instead.
160 x-displayName: Login/Logout
162 Sessions deal with access tokens over time. Only __one session token can currently be used at a time__.
165 Accounts encompass remote accounts discovered across the federation,
166 and correspond to the main Actor, along with video channels a user can create, which
169 When a comment is posted, it is done with your Account's Actor.
172 Using some features of PeerTube require authentication, for which User
173 provide different levels of permission as well as associated user
174 information. Each user has a corresponding local Account for federation.
177 Operations related to your own User, when logged-in.
178 - name: My Subscriptions
180 Operations related to your subscriptions to video channels, their
181 new videos, and how to keep up to date with their latest publications!
184 Operations related to your watch history.
185 - name: My Notifications
187 Notifications following new videos, follows or reports. They allow you
188 to keep track of the interactions and overall important information that
189 concerns you. You MAY set per-notification type delivery preference, to
190 receive the info either by mail, by in-browser notification or both.
193 Each server exposes public information regarding supported videos and
197 Jobs are long-running tasks enqueued and processed by the instance
198 itself. No additional worker registration is currently available.
199 - name: Instance Follows
201 Managing servers which the instance interacts with is crucial to the
202 concept of federation in PeerTube and external video indexation. The PeerTube
203 server then deals with inter-server ActivityPub operations and propagates
204 information across its social graph by posting activities to actors' inbox
207 url: https://docs.joinpeertube.org/admin/following-instances#instances-follows
208 - name: Instance Redundancy
210 Redundancy is part of the inter-server solidarity that PeerTube fosters.
211 Manage the list of instances you wish to help by seeding their videos according
212 to the policy of video selection of your choice. Note that you have a similar functionality
213 to mirror individual videos, see [video mirroring](#tag/Video-Mirroring).
215 url: https://docs.joinpeertube.org/admin/following-instances#instances-redundancy
218 Managing plugins installed from a local path or from NPM, or search for new ones.
220 url: https://docs.joinpeertube.org/api/plugins
223 Abuses deal with reports of local or remote videos/comments/accounts alike.
226 Operations dealing with listing, uploading, fetching or modifying videos.
229 Operations dealing with adding video or audio. PeerTube supports two upload modes, and three import modes.
233 - [_legacy_](#operation/uploadLegacy), where the video file is sent in a single request
234 - [_resumable_](#operation/uploadResumableInit), where the video file is sent in chunks
236 You can upload videos more reliably by using the resumable variant. Its protocol lets
237 you resume an upload operation after a network interruption or other transmission failure,
238 saving time and bandwidth in the event of network failures.
240 Favor using resumable uploads in any of the following cases:
241 - You are transferring large files
242 - The likelihood of a network interruption is high
243 - Uploads are originating from a device with a low-bandwidth or unstable Internet connection,
244 such as a mobile device
248 - _URL_-based: where the URL points to any service supported by [youtube-dl](https://ytdl-org.github.io/youtube-dl/)
249 - _magnet_-based: where the URI resolves to a BitTorrent resource containing a single supported video file
250 - _torrent_-based: where the metainfo file resolves to a BitTorrent resource containing a single supported video file
252 The import function is practical when the desired video/audio is available online. It makes PeerTube
253 download it for you, saving you as much bandwidth and avoiding any instability or limitation your network might have.
254 - name: Video Imports
255 description: Operations dealing with listing, adding and removing video imports.
256 - name: Channels Sync
257 description: Operations dealing with synchronizing PeerTube user's channel with channels of other platforms
258 - name: Video Captions
259 description: Operations dealing with listing, adding and removing closed captions of a video.
260 - name: Video Channels
261 description: Operations dealing with the creation, modification and listing of videos within a channel.
262 - name: Video Comments
264 Operations dealing with comments to a video. Comments are organized in threads: adding a
265 comment in response to the video starts a thread, adding a reply to a comment adds it to
266 its root comment thread.
268 description: Operations dealing with blocking videos (removing them from view and preventing interactions).
270 description: Like/dislike a video.
271 - name: Video Playlists
272 description: Operations dealing with playlists of videos. Playlists are bound to users and/or channels.
274 description: Operations on video files
275 - name: Video Transcoding
276 description: Video transcoding related operations
278 description: Video statistics
280 description: Server syndication feeds of videos
283 The search helps to find _videos_ or _channels_ from within the instance and beyond.
284 Videos from other instances federated by the instance (that is, instances
285 followed by the instance) can be found via keywords and other criteria of
288 Administrators can also enable the use of a remote search system, indexing
289 videos and channels not could be not federated by the instance.
291 description: Get and update the custom homepage
292 - name: Video Mirroring
294 PeerTube instances can mirror videos from one another, and help distribute some videos.
296 For importing videos as your own, refer to [video imports](#operation/importVideo).
302 - name: Static endpoints
331 - Video Ownership Change
351 - Instance Redundancy
357 '/static/webseed/{filename}':
361 summary: Get public WebTorrent video file
363 - $ref: '#/components/parameters/staticFilename'
366 description: successful operation
368 description: not found
369 '/static/webseed/private/{filename}':
373 summary: Get private WebTorrent video file
375 - $ref: '#/components/parameters/staticFilename'
376 - $ref: '#/components/parameters/videoFileToken'
381 description: successful operation
383 description: invalid auth
385 description: not found
387 '/static/streaming-playlists/hls/{filename}':
391 summary: Get public HLS video file
393 - $ref: '#/components/parameters/staticFilename'
398 description: successful operation
400 description: invalid auth
402 description: not found
403 '/static/streaming-playlists/hls/private/{filename}':
407 summary: Get private HLS video file
409 - $ref: '#/components/parameters/staticFilename'
410 - $ref: '#/components/parameters/videoFileToken'
411 - $ref: '#/components/parameters/reinjectVideoFileToken'
416 description: successful operation
418 description: invalid auth
420 description: not found
423 '/feeds/video-comments.{format}':
427 summary: List comments on videos
428 operationId: getSyndicatedComments
433 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
446 description: 'limit listing to a specific video'
451 description: 'limit listing to a specific account'
456 description: 'limit listing to a specific account'
459 - name: videoChannelId
461 description: 'limit listing to a specific video channel'
464 - name: videoChannelName
466 description: 'limit listing to a specific video channel'
471 description: successful operation
476 default: 'max-age=900' # 15 min cache
480 $ref: '#/components/schemas/VideoCommentsForXML'
483 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
486 $ref: '#/components/schemas/VideoCommentsForXML'
489 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
492 $ref: '#/components/schemas/VideoCommentsForXML'
495 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
496 application/atom+xml:
498 $ref: '#/components/schemas/VideoCommentsForXML'
501 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
507 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
509 x-summary: field inconsistencies
512 - videoId filter is mixed with a channel filter
514 description: video, video channel or account not found
516 description: accept header unsupported
518 '/feeds/videos.{format}':
523 operationId: getSyndicatedVideos
528 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
541 description: 'limit listing to a specific account'
546 description: 'limit listing to a specific account'
549 - name: videoChannelId
551 description: 'limit listing to a specific video channel'
554 - name: videoChannelName
556 description: 'limit listing to a specific video channel'
559 - $ref: '#/components/parameters/sort'
560 - $ref: '#/components/parameters/nsfw'
561 - $ref: '#/components/parameters/isLocal'
562 - $ref: '#/components/parameters/include'
563 - $ref: '#/components/parameters/privacyOneOf'
564 - $ref: '#/components/parameters/hasHLSFiles'
565 - $ref: '#/components/parameters/hasWebtorrentFiles'
568 description: successful operation
573 default: 'max-age=900' # 15 min cache
577 $ref: '#/components/schemas/VideosForXML'
580 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
583 $ref: '#/components/schemas/VideosForXML'
586 externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
589 $ref: '#/components/schemas/VideosForXML'
592 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
593 application/atom+xml:
595 $ref: '#/components/schemas/VideosForXML'
598 externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
604 externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
606 description: video channel or account not found
608 description: accept header unsupported
610 '/feeds/subscriptions.{format}':
614 summary: List videos of subscriptions tied to a token
615 operationId: getSyndicatedSubscriptionVideos
620 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
633 description: limit listing to a specific account
639 description: private token allowing access
643 - $ref: '#/components/parameters/sort'
644 - $ref: '#/components/parameters/nsfw'
645 - $ref: '#/components/parameters/isLocal'
646 - $ref: '#/components/parameters/include'
647 - $ref: '#/components/parameters/privacyOneOf'
648 - $ref: '#/components/parameters/hasHLSFiles'
649 - $ref: '#/components/parameters/hasWebtorrentFiles'
652 description: successful operation
657 default: 'max-age=900' # 15 min cache
661 $ref: '#/components/schemas/VideosForXML'
664 $ref: '#/components/schemas/VideosForXML'
667 $ref: '#/components/schemas/VideosForXML'
668 application/atom+xml:
670 $ref: '#/components/schemas/VideosForXML'
675 description: accept header unsupported
677 '/api/v1/accounts/{name}':
681 summary: Get an account
682 operationId: getAccount
684 - $ref: '#/components/parameters/name'
687 description: successful operation
691 $ref: '#/components/schemas/Account'
693 description: account not found
695 '/api/v1/accounts/{name}/videos':
700 summary: 'List videos of an account'
701 operationId: getAccountVideos
703 - $ref: '#/components/parameters/name'
704 - $ref: '#/components/parameters/categoryOneOf'
705 - $ref: '#/components/parameters/isLive'
706 - $ref: '#/components/parameters/tagsOneOf'
707 - $ref: '#/components/parameters/tagsAllOf'
708 - $ref: '#/components/parameters/licenceOneOf'
709 - $ref: '#/components/parameters/languageOneOf'
710 - $ref: '#/components/parameters/nsfw'
711 - $ref: '#/components/parameters/isLocal'
712 - $ref: '#/components/parameters/include'
713 - $ref: '#/components/parameters/privacyOneOf'
714 - $ref: '#/components/parameters/hasHLSFiles'
715 - $ref: '#/components/parameters/hasWebtorrentFiles'
716 - $ref: '#/components/parameters/skipCount'
717 - $ref: '#/components/parameters/start'
718 - $ref: '#/components/parameters/count'
719 - $ref: '#/components/parameters/videosSort'
722 description: successful operation
726 $ref: '#/components/schemas/VideoListResponse'
730 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
731 .then(function(response) {
732 return response.json()
733 }).then(function(data) {
739 curl -s https://peertube2.cpy.re/api/v1/accounts/{name}/videos | jq
745 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
747 http = Net::HTTP.new(uri.host, uri.port)
750 response = http.get(uri.request_uri)
752 puts JSON.parse(response.read_body)
757 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
762 '/api/v1/accounts/{name}/followers':
766 summary: 'List followers of an account'
769 operationId: getAccountFollowers
771 - $ref: '#/components/parameters/name'
772 - $ref: '#/components/parameters/start'
773 - $ref: '#/components/parameters/count'
774 - $ref: '#/components/parameters/followersSort'
775 - $ref: '#/components/parameters/search'
778 description: successful operation
790 $ref: '#/components/schemas/Follow'
796 summary: List accounts
797 operationId: getAccounts
799 - $ref: '#/components/parameters/start'
800 - $ref: '#/components/parameters/count'
801 - $ref: '#/components/parameters/sort'
804 description: successful operation
810 $ref: '#/components/schemas/Account'
816 summary: Get instance public configuration
817 operationId: getConfig
820 description: successful operation
824 $ref: '#/components/schemas/ServerConfig'
827 externalValue: https://peertube2.cpy.re/api/v1/config
829 /api/v1/config/about:
831 summary: Get instance "About" information
832 operationId: getAbout
837 description: successful operation
841 $ref: '#/components/schemas/ServerConfigAbout'
844 externalValue: https://peertube2.cpy.re/api/v1/config/about
846 /api/v1/config/custom:
848 summary: Get instance runtime configuration
849 operationId: getCustomConfig
857 description: successful operation
861 $ref: '#/components/schemas/ServerConfigCustom'
863 summary: Set instance runtime configuration
864 operationId: putCustomConfig
872 description: successful operation
874 x-summary: field inconsistencies
877 - the emailer is disabled and the instance is open to registrations
878 - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
880 summary: Delete instance runtime configuration
881 operationId: delCustomConfig
889 description: successful operation
891 /api/v1/custom-pages/homepage/instance:
893 summary: Get instance custom homepage
898 description: No homepage set
900 description: successful operation
904 $ref: '#/components/schemas/CustomHomepage'
906 summary: Set instance custom homepage
920 description: content of the homepage, that will be injected in the client
923 description: successful operation
927 summary: Pause job queue
935 description: successful operation
939 summary: Resume job queue
947 description: successful operation
949 /api/v1/jobs/{state}:
951 summary: List instance jobs
962 description: The state of the job ('' for for no filter)
972 - $ref: '#/components/parameters/jobType'
973 - $ref: '#/components/parameters/start'
974 - $ref: '#/components/parameters/count'
975 - $ref: '#/components/parameters/sort'
978 description: successful operation
991 $ref: '#/components/schemas/Job'
993 /api/v1/server/followers:
997 summary: List instances following the server
999 - $ref: '#/components/parameters/followState'
1000 - $ref: '#/components/parameters/actorType'
1001 - $ref: '#/components/parameters/start'
1002 - $ref: '#/components/parameters/count'
1003 - $ref: '#/components/parameters/sort'
1006 description: successful operation
1018 $ref: '#/components/schemas/Follow'
1020 '/api/v1/server/followers/{nameWithHost}':
1022 summary: Remove or reject a follower to your server
1029 - name: nameWithHost
1032 description: The remote actor handle to remove from your followers
1038 description: successful operation
1040 description: follower not found
1042 '/api/v1/server/followers/{nameWithHost}/reject':
1044 summary: Reject a pending follower to your server
1051 - name: nameWithHost
1054 description: The remote actor handle to remove from your followers
1060 description: successful operation
1062 description: follower not found
1064 '/api/v1/server/followers/{nameWithHost}/accept':
1066 summary: Accept a pending follower to your server
1073 - name: nameWithHost
1076 description: The remote actor handle to remove from your followers
1082 description: successful operation
1084 description: follower not found
1086 /api/v1/server/following:
1090 summary: List instances followed by the server
1092 - $ref: '#/components/parameters/followState'
1093 - $ref: '#/components/parameters/actorType'
1094 - $ref: '#/components/parameters/start'
1095 - $ref: '#/components/parameters/count'
1096 - $ref: '#/components/parameters/sort'
1099 description: successful operation
1111 $ref: '#/components/schemas/Follow'
1118 summary: Follow a list of actors (PeerTube instance, channel or account)
1121 description: successful operation
1123 description: cannot follow a non-HTTPS server
1142 '/api/v1/server/following/{hostOrHandle}':
1144 summary: Unfollow an actor (PeerTube instance, channel or account)
1151 - name: hostOrHandle
1154 description: The hostOrHandle to unfollow
1159 description: successful operation
1161 description: host or handle not found
1165 summary: Create a user
1166 operationId: addUser
1174 description: user created
1178 $ref: '#/components/schemas/AddUserResponse'
1182 operationId: getUser
1184 id: '$response.body#/user/id'
1187 operationId: putUser
1189 id: '$response.body#/user/id'
1190 # DELETE /users/{id}
1192 operationId: delUser
1194 id: '$response.body#/user/id'
1196 description: insufficient authority to create an admin or moderator
1201 $ref: '#/components/schemas/AddUser'
1203 If the smtp server is configured, you can leave the password empty and an email will be sent
1204 asking the user to set it first.
1208 operationId: getUsers
1215 - $ref: '#/components/parameters/usersSearch'
1216 - $ref: '#/components/parameters/usersBlocked'
1217 - $ref: '#/components/parameters/start'
1218 - $ref: '#/components/parameters/count'
1219 - $ref: '#/components/parameters/usersSort'
1222 description: successful operation
1228 $ref: '#/components/schemas/User'
1230 '/api/v1/users/{id}':
1232 - $ref: '#/components/parameters/id'
1234 summary: Delete a user
1240 operationId: delUser
1243 description: successful operation
1250 operationId: getUser
1254 description: include statistics about the user (only available as a moderator/admin)
1259 x-summary: successful operation
1261 As an admin/moderator, you can request a response augmented with statistics about the user's
1262 moderation relations and videos usage, by using the `withStats` parameter.
1267 - $ref: '#/components/schemas/User'
1268 - $ref: '#/components/schemas/UserWithStats'
1270 summary: Update a user
1275 operationId: putUser
1278 description: successful operation
1283 $ref: '#/components/schemas/UpdateUser'
1286 /api/v1/oauth-clients/local:
1288 summary: Login prerequisite
1289 description: You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken).
1290 operationId: getOAuthClient
1295 description: successful operation
1299 $ref: '#/components/schemas/OAuthClient'
1301 UseOAuthClientToLogin:
1302 operationId: getOAuthToken
1304 client_id: '$response.body#/client_id'
1305 client_secret: '$response.body#/client_secret'
1309 API="https://peertube2.cpy.re/api/v1"
1312 curl -s "$API/oauth-clients/local"
1314 /api/v1/users/token:
1317 operationId: getOAuthToken
1318 description: With your [client id and secret](#operation/getOAuthClient), you can retrieve an access and refresh tokens.
1323 application/x-www-form-urlencoded:
1326 - $ref: '#/components/schemas/OAuthToken-password'
1327 - $ref: '#/components/schemas/OAuthToken-refresh_token'
1329 propertyName: grant_type
1331 password: '#/components/schemas/OAuthToken-password'
1332 refresh_token: '#/components/schemas/OAuthToken-refresh_token'
1335 description: successful operation
1346 example: 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0
1347 description: valid for 1 day
1350 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
1351 description: valid for 2 weeks
1356 refresh_token_expires_in:
1361 x-summary: client or credentials are invalid
1363 Disambiguate via `type`:
1364 - `invalid_client` for an unmatched `client_id`
1365 - `invalid_grant` for unmatched credentials
1367 x-summary: token expired
1369 Disambiguate via `type`:
1370 - default value for a regular authentication failure
1371 - `invalid_token` for an expired token
1376 API="https://peertube2.cpy.re/api/v1"
1377 USERNAME="<your_username>"
1378 PASSWORD="<your_password>"
1381 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
1382 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
1383 curl -s "$API/users/token" \
1384 --data client_id="$client_id" \
1385 --data client_secret="$client_secret" \
1386 --data grant_type=password \
1387 --data username="$USERNAME" \
1388 --data password="$PASSWORD" \
1389 | jq -r ".access_token"
1391 /api/v1/users/revoke-token:
1394 description: Revokes your access token and its associated refresh token, destroying your current session.
1395 operationId: revokeOAuthToken
1402 description: successful operation
1404 /api/v1/users/ask-send-verify-email:
1406 summary: Resend user verification link
1407 operationId: resendEmailToVerifyUser
1419 description: User email
1424 description: successful operation
1426 /api/v1/users/registrations/ask-send-verify-email:
1428 summary: Resend verification link to registration email
1429 operationId: resendEmailToVerifyRegistration
1440 description: Registration email
1445 description: successful operation
1447 /api/v1/users/{id}/verify-email:
1449 summary: Verify a user
1450 operationId: verifyUser
1452 Following a user registration, the new user will receive an email asking to click a link
1453 containing a secret.
1454 This endpoint can also be used to verify a new email set in the user account.
1459 - $ref: '#/components/parameters/id'
1472 - verificationString
1475 description: successful operation
1477 description: invalid verification string
1479 description: user not found
1481 /api/v1/users/registrations/{registrationId}/verify-email:
1483 summary: Verify a registration email
1484 operationId: verifyRegistrationEmail
1486 Following a user registration request, the user will receive an email asking to click a link
1487 containing a secret.
1491 - $ref: '#/components/parameters/registrationId'
1502 - verificationString
1505 description: successful operation
1507 description: invalid verification string
1509 description: registration not found
1511 /api/v1/users/{id}/two-factor/request:
1513 summary: Request two factor auth
1514 operationId: requestTwoFactor
1515 description: Request two factor authentication for a user
1519 - $ref: '#/components/parameters/id'
1528 description: Password of the currently authenticated user
1531 description: successful operation
1537 $ref: '#/components/schemas/RequestTwoFactorResponse'
1539 description: invalid password
1541 description: user not found
1543 /api/v1/users/{id}/two-factor/confirm-request:
1545 summary: Confirm two factor auth
1546 operationId: confirmTwoFactorRequest
1547 description: Confirm a two factor authentication request
1551 - $ref: '#/components/parameters/id'
1560 description: Token to identify the two factor request
1563 description: OTP token generated by the app
1569 description: successful operation
1571 description: invalid request token or OTP token
1573 description: user not found
1575 /api/v1/users/{id}/two-factor/disable:
1577 summary: Disable two factor auth
1578 operationId: disableTwoFactor
1579 description: Disable two factor authentication of a user
1583 - $ref: '#/components/parameters/id'
1592 description: Password of the currently authenticated user
1595 description: successful operation
1597 description: invalid password
1599 description: user not found
1603 summary: Get my user information
1604 operationId: getUserInfo
1612 description: successful operation
1618 $ref: '#/components/schemas/User'
1620 summary: Update my user information
1621 operationId: putUserInfo
1629 description: successful operation
1634 $ref: '#/components/schemas/UpdateMe'
1637 /api/v1/users/me/videos/imports:
1639 summary: Get video imports of my user
1647 - $ref: '#/components/parameters/start'
1648 - $ref: '#/components/parameters/count'
1649 - $ref: '#/components/parameters/sort'
1654 description: Filter on import target URL
1658 name: videoChannelSyncId
1661 description: Filter on imports created by a specific channel synchronization
1668 description: Search in video names
1673 description: successful operation
1677 $ref: '#/components/schemas/VideoImportsList'
1679 /api/v1/users/me/video-quota-used:
1681 summary: Get my user used quota
1689 description: successful operation
1697 description: The user video quota used so far in bytes
1698 example: 16810141515
1699 videoQuotaUsedDaily:
1701 description: The user video quota used today in bytes
1704 '/api/v1/users/me/videos/{videoId}/rating':
1706 summary: Get rate of my user for a video
1716 description: The video id
1718 $ref: '#/components/schemas/Video/properties/id'
1721 description: successful operation
1725 $ref: '#/components/schemas/GetMeVideoRating'
1727 /api/v1/users/me/videos:
1729 summary: Get videos of my user
1737 - $ref: '#/components/parameters/start'
1738 - $ref: '#/components/parameters/count'
1739 - $ref: '#/components/parameters/sort'
1742 description: successful operation
1746 $ref: '#/components/schemas/VideoListResponse'
1748 /api/v1/users/me/subscriptions:
1750 summary: Get my user subscriptions
1757 - $ref: '#/components/parameters/start'
1758 - $ref: '#/components/parameters/count'
1759 - $ref: '#/components/parameters/sort'
1762 description: successful operation
1766 $ref: '#/components/schemas/VideoChannelList'
1770 summary: Add subscription to my user
1783 description: uri of the video channels to subscribe to
1789 uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr
1792 description: successful operation
1794 /api/v1/users/me/subscriptions/exist:
1796 summary: Get if subscriptions exist for my user
1803 - $ref: '#/components/parameters/subscriptionsUris'
1806 description: successful operation
1812 /api/v1/users/me/subscriptions/videos:
1814 summary: List videos of subscriptions of my user
1822 - $ref: '#/components/parameters/categoryOneOf'
1823 - $ref: '#/components/parameters/isLive'
1824 - $ref: '#/components/parameters/tagsOneOf'
1825 - $ref: '#/components/parameters/tagsAllOf'
1826 - $ref: '#/components/parameters/licenceOneOf'
1827 - $ref: '#/components/parameters/languageOneOf'
1828 - $ref: '#/components/parameters/nsfw'
1829 - $ref: '#/components/parameters/isLocal'
1830 - $ref: '#/components/parameters/include'
1831 - $ref: '#/components/parameters/privacyOneOf'
1832 - $ref: '#/components/parameters/hasHLSFiles'
1833 - $ref: '#/components/parameters/hasWebtorrentFiles'
1834 - $ref: '#/components/parameters/skipCount'
1835 - $ref: '#/components/parameters/start'
1836 - $ref: '#/components/parameters/count'
1837 - $ref: '#/components/parameters/videosSort'
1840 description: successful operation
1844 $ref: '#/components/schemas/VideoListResponse'
1846 '/api/v1/users/me/subscriptions/{subscriptionHandle}':
1848 summary: Get subscription of my user
1855 - $ref: '#/components/parameters/subscriptionHandle'
1858 description: successful operation
1862 $ref: '#/components/schemas/VideoChannel'
1864 summary: Delete subscription of my user
1871 - $ref: '#/components/parameters/subscriptionHandle'
1874 description: successful operation
1876 /api/v1/users/me/notifications:
1878 summary: List my notifications
1886 description: only list unread notifications
1889 - $ref: '#/components/parameters/start'
1890 - $ref: '#/components/parameters/count'
1891 - $ref: '#/components/parameters/sort'
1894 description: successful operation
1898 $ref: '#/components/schemas/NotificationListResponse'
1900 /api/v1/users/me/notifications/read:
1902 summary: Mark notifications as read by their id
1915 description: ids of the notifications to mark as read
1922 description: successful operation
1924 /api/v1/users/me/notifications/read-all:
1926 summary: Mark all my notification as read
1933 description: successful operation
1935 /api/v1/users/me/notification-settings:
1937 summary: Update my notification settings
1948 newVideoFromSubscription:
1949 $ref: '#/components/schemas/NotificationSettingValue'
1950 newCommentOnMyVideo:
1951 $ref: '#/components/schemas/NotificationSettingValue'
1953 $ref: '#/components/schemas/NotificationSettingValue'
1954 videoAutoBlacklistAsModerator:
1955 $ref: '#/components/schemas/NotificationSettingValue'
1957 $ref: '#/components/schemas/NotificationSettingValue'
1959 $ref: '#/components/schemas/NotificationSettingValue'
1960 myVideoImportFinished:
1961 $ref: '#/components/schemas/NotificationSettingValue'
1963 $ref: '#/components/schemas/NotificationSettingValue'
1964 newUserRegistration:
1965 $ref: '#/components/schemas/NotificationSettingValue'
1967 $ref: '#/components/schemas/NotificationSettingValue'
1968 newInstanceFollower:
1969 $ref: '#/components/schemas/NotificationSettingValue'
1970 autoInstanceFollowing:
1971 $ref: '#/components/schemas/NotificationSettingValue'
1974 description: successful operation
1976 /api/v1/users/me/history/videos:
1978 summary: List watched videos history
1984 - $ref: '#/components/parameters/start'
1985 - $ref: '#/components/parameters/count'
1986 - $ref: '#/components/parameters/search'
1989 description: successful operation
1993 $ref: '#/components/schemas/VideoListResponse'
1995 /api/v1/users/me/history/videos/{videoId}:
1997 summary: Delete history element
2007 $ref: '#/components/schemas/Video/properties/id'
2010 description: successful operation
2012 /api/v1/users/me/history/videos/remove:
2014 summary: Clear video history
2021 multipart/form-data:
2026 description: history before this date will be deleted
2031 description: successful operation
2033 /api/v1/users/me/avatar/pick:
2035 summary: Update my user avatar
2042 description: successful operation
2051 $ref: '#/components/schemas/ActorImage'
2053 description: image file too large
2055 X-File-Maximum-Size:
2059 description: Maximum file size for the avatar
2062 multipart/form-data:
2067 description: The file to upload
2072 contentType: image/png, image/jpeg
2074 /api/v1/users/me/avatar:
2076 summary: Delete my avatar
2083 description: successful operation
2085 /api/v1/users/register:
2087 summary: Register a user
2088 operationId: registerUser
2089 description: Signup has to be enabled and signup approval is not required
2094 description: successful operation
2096 description: request error
2098 description: user registration is not enabled, user limit is reached, registration is not allowed for the ip, requires approval or blocked by a plugin
2100 description: 'a user with this username, channel name or email already exists'
2105 $ref: '#/components/schemas/RegisterUser'
2108 /api/v1/users/registrations/request:
2110 summary: Request registration
2111 description: Signup has to be enabled and require approval on the instance
2112 operationId: requestRegistration
2117 description: successful operation
2121 $ref: '#/components/schemas/UserRegistration'
2123 description: request error or signup approval is not enabled on the instance
2125 description: user registration is not enabled, user limit is reached, registration is not allowed for the ip or blocked by a plugin
2127 description: 'a user or registration with this username, channel name or email already exists'
2132 $ref: '#/components/schemas/UserRegistrationRequest'
2134 /api/v1/users/registrations/{registrationId}/accept:
2140 summary: Accept registration
2141 operationId: acceptRegistration
2145 - $ref: '#/components/parameters/registrationId'
2150 $ref: '#/components/schemas/UserRegistrationAcceptOrReject'
2153 description: successful operation
2155 /api/v1/users/registrations/{registrationId}/reject:
2161 summary: Reject registration
2162 operationId: rejectRegistration
2166 - $ref: '#/components/parameters/registrationId'
2171 $ref: '#/components/schemas/UserRegistrationAcceptOrReject'
2174 description: successful operation
2176 /api/v1/users/registrations/{registrationId}:
2182 summary: Delete registration
2183 description: 'Delete the registration entry. It will not remove the user associated with this registration (if any)'
2184 operationId: deleteRegistration
2188 - $ref: '#/components/parameters/registrationId'
2191 description: successful operation
2193 /api/v1/users/registrations:
2199 summary: List registrations
2200 operationId: listRegistrations
2204 - $ref: '#/components/parameters/start'
2205 - $ref: '#/components/parameters/count'
2223 description: successful operation
2235 $ref: '#/components/schemas/UserRegistration'
2237 /api/v1/videos/ownership:
2239 summary: List video ownership changes
2241 - Video Ownership Change
2246 description: successful operation
2248 '/api/v1/videos/ownership/{id}/accept':
2250 summary: Accept ownership change request
2252 - Video Ownership Change
2256 - $ref: '#/components/parameters/idOrUUID'
2259 description: successful operation
2261 description: cannot terminate an ownership change of another user
2263 description: video ownership change not found
2265 '/api/v1/videos/ownership/{id}/refuse':
2267 summary: Refuse ownership change request
2269 - Video Ownership Change
2273 - $ref: '#/components/parameters/idOrUUID'
2276 description: successful operation
2278 description: cannot terminate an ownership change of another user
2280 description: video ownership change not found
2282 '/api/v1/videos/{id}/give-ownership':
2284 summary: Request ownership change
2286 - Video Ownership Change
2290 - $ref: '#/components/parameters/idOrUUID'
2294 application/x-www-form-urlencoded:
2304 description: successful operation
2306 description: changing video ownership to a remote account is not supported yet
2308 description: video not found
2310 '/api/v1/videos/{id}/token':
2312 summary: Request video token
2313 operationId: requestVideoToken
2314 description: Request special tokens that expire quickly to use them in some context (like accessing private static files)
2320 - $ref: '#/components/parameters/idOrUUID'
2323 description: successful operation
2327 $ref: '#/components/schemas/VideoTokenResponse'
2329 description: incorrect parameters
2331 description: video not found
2333 /api/v1/videos/{id}/studio/edit:
2335 summary: Create a studio task
2339 description: Create a task to edit a video (cut, add intro/outro etc)
2343 - $ref: '#/components/parameters/idOrUUID'
2347 application/x-www-form-urlencoded:
2349 $ref: '#/components/schemas/VideoStudioCreateTask'
2352 description: successful operation
2354 description: incorrect parameters
2356 description: video not found
2360 summary: List videos
2361 operationId: getVideos
2365 - $ref: '#/components/parameters/categoryOneOf'
2366 - $ref: '#/components/parameters/isLive'
2367 - $ref: '#/components/parameters/tagsOneOf'
2368 - $ref: '#/components/parameters/tagsAllOf'
2369 - $ref: '#/components/parameters/licenceOneOf'
2370 - $ref: '#/components/parameters/languageOneOf'
2371 - $ref: '#/components/parameters/nsfw'
2372 - $ref: '#/components/parameters/isLocal'
2373 - $ref: '#/components/parameters/include'
2374 - $ref: '#/components/parameters/privacyOneOf'
2375 - $ref: '#/components/parameters/hasHLSFiles'
2376 - $ref: '#/components/parameters/hasWebtorrentFiles'
2377 - $ref: '#/components/parameters/skipCount'
2378 - $ref: '#/components/parameters/start'
2379 - $ref: '#/components/parameters/count'
2380 - $ref: '#/components/parameters/videosSort'
2383 description: successful operation
2387 $ref: '#/components/schemas/VideoListResponse'
2389 /api/v1/videos/categories:
2391 summary: List available video categories
2392 operationId: getCategories
2397 description: successful operation
2406 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
2408 /api/v1/videos/licences:
2410 summary: List available video licences
2411 operationId: getLicences
2416 description: successful operation
2425 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
2427 /api/v1/videos/languages:
2429 summary: List available video languages
2430 operationId: getLanguages
2435 description: successful operation
2444 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
2446 /api/v1/videos/privacies:
2448 summary: List available video privacy policies
2449 operationId: getVideoPrivacyPolicies
2454 description: successful operation
2463 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
2465 '/api/v1/videos/{id}':
2467 summary: Update a video
2468 operationId: putVideo
2474 - $ref: '#/components/parameters/idOrUUID'
2477 description: successful operation
2480 multipart/form-data:
2485 description: Video thumbnail file
2489 description: Video preview file
2493 $ref: '#/components/schemas/VideoCategorySet'
2495 $ref: '#/components/schemas/VideoLicenceSet'
2497 $ref: '#/components/schemas/VideoLanguageSet'
2499 $ref: '#/components/schemas/VideoPrivacySet'
2501 description: Video description
2504 description: Whether or not we wait transcoding before publish the video
2507 description: A text tell the audience how to support the video creator
2508 example: Please support our work on https://soutenir.framasoft.org/en/ <3
2511 description: Whether or not this video contains sensitive content
2514 description: Video name
2519 description: Video tags (maximum 5 tags each between 2 and 30 characters)
2528 description: Enable or disable comments for this video
2531 description: Enable or disable downloading for this video
2533 originallyPublishedAt:
2534 description: Date when the content was originally published
2538 $ref: '#/components/schemas/VideoScheduledUpdate'
2541 contentType: image/jpeg
2543 contentType: image/jpeg
2545 summary: Get a video
2546 operationId: getVideo
2550 - $ref: '#/components/parameters/idOrUUID'
2553 description: successful operation
2557 $ref: '#/components/schemas/VideoDetails'
2559 summary: Delete a video
2560 operationId: delVideo
2566 - $ref: '#/components/parameters/idOrUUID'
2569 description: successful operation
2571 '/api/v1/videos/{id}/description':
2573 summary: Get complete video description
2574 operationId: getVideoDesc
2578 - $ref: '#/components/parameters/idOrUUID'
2581 description: successful operation
2590 **[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)**
2592 '/api/v1/videos/{id}/source':
2594 summary: Get video source file metadata
2595 operationId: getVideoSource
2599 - $ref: '#/components/parameters/idOrUUID'
2602 description: successful operation
2606 $ref: '#/components/schemas/VideoSource'
2608 '/api/v1/videos/{id}/views':
2610 summary: Notify user is watching a video
2611 description: Call this endpoint regularly (every 5-10 seconds for example) to notify the server the user is watching the video. After a while, PeerTube will increase video's viewers counter. If the user is authenticated, PeerTube will also store the current player time.
2612 operationId: addView
2616 - $ref: '#/components/parameters/idOrUUID'
2621 $ref: '#/components/schemas/UserViewingVideo'
2625 description: successful operation
2627 '/api/v1/videos/{id}/watching':
2629 summary: Set watching progress of a video
2631 description: This endpoint has been deprecated. Use `/videos/{id}/views` instead
2637 - $ref: '#/components/parameters/idOrUUID'
2642 $ref: '#/components/schemas/UserViewingVideo'
2646 description: successful operation
2648 '/api/v1/videos/{id}/stats/overall':
2650 summary: Get overall stats of a video
2656 - $ref: '#/components/parameters/idOrUUID'
2659 description: Filter stats by start date
2665 description: Filter stats by end date
2671 description: successful operation
2675 $ref: '#/components/schemas/VideoStatsOverall'
2677 '/api/v1/videos/{id}/stats/retention':
2679 summary: Get retention stats of a video
2685 - $ref: '#/components/parameters/idOrUUID'
2688 description: successful operation
2692 $ref: '#/components/schemas/VideoStatsRetention'
2694 '/api/v1/videos/{id}/stats/timeseries/{metric}':
2696 summary: Get timeserie stats of a video
2702 - $ref: '#/components/parameters/idOrUUID'
2707 description: The metric to get
2712 - 'aggregateWatchTime'
2715 description: Filter stats by start date
2721 description: Filter stats by end date
2727 description: successful operation
2731 $ref: '#/components/schemas/VideoStatsTimeserie'
2733 /api/v1/videos/upload:
2735 summary: Upload a video
2736 description: Uses a single request to upload a video.
2737 operationId: uploadLegacy
2745 description: successful operation
2749 $ref: '#/components/schemas/VideoUploadResponse'
2751 description: video didn't pass upload filter
2753 description: upload has timed out
2755 x-summary: video file too large, due to quota or max body size limit set by the reverse-proxy
2757 If the response has no body, it means the reverse-proxy didn't let it through. Otherwise disambiguate via `type`:
2758 - `quota_reached` for quota limits whether daily or global
2760 X-File-Maximum-Size:
2764 description: Maximum file size for the video
2766 description: video type unsupported
2768 description: video unreadable
2771 multipart/form-data:
2773 $ref: '#/components/schemas/VideoUploadRequestLegacy'
2776 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
2778 contentType: image/jpeg
2780 contentType: image/jpeg
2785 USERNAME="<your_username>"
2786 PASSWORD="<your_password>"
2787 FILE_PATH="<your_file_path>"
2788 CHANNEL_ID="<your_channel_id>"
2790 API="https://peertube2.cpy.re/api/v1"
2793 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
2794 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
2795 token=$(curl -s "$API/users/token" \
2796 --data client_id="$client_id" \
2797 --data client_secret="$client_secret" \
2798 --data grant_type=password \
2799 --data username="$USERNAME" \
2800 --data password="$PASSWORD" \
2801 | jq -r ".access_token")
2804 curl -s "$API/videos/upload" \
2805 -H "Authorization: Bearer $token" \
2807 --form videofile=@"$FILE_PATH" \
2808 --form channelId=$CHANNEL_ID \
2811 /api/v1/videos/upload-resumable:
2813 summary: Initialize the resumable upload of a video
2814 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video
2815 operationId: uploadResumableInit
2822 - name: X-Upload-Content-Length
2828 description: Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading.
2829 - name: X-Upload-Content-Type
2836 description: MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.
2841 $ref: '#/components/schemas/VideoUploadRequestResumable'
2844 description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead
2846 description: created
2852 example: /api/v1/videos/upload-resumable?upload_id=471e97554f21dec3b8bb5d4602939c51
2858 x-summary: video file too large, due to quota, absolute max file size or concurrent partial upload limit
2860 Disambiguate via `type`:
2861 - `max_file_size_reached` for the absolute file size limit
2862 - `quota_reached` for quota limits whether daily or global
2864 description: video type unsupported
2866 summary: Send chunk for the resumable upload of a video
2867 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the upload of a video
2868 operationId: uploadResumable
2879 Created session id to proceed with. If you didn't send chunks in the last hour, it is
2880 not valid anymore and you need to initialize a new upload.
2883 - name: Content-Range
2887 example: bytes 0-262143/2469036
2890 Specifies the bytes in the file that the request is uploading.
2892 For example, a value of `bytes 0-262143/1000000` shows that the request is sending the first
2893 262144 bytes (256 x 1024) in a 2,469,036 byte file.
2894 - name: Content-Length
2901 Size of the chunk that the request is sending.
2903 Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from
2904 1048576 bytes (~1MB) and increases or reduces size depending on connection health.
2907 application/octet-stream:
2913 description: last chunk received
2921 $ref: '#/components/schemas/VideoUploadResponse'
2923 description: resume incomplete
2928 example: bytes=0-262143
2934 description: video didn't pass upload filter
2936 description: upload not found
2938 description: chunk doesn't match range
2940 description: video unreadable
2942 description: too many concurrent requests
2944 description: upload is already being processed
2951 summary: Cancel the resumable upload of a video, deleting any data uploaded so far
2952 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video
2953 operationId: uploadResumableCancel
2964 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
2965 not valid anymore and the upload session has already been deleted with its data ;-)
2968 - name: Content-Length
2976 description: upload cancelled
2983 description: upload not found
2985 /api/v1/videos/imports:
2987 summary: Import a video
2988 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
2989 operationId: importVideo
2997 multipart/form-data:
2999 $ref: '#/components/schemas/VideoCreateImport'
3002 contentType: application/x-bittorrent
3004 contentType: image/jpeg
3006 contentType: image/jpeg
3009 description: successful operation
3013 $ref: '#/components/schemas/VideoUploadResponse'
3015 description: '`magnetUri` or `targetUrl` or a torrent file missing'
3017 description: video didn't pass pre-import filter
3019 description: HTTP or Torrent/magnetURI import not enabled
3021 /api/v1/videos/imports/{id}/cancel:
3023 summary: Cancel video import
3024 description: Cancel a pending video import
3030 - $ref: '#/components/parameters/id'
3033 description: successful operation
3035 /api/v1/videos/imports/{id}:
3037 summary: Delete video import
3038 description: Delete ended video import
3044 - $ref: '#/components/parameters/id'
3047 description: successful operation
3049 /api/v1/videos/live:
3051 summary: Create a live
3052 operationId: addLive
3060 description: successful operation
3064 $ref: '#/components/schemas/VideoUploadResponse'
3066 x-summary: validation error, or conflicting `saveReplay` and `permanentLive` parameter set
3068 Disambiguate via `type`:
3069 - default type for a validation error
3070 - `live_conflicting_permanent_and_save_replay` for conflicting parameters set
3072 x-summary: live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
3074 Disambiguate via `type`:
3075 - `live_not_enabled` for a disabled live feature
3076 - `live_not_allowing_replay` for a disabled replay feature
3077 - `max_instance_lives_limit_reached` for the absolute concurrent live limit
3078 - `max_user_lives_limit_reached` for the user concurrent live limit
3081 multipart/form-data:
3086 description: Channel id that will contain this live video
3091 $ref: '#/components/schemas/LiveVideoReplaySettings'
3093 description: User can stream multiple times in a permanent live
3096 description: User can select live latency mode if enabled by the instance
3097 $ref: '#/components/schemas/LiveVideoLatencyMode'
3099 description: Live video/replay thumbnail file
3103 description: Live video/replay preview file
3107 $ref: '#/components/schemas/VideoPrivacySet'
3109 $ref: '#/components/schemas/VideoCategorySet'
3111 $ref: '#/components/schemas/VideoLicenceSet'
3113 $ref: '#/components/schemas/VideoLanguageSet'
3115 description: Live video/replay description
3118 description: A text tell the audience how to support the creator
3119 example: Please support our work on https://soutenir.framasoft.org/en/ <3
3122 description: Whether or not this live video/replay contains sensitive content
3125 description: Live video/replay name
3130 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
3139 description: Enable or disable comments for this live video/replay
3142 description: Enable or disable downloading for the replay of this live video
3149 contentType: image/jpeg
3151 contentType: image/jpeg
3153 /api/v1/videos/live/{id}:
3155 summary: Get information about a live
3156 operationId: getLiveId
3163 - $ref: '#/components/parameters/idOrUUID'
3166 description: successful operation
3170 $ref: '#/components/schemas/LiveVideoResponse'
3172 summary: Update information about a live
3173 operationId: updateLiveId
3180 - $ref: '#/components/parameters/idOrUUID'
3185 $ref: '#/components/schemas/LiveVideoUpdate'
3188 description: successful operation
3190 description: bad parameters or trying to update a live that has already started
3192 description: trying to save replay of the live but saving replay is not enabled on the instance
3193 /api/v1/videos/live/{id}/sessions:
3195 summary: List live sessions
3196 description: List all sessions created in a particular live
3202 - $ref: '#/components/parameters/idOrUUID'
3205 description: successful operation
3217 $ref: '#/components/schemas/LiveVideoSessionResponse'
3218 /api/v1/videos/{id}/live-session:
3220 summary: Get live session of a replay
3221 description: If the video is a replay of a live, you can find the associated live session using this endpoint
3227 - $ref: '#/components/parameters/idOrUUID'
3230 description: successful operation
3234 $ref: '#/components/schemas/LiveVideoSessionResponse'
3236 /api/v1/users/me/abuses:
3238 summary: List my abuses
3239 operationId: getMyAbuses
3248 description: only list the report with this id
3254 $ref: '#/components/schemas/AbuseStateSet'
3255 - $ref: '#/components/parameters/abusesSort'
3256 - $ref: '#/components/parameters/start'
3257 - $ref: '#/components/parameters/count'
3260 description: successful operation
3272 $ref: '#/components/schemas/Abuse'
3276 summary: List abuses
3277 operationId: getAbuses
3287 description: only list the report with this id
3290 - name: predefinedReason
3292 description: predefined reason the listed reports should contain
3294 $ref: '#/components/schemas/PredefinedAbuseReasons'
3297 description: plain search that will match with video titles, reporter names and more
3303 $ref: '#/components/schemas/AbuseStateSet'
3304 - name: searchReporter
3306 description: only list reports of a specific reporter
3309 - name: searchReportee
3310 description: only list reports of a specific reportee
3316 description: only list reports of a specific video
3319 - name: searchVideoChannel
3321 description: only list reports of a specific video channel
3326 description: only list deleted or blocklisted videos
3334 description: only list account, comment or video reports
3341 - $ref: '#/components/parameters/start'
3342 - $ref: '#/components/parameters/count'
3343 - $ref: '#/components/parameters/abusesSort'
3346 description: successful operation
3358 $ref: '#/components/schemas/Abuse'
3360 summary: Report an abuse
3373 description: Reason why the user reports this video
3378 $ref: '#/components/schemas/PredefinedAbuseReasons'
3383 description: Video id to report
3385 - $ref: '#/components/schemas/Video/properties/id'
3389 description: Timestamp in the video that marks the beginning of the report
3394 description: Timestamp in the video that marks the ending of the report
3400 description: Comment id to report
3402 - $ref: '#/components/schemas/VideoComment/properties/id'
3407 description: Account id to report
3413 description: successful operation
3423 $ref: '#/components/schemas/id'
3425 description: incorrect request parameters
3427 '/api/v1/abuses/{abuseId}':
3429 summary: Update an abuse
3437 - $ref: '#/components/parameters/abuseId'
3445 $ref: '#/components/schemas/AbuseStateSet'
3448 description: Update the report comment visible only to the moderation team
3453 description: successful operation
3455 description: abuse not found
3459 summary: Delete an abuse
3465 - $ref: '#/components/parameters/abuseId'
3468 description: successful operation
3470 description: block not found
3472 '/api/v1/abuses/{abuseId}/messages':
3474 summary: List messages of an abuse
3480 - $ref: '#/components/parameters/abuseId'
3483 description: successful operation
3495 $ref: '#/components/schemas/AbuseMessage'
3497 summary: Add message to an abuse
3503 - $ref: '#/components/parameters/abuseId'
3512 description: Message to send
3520 description: successful operation
3522 description: incorrect request parameters
3524 '/api/v1/abuses/{abuseId}/messages/{abuseMessageId}':
3526 summary: Delete an abuse message
3532 - $ref: '#/components/parameters/abuseId'
3533 - $ref: '#/components/parameters/abuseMessageId'
3536 description: successful operation
3538 '/api/v1/videos/{id}/blacklist':
3540 summary: Block a video
3541 operationId: addVideoBlock
3549 - $ref: '#/components/parameters/idOrUUID'
3552 description: successful operation
3554 summary: Unblock a video by its id
3555 operationId: delVideoBlock
3563 - $ref: '#/components/parameters/idOrUUID'
3566 description: successful operation
3568 description: block not found
3570 /api/v1/videos/blacklist:
3574 summary: List video blocks
3575 operationId: getVideoBlocks
3584 list only blocks that match this type:
3588 - `2`: automatic block that needs review
3596 description: plain search that will match with video titles, and more
3599 - $ref: '#/components/parameters/start'
3600 - $ref: '#/components/parameters/count'
3601 - $ref: '#/components/parameters/blacklistsSort'
3604 description: successful operation
3616 $ref: '#/components/schemas/VideoBlacklist'
3618 /api/v1/videos/{id}/captions:
3620 summary: List captions of a video
3621 operationId: getVideoCaptions
3625 - $ref: '#/components/parameters/idOrUUID'
3628 description: successful operation
3640 $ref: '#/components/schemas/VideoCaption'
3642 /api/v1/videos/{id}/captions/{captionLanguage}:
3644 summary: Add or replace a video caption
3645 operationId: addVideoCaption
3652 - $ref: '#/components/parameters/idOrUUID'
3653 - $ref: '#/components/parameters/captionLanguage'
3656 multipart/form-data:
3661 description: The file to upload.
3666 contentType: text/vtt, application/x-subrip, text/plain
3669 description: successful operation
3671 description: video or language not found
3673 summary: Delete a video caption
3674 operationId: delVideoCaption
3681 - $ref: '#/components/parameters/idOrUUID'
3682 - $ref: '#/components/parameters/captionLanguage'
3685 description: successful operation
3687 description: video or language or caption for that language not found
3689 /api/v1/video-channels:
3691 summary: List video channels
3692 operationId: getVideoChannels
3696 - $ref: '#/components/parameters/start'
3697 - $ref: '#/components/parameters/count'
3698 - $ref: '#/components/parameters/sort'
3701 description: successful operation
3705 $ref: '#/components/schemas/VideoChannelList'
3707 summary: Create a video channel
3708 operationId: addVideoChannel
3715 description: successful operation
3725 $ref: '#/components/schemas/id'
3730 $ref: '#/components/schemas/VideoChannelCreate'
3732 '/api/v1/video-channels/{channelHandle}':
3734 summary: Get a video channel
3735 operationId: getVideoChannel
3739 - $ref: '#/components/parameters/channelHandle'
3742 description: successful operation
3746 $ref: '#/components/schemas/VideoChannel'
3748 summary: Update a video channel
3749 operationId: putVideoChannel
3755 - $ref: '#/components/parameters/channelHandle'
3758 description: successful operation
3763 $ref: '#/components/schemas/VideoChannelUpdate'
3765 summary: Delete a video channel
3766 operationId: delVideoChannel
3772 - $ref: '#/components/parameters/channelHandle'
3775 description: successful operation
3777 '/api/v1/video-channels/{channelHandle}/videos':
3779 summary: List videos of a video channel
3780 operationId: getVideoChannelVideos
3785 - $ref: '#/components/parameters/channelHandle'
3786 - $ref: '#/components/parameters/categoryOneOf'
3787 - $ref: '#/components/parameters/isLive'
3788 - $ref: '#/components/parameters/tagsOneOf'
3789 - $ref: '#/components/parameters/tagsAllOf'
3790 - $ref: '#/components/parameters/licenceOneOf'
3791 - $ref: '#/components/parameters/languageOneOf'
3792 - $ref: '#/components/parameters/nsfw'
3793 - $ref: '#/components/parameters/isLocal'
3794 - $ref: '#/components/parameters/include'
3795 - $ref: '#/components/parameters/privacyOneOf'
3796 - $ref: '#/components/parameters/hasHLSFiles'
3797 - $ref: '#/components/parameters/hasWebtorrentFiles'
3798 - $ref: '#/components/parameters/skipCount'
3799 - $ref: '#/components/parameters/start'
3800 - $ref: '#/components/parameters/count'
3801 - $ref: '#/components/parameters/videosSort'
3804 description: successful operation
3808 $ref: '#/components/schemas/VideoListResponse'
3810 '/api/v1/video-channels/{channelHandle}/video-playlists':
3812 summary: List playlists of a channel
3817 - $ref: '#/components/parameters/channelHandle'
3818 - $ref: '#/components/parameters/start'
3819 - $ref: '#/components/parameters/count'
3820 - $ref: '#/components/parameters/sort'
3821 - $ref: '#/components/parameters/videoPlaylistType'
3824 description: successful operation
3836 $ref: '#/components/schemas/VideoPlaylist'
3838 '/api/v1/video-channels/{channelHandle}/followers':
3842 summary: 'List followers of a video channel'
3845 operationId: getVideoChannelFollowers
3847 - $ref: '#/components/parameters/channelHandle'
3848 - $ref: '#/components/parameters/start'
3849 - $ref: '#/components/parameters/count'
3850 - $ref: '#/components/parameters/followersSort'
3851 - $ref: '#/components/parameters/search'
3854 description: successful operation
3866 $ref: '#/components/schemas/Follow'
3868 '/api/v1/video-channels/{channelHandle}/avatar/pick':
3870 summary: Update channel avatar
3876 - $ref: '#/components/parameters/channelHandle'
3879 description: successful operation
3888 $ref: '#/components/schemas/ActorImage'
3890 description: image file too large
3892 X-File-Maximum-Size:
3896 description: Maximum file size for the avatar
3899 multipart/form-data:
3904 description: The file to upload.
3909 contentType: image/png, image/jpeg
3911 '/api/v1/video-channels/{channelHandle}/avatar':
3913 summary: Delete channel avatar
3919 - $ref: '#/components/parameters/channelHandle'
3922 description: successful operation
3924 '/api/v1/video-channels/{channelHandle}/banner/pick':
3926 summary: Update channel banner
3932 - $ref: '#/components/parameters/channelHandle'
3935 description: successful operation
3944 $ref: '#/components/schemas/ActorImage'
3946 description: image file too large
3948 X-File-Maximum-Size:
3952 description: Maximum file size for the banner
3955 multipart/form-data:
3960 description: The file to upload.
3965 contentType: image/png, image/jpeg
3967 '/api/v1/video-channels/{channelHandle}/banner':
3969 summary: Delete channel banner
3975 - $ref: '#/components/parameters/channelHandle'
3978 description: successful operation
3980 '/api/v1/video-channels/{channelHandle}/import-videos':
3982 summary: Import videos in channel
3983 description: Import a remote channel/playlist videos into a channel
3990 - $ref: '#/components/parameters/channelHandle'
3995 $ref: '#/components/schemas/ImportVideosInChannelCreate'
3998 description: successful operation
4000 '/api/v1/video-channel-syncs':
4002 summary: Create a synchronization for a video channel
4003 operationId: addVideoChannelSync
4012 $ref: '#/components/schemas/VideoChannelSyncCreate'
4015 description: successful operation
4022 $ref: "#/components/schemas/VideoChannelSync"
4024 '/api/v1/video-channel-syncs/{channelSyncId}':
4026 summary: Delete a video channel synchronization
4027 operationId: delVideoChannelSync
4033 - $ref: '#/components/parameters/channelSyncId'
4036 description: successful operation
4038 '/api/v1/video-channel-syncs/{channelSyncId}/sync':
4040 summary: Triggers the channel synchronization job, fetching all the videos from the remote channel
4041 operationId: triggerVideoChannelSync
4047 - $ref: '#/components/parameters/channelSyncId'
4050 description: successful operation
4053 /api/v1/video-playlists/privacies:
4055 summary: List available playlist privacy policies
4056 operationId: getPlaylistPrivacyPolicies
4061 description: successful operation
4070 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
4072 /api/v1/video-playlists:
4074 summary: List video playlists
4075 operationId: getPlaylists
4079 - $ref: '#/components/parameters/start'
4080 - $ref: '#/components/parameters/count'
4081 - $ref: '#/components/parameters/sort'
4082 - $ref: '#/components/parameters/videoPlaylistType'
4085 description: successful operation
4097 $ref: '#/components/schemas/VideoPlaylist'
4099 summary: Create a video playlist
4100 description: If the video playlist is set as public, `videoChannelId` is mandatory.
4101 operationId: addPlaylist
4108 description: successful operation
4118 $ref: '#/components/schemas/VideoPlaylist/properties/id'
4120 $ref: '#/components/schemas/VideoPlaylist/properties/uuid'
4122 $ref: '#/components/schemas/VideoPlaylist/properties/shortUUID'
4125 multipart/form-data:
4130 description: Video playlist display name
4135 description: Video playlist thumbnail file
4139 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4141 description: Video playlist description
4147 - $ref: '#/components/schemas/id'
4148 description: Video channel in which the playlist will be published
4153 contentType: image/jpeg
4155 /api/v1/video-playlists/{playlistId}:
4157 summary: Get a video playlist
4161 - $ref: '#/components/parameters/playlistId'
4164 description: successful operation
4168 $ref: '#/components/schemas/VideoPlaylist'
4170 summary: Update a video playlist
4171 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
4178 description: successful operation
4180 - $ref: '#/components/parameters/playlistId'
4183 multipart/form-data:
4188 description: Video playlist display name
4193 description: Video playlist thumbnail file
4197 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4199 description: Video playlist description
4203 - $ref: '#/components/schemas/id'
4204 description: Video channel in which the playlist will be published
4207 contentType: image/jpeg
4209 summary: Delete a video playlist
4215 - $ref: '#/components/parameters/playlistId'
4218 description: successful operation
4220 /api/v1/video-playlists/{playlistId}/videos:
4222 summary: 'List videos of a playlist'
4223 operationId: getVideoPlaylistVideos
4228 - $ref: '#/components/parameters/playlistId'
4229 - $ref: '#/components/parameters/start'
4230 - $ref: '#/components/parameters/count'
4233 description: successful operation
4237 $ref: '#/components/schemas/VideoListResponse'
4239 summary: Add a video in a playlist
4240 operationId: addVideoPlaylistVideo
4247 - $ref: '#/components/parameters/playlistId'
4250 description: successful operation
4256 videoPlaylistElement:
4270 - $ref: '#/components/schemas/Video/properties/uuid'
4271 - $ref: '#/components/schemas/Video/properties/id'
4272 description: Video to add in the playlist
4276 description: Start the video at this specific timestamp
4280 description: Stop the video at this specific timestamp
4284 /api/v1/video-playlists/{playlistId}/videos/reorder:
4286 summary: 'Reorder a playlist'
4287 operationId: reorderVideoPlaylist
4293 - $ref: '#/components/parameters/playlistId'
4296 description: successful operation
4305 description: 'Start position of the element to reorder'
4307 insertAfterPosition:
4309 description: 'New position for the block to reorder, to add the block before the first element'
4313 description: 'How many element from `startPosition` to reorder'
4317 - insertAfterPosition
4319 /api/v1/video-playlists/{playlistId}/videos/{playlistElementId}:
4321 summary: Update a playlist element
4322 operationId: putVideoPlaylistVideo
4328 - $ref: '#/components/parameters/playlistId'
4329 - $ref: '#/components/parameters/playlistElementId'
4332 description: successful operation
4342 description: Start the video at this specific timestamp
4346 description: Stop the video at this specific timestamp
4348 summary: Delete an element from a playlist
4349 operationId: delVideoPlaylistVideo
4355 - $ref: '#/components/parameters/playlistId'
4356 - $ref: '#/components/parameters/playlistElementId'
4359 description: successful operation
4361 '/api/v1/users/me/video-playlists/videos-exist':
4363 summary: Check video exists in my playlists
4372 description: The video ids to check
4376 $ref: '#/components/schemas/Video/properties/id'
4379 description: successful operation
4400 '/api/v1/accounts/{name}/video-playlists':
4402 summary: List playlists of an account
4407 - $ref: '#/components/parameters/name'
4408 - $ref: '#/components/parameters/start'
4409 - $ref: '#/components/parameters/count'
4410 - $ref: '#/components/parameters/sort'
4411 - $ref: '#/components/parameters/search'
4412 - $ref: '#/components/parameters/videoPlaylistType'
4415 description: successful operation
4427 $ref: '#/components/schemas/VideoPlaylist'
4429 '/api/v1/accounts/{name}/video-channels':
4431 summary: List video channels of an account
4436 - $ref: '#/components/parameters/name'
4439 description: include daily view statistics for the last 30 days and total views (only if authentified as the account user)
4442 - $ref: '#/components/parameters/start'
4443 - $ref: '#/components/parameters/count'
4444 - $ref: '#/components/parameters/sort'
4447 description: successful operation
4451 $ref: '#/components/schemas/VideoChannelList'
4453 '/api/v1/accounts/{name}/video-channel-syncs':
4455 summary: List the synchronizations of video channels of an account
4461 - $ref: '#/components/parameters/name'
4462 - $ref: '#/components/parameters/start'
4463 - $ref: '#/components/parameters/count'
4464 - $ref: '#/components/parameters/sort'
4467 description: successful operation
4471 $ref: '#/components/schemas/VideoChannelSyncList'
4473 '/api/v1/accounts/{name}/ratings':
4475 summary: List ratings of an account
4481 - $ref: '#/components/parameters/name'
4482 - $ref: '#/components/parameters/start'
4483 - $ref: '#/components/parameters/count'
4484 - $ref: '#/components/parameters/sort'
4488 description: Optionally filter which ratings to retrieve
4496 description: successful operation
4502 $ref: '#/components/schemas/VideoRating'
4504 '/api/v1/videos/{id}/comment-threads':
4506 summary: List threads of a video
4510 - $ref: '#/components/parameters/idOrUUID'
4511 - $ref: '#/components/parameters/start'
4512 - $ref: '#/components/parameters/count'
4513 - $ref: '#/components/parameters/commentsSort'
4516 description: successful operation
4520 $ref: '#/components/schemas/CommentThreadResponse'
4522 summary: Create a thread
4528 - $ref: '#/components/parameters/idOrUUID'
4531 description: successful operation
4535 $ref: '#/components/schemas/CommentThreadPostResponse'
4537 description: video does not exist
4546 - $ref: '#/components/schemas/VideoComment/properties/text'
4552 '/api/v1/videos/{id}/comment-threads/{threadId}':
4554 summary: Get a thread
4558 - $ref: '#/components/parameters/idOrUUID'
4559 - $ref: '#/components/parameters/threadId'
4562 description: successful operation
4566 $ref: '#/components/schemas/VideoCommentThreadTree'
4568 '/api/v1/videos/{id}/comments/{commentId}':
4570 summary: Reply to a thread of a video
4576 - $ref: '#/components/parameters/idOrUUID'
4577 - $ref: '#/components/parameters/commentId'
4580 description: successful operation
4584 $ref: '#/components/schemas/CommentThreadPostResponse'
4586 description: thread or video does not exist
4595 - $ref: '#/components/schemas/VideoComment/properties/text'
4601 summary: Delete a comment or a reply
4607 - $ref: '#/components/parameters/idOrUUID'
4608 - $ref: '#/components/parameters/commentId'
4611 description: successful operation
4613 description: cannot remove comment of another user
4615 description: comment or video does not exist
4617 description: comment is already deleted
4619 '/api/v1/videos/{id}/rate':
4621 summary: Like/dislike a video
4627 - $ref: '#/components/parameters/idOrUUID'
4643 description: successful operation
4645 description: video does not exist
4647 '/api/v1/videos/{id}/hls':
4649 summary: Delete video HLS files
4655 operationId: delVideoHLS
4657 - $ref: '#/components/parameters/idOrUUID'
4660 description: successful operation
4662 description: video does not exist
4663 '/api/v1/videos/{id}/webtorrent':
4665 summary: Delete video WebTorrent files
4671 operationId: delVideoWebTorrent
4673 - $ref: '#/components/parameters/idOrUUID'
4676 description: successful operation
4678 description: video does not exist
4680 '/api/v1/videos/{id}/transcoding':
4682 summary: Create a transcoding job
4688 operationId: createVideoTranscoding
4690 - $ref: '#/components/parameters/idOrUUID'
4706 description: successful operation
4708 description: video does not exist
4710 /api/v1/search/videos:
4714 summary: Search videos
4715 operationId: searchVideos
4720 allowEmptyValue: false
4722 String to search. If the user can make a remote URI search, and the string is an URI then the
4723 PeerTube instance will fetch the remote object and add it to its database. Then,
4724 you can use the REST API to fetch the complete video information and interact with it.
4727 - $ref: '#/components/parameters/categoryOneOf'
4728 - $ref: '#/components/parameters/isLive'
4729 - $ref: '#/components/parameters/tagsOneOf'
4730 - $ref: '#/components/parameters/tagsAllOf'
4731 - $ref: '#/components/parameters/licenceOneOf'
4732 - $ref: '#/components/parameters/languageOneOf'
4733 - $ref: '#/components/parameters/nsfw'
4734 - $ref: '#/components/parameters/isLocal'
4735 - $ref: '#/components/parameters/include'
4736 - $ref: '#/components/parameters/privacyOneOf'
4737 - $ref: '#/components/parameters/uuids'
4738 - $ref: '#/components/parameters/hasHLSFiles'
4739 - $ref: '#/components/parameters/hasWebtorrentFiles'
4740 - $ref: '#/components/parameters/skipCount'
4741 - $ref: '#/components/parameters/start'
4742 - $ref: '#/components/parameters/count'
4743 - $ref: '#/components/parameters/searchTarget'
4744 - $ref: '#/components/parameters/videosSearchSort'
4747 description: Get videos that are published after this date
4753 description: Get videos that are published before this date
4757 - name: originallyPublishedStartDate
4759 description: Get videos that are originally published after this date
4763 - name: originallyPublishedEndDate
4765 description: Get videos that are originally published before this date
4771 description: Get videos that have this minimum duration
4776 description: Get videos that have this maximum duration
4780 'searchTarget === search-index':
4781 $ref: '#/components/callbacks/searchIndex'
4784 description: successful operation
4788 $ref: '#/components/schemas/VideoListResponse'
4790 description: search index unavailable
4792 /api/v1/search/video-channels:
4796 summary: Search channels
4797 operationId: searchChannels
4803 String to search. If the user can make a remote URI search, and the string is an URI then the
4804 PeerTube instance will fetch the remote object and add it to its database. Then,
4805 you can use the REST API to fetch the complete channel information and interact with it.
4808 - $ref: '#/components/parameters/start'
4809 - $ref: '#/components/parameters/count'
4810 - $ref: '#/components/parameters/searchTarget'
4811 - $ref: '#/components/parameters/sort'
4813 'searchTarget === search-index':
4814 $ref: '#/components/callbacks/searchIndex'
4817 description: successful operation
4821 $ref: '#/components/schemas/VideoChannelList'
4823 description: search index unavailable
4825 /api/v1/search/video-playlists:
4829 summary: Search playlists
4830 operationId: searchPlaylists
4836 String to search. If the user can make a remote URI search, and the string is an URI then the
4837 PeerTube instance will fetch the remote object and add it to its database. Then,
4838 you can use the REST API to fetch the complete playlist information and interact with it.
4841 - $ref: '#/components/parameters/start'
4842 - $ref: '#/components/parameters/count'
4843 - $ref: '#/components/parameters/searchTarget'
4844 - $ref: '#/components/parameters/sort'
4846 'searchTarget === search-index':
4847 $ref: '#/components/callbacks/searchIndex'
4850 description: successful operation
4862 $ref: '#/components/schemas/VideoPlaylist'
4864 description: search index unavailable
4866 /api/v1/blocklist/status:
4871 summary: Get block status of accounts/hosts
4876 description: 'Check if these accounts are blocked'
4877 example: [ 'goofy@example.com', 'donald@example.com' ]
4885 description: 'Check if these hosts are blocked'
4886 example: [ 'example.com' ]
4893 description: successful operation
4897 $ref: '#/components/schemas/BlockStatus'
4899 /api/v1/server/blocklist/accounts:
4903 summary: List account blocks
4908 - $ref: '#/components/parameters/start'
4909 - $ref: '#/components/parameters/count'
4910 - $ref: '#/components/parameters/sort'
4913 description: successful operation
4917 summary: Block an account
4929 example: chocobozzz@example.org
4930 description: account to block, in the form `username@domain`
4935 description: successful operation
4937 description: self-blocking forbidden
4939 '/api/v1/server/blocklist/accounts/{accountName}':
4943 summary: Unblock an account by its handle
4951 description: account to unblock, in the form `username@domain`
4956 description: successful operation
4958 description: account or account block does not exist
4960 /api/v1/server/blocklist/servers:
4964 summary: List server blocks
4969 - $ref: '#/components/parameters/start'
4970 - $ref: '#/components/parameters/count'
4971 - $ref: '#/components/parameters/sort'
4974 description: successful operation
4978 summary: Block a server
4991 description: server domain to block
4996 description: successful operation
4998 description: self-blocking forbidden
5000 '/api/v1/server/blocklist/servers/{host}':
5004 summary: Unblock a server by its domain
5012 description: server domain to unblock
5018 description: successful operation
5020 description: account block does not exist
5022 /api/v1/server/redundancy/{host}:
5025 - Instance Redundancy
5026 summary: Update a server redundancy policy
5034 description: server domain to mirror
5046 description: allow mirroring of the host's local videos
5051 description: successful operation
5053 description: server is not already known
5055 /api/v1/server/redundancy/videos:
5059 summary: List videos being mirrored
5060 operationId: getMirroredVideos
5068 description: direction of the mirror
5074 - $ref: '#/components/parameters/start'
5075 - $ref: '#/components/parameters/count'
5076 - $ref: '#/components/parameters/videoRedundanciesSort'
5079 description: successful operation
5085 $ref: '#/components/schemas/VideoRedundancy'
5089 summary: Mirror a video
5090 operationId: putMirroredVideo
5101 $ref: '#/components/schemas/Video/properties/id'
5106 description: successful operation
5108 description: cannot mirror a local video
5110 description: video does not exist
5112 description: video is already mirrored
5114 /api/v1/server/redundancy/videos/{redundancyId}:
5118 summary: Delete a mirror done on a video
5119 operationId: delMirroredVideo
5124 - name: redundancyId
5127 description: id of an existing redundancy on a video
5132 description: successful operation
5134 description: video redundancy not found
5136 /api/v1/server/stats:
5140 summary: Get instance stats
5141 description: Get instance public statistics. This endpoint is cached.
5142 operationId: getInstanceStats
5145 description: successful operation
5149 $ref: '#/components/schemas/ServerStats'
5151 /api/v1/server/logs/client:
5155 summary: Send client log
5156 operationId: sendClientLog
5161 $ref: '#/components/schemas/SendClientLog'
5164 description: successful operation
5166 /api/v1/server/logs:
5170 summary: Get instance logs
5171 operationId: getInstanceLogs
5177 description: successful operation
5185 /api/v1/server/audit-logs:
5189 summary: Get instance audit logs
5190 operationId: getInstanceAuditLogs
5196 description: successful operation
5208 summary: List plugins
5209 operationId: getPlugins
5222 - $ref: '#/components/parameters/start'
5223 - $ref: '#/components/parameters/count'
5224 - $ref: '#/components/parameters/sort'
5227 description: successful operation
5231 $ref: '#/components/schemas/PluginResponse'
5233 /api/v1/plugins/available:
5237 summary: List available plugins
5238 operationId: getAvailablePlugins
5251 - name: currentPeerTubeEngine
5255 - $ref: '#/components/parameters/start'
5256 - $ref: '#/components/parameters/count'
5257 - $ref: '#/components/parameters/sort'
5260 description: successful operation
5264 $ref: '#/components/schemas/PluginResponse'
5266 description: plugin index unavailable
5268 /api/v1/plugins/install:
5272 summary: Install a plugin
5273 operationId: addPlugin
5286 example: peertube-plugin-auth-ldap
5289 additionalProperties: false
5296 additionalProperties: false
5299 description: successful operation
5301 description: should have either `npmName` or `path` set
5303 /api/v1/plugins/update:
5307 summary: Update a plugin
5308 operationId: updatePlugin
5321 example: peertube-plugin-auth-ldap
5324 additionalProperties: false
5331 additionalProperties: false
5334 description: successful operation
5336 description: should have either `npmName` or `path` set
5338 description: existing plugin not found
5340 /api/v1/plugins/uninstall:
5344 summary: Uninstall a plugin
5345 operationId: uninstallPlugin
5357 description: name of the plugin/theme in its package.json
5358 example: peertube-plugin-auth-ldap
5363 description: successful operation
5365 description: existing plugin not found
5367 /api/v1/plugins/{npmName}:
5371 summary: Get a plugin
5372 operationId: getPlugin
5377 - $ref: '#/components/parameters/npmName'
5380 description: successful operation
5384 $ref: '#/components/schemas/Plugin'
5386 description: plugin not found
5388 /api/v1/plugins/{npmName}/settings:
5392 summary: Set a plugin's settings
5397 - $ref: '#/components/parameters/npmName'
5406 additionalProperties: true
5409 description: successful operation
5411 description: plugin not found
5413 /api/v1/plugins/{npmName}/public-settings:
5417 summary: Get a plugin's public settings
5419 - $ref: '#/components/parameters/npmName'
5422 description: successful operation
5427 additionalProperties: true
5429 description: plugin not found
5431 /api/v1/plugins/{npmName}/registered-settings:
5435 summary: Get a plugin's registered settings
5440 - $ref: '#/components/parameters/npmName'
5443 description: successful operation
5448 additionalProperties: true
5450 description: plugin not found
5452 /api/v1/metrics/playback:
5454 summary: Create playback metrics
5455 description: These metrics are exposed by OpenTelemetry metrics exporter if enabled.
5462 $ref: '#/components/schemas/PlaybackMetricCreate'
5465 description: successful operation
5468 - url: 'https://peertube2.cpy.re'
5469 description: Live Test Server (live data - latest nightly version)
5470 - url: 'https://peertube3.cpy.re'
5471 description: Live Test Server (live data - latest RC version)
5472 - url: 'https://peertube.cpy.re'
5473 description: Live Test Server (live data - stable version)
5480 description: Offset used to paginate results
5488 description: "Number of items to return"
5498 description: Sort column
5506 description: Plain text search, applied to various parts of the model depending on endpoint
5514 If the administrator enabled search index support, you can override the default search target.
5517 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
5518 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
5519 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
5520 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
5521 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
5522 * If the current user doesn't have the ability to make a remote URI search, then redirect the user on the origin instance or fetch
5523 the data from the origin instance API
5546 Sort videos by criteria (prefixing with `-` means `DESC` order):
5547 * `hot` - Adaptation of Reddit "hot" algorithm taking into account video views, likes, dislikes and comments and publication date
5548 * `best` - Same than `hot`, but also takes into account user video history
5549 * `trending` - Sort videos by recent views ("recent" is defined by the admin)
5550 * `views` - Sort videos using their `views` counter
5551 * `publishedAt` - Sort by video publication date (when it became publicly available)
5557 Sort videos by criteria (prefixing with `-` means `DESC` order):
5572 description: Sort comments by criteria
5582 description: Sort blocklists by criteria
5598 description: Plain text search that will match with user usernames or emails
5605 description: Filter results down to (un)banned users
5612 description: Sort users by criteria
5623 description: Sort abuses by criteria
5630 videoRedundanciesSort:
5634 description: Sort abuses by criteria
5643 description: Sort followers by criteria
5653 description: The username or handle of the account
5656 example: chocobozzz | chocobozzz@example.org
5661 description: Entity id
5663 $ref: '#/components/schemas/id'
5665 name: registrationId
5668 description: Registration ID
5670 $ref: '#/components/schemas/id'
5675 description: The object id, uuid or short uuid
5678 - $ref: '#/components/schemas/id'
5679 - $ref: '#/components/schemas/UUIDv4'
5680 - $ref: '#/components/schemas/shortUUID'
5685 description: Playlist id
5687 $ref: '#/components/schemas/VideoPlaylist/properties/id'
5689 name: playlistElementId
5692 description: Playlist element id
5694 $ref: '#/components/schemas/id'
5699 description: Abuse id
5701 $ref: '#/components/schemas/Abuse/properties/id'
5703 name: abuseMessageId
5706 description: Abuse message id
5708 $ref: '#/components/schemas/AbuseMessage/properties/id'
5710 name: captionLanguage
5713 description: The caption language
5715 $ref: '#/components/schemas/VideoLanguageSet'
5720 description: The video channel handle
5723 example: my_username | my_username@example.com
5728 description: Channel Sync id
5730 $ref: '#/components/schemas/Abuse/properties/id'
5732 name: subscriptionHandle
5735 description: The subscription handle
5738 example: my_username | my_username@example.com
5743 description: The thread id (root comment id)
5750 description: The comment id
5752 $ref: '#/components/schemas/VideoComment/properties/id'
5757 description: whether or not the video is a live
5764 description: category id of the video (see [/videos/categories](#operation/getCategories))
5767 - $ref: '#/components/schemas/VideoCategorySet'
5770 $ref: '#/components/schemas/VideoCategorySet'
5777 description: tag(s) of the video
5791 description: tag(s) of the video, where all should be present in the video
5804 description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language
5807 - $ref: '#/components/schemas/VideoLanguageSet'
5810 $ref: '#/components/schemas/VideoLanguageSet'
5817 description: licence id of the video (see [/videos/licences](#operation/getLicences))
5820 - $ref: '#/components/schemas/VideoLicenceSet'
5823 $ref: '#/components/schemas/VideoLicenceSet'
5830 description: if you don't need the `total` in the response
5841 description: whether to include nsfw videos, if any
5853 description: '**PeerTube >= 4.0** Display only local or remote videos'
5860 description: '**PeerTube >= 4.0** Display only videos that have HLS files'
5862 name: hasWebtorrentFiles
5867 description: '**PeerTube >= 4.0** Display only videos that have WebTorrent files'
5873 $ref: '#/components/schemas/VideoPrivacySet'
5874 description: '**PeerTube >= 4.0** Display only videos in this specific privacy/privacies'
5882 description: 'Find videos with specific UUIDs'
5896 **PeerTube >= 4.0** Include additional videos in results (can be combined using bitwise or operator)
5900 - `1` NOT_PUBLISHED_STATE
5911 description: list of uris to check if each is part of the user subscriptions
5921 description: name of the plugin/theme on npmjs.com or in its package.json
5924 example: peertube-plugin-auth-ldap
5929 description: job type
5933 - activitypub-follow
5934 - activitypub-http-broadcast
5935 - activitypub-http-fetcher
5936 - activitypub-http-unicast
5941 - videos-views-stats
5942 - activitypub-refresher
5945 - video-channel-import
5969 description: Filename
5973 name: videoFileToken
5976 description: Video file token [generated](#operation/requestVideoToken) by PeerTube so you don't need to provide an OAuth token in the request header.
5979 reinjectVideoFileToken:
5980 name: reinjectVideoFileToken
5983 description: Ask the server to reinject videoFileToken in URLs in m3u8 playlist
5991 $ref: '#/components/schemas/VideoPlaylistTypeSet'
5996 Authenticating via OAuth requires the following steps:
5997 - Have an activated account
5998 - [Generate] an access token for that account at `/api/v1/users/token`.
5999 - Make requests with the *Authorization: Bearer <token\>* header
6000 - Profit, depending on the role assigned to the account
6002 Note that the __access token is valid for 1 day__ and is given
6003 along with a __refresh token valid for 2 weeks__.
6005 [Generate]: https://docs.joinpeertube.org/api/rest-getting-started
6009 tokenUrl: /api/v1/users/token
6012 moderator: Moderator scope
6015 # Reusable core properties
6023 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
6024 pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
6029 description: translation of a uuid v4 with a bigger alphabet to have a shorter uuid
6030 example: 2y84q2MQUMWPbiEcxNXMgC
6033 description: immutable name of the user, used to find or mention its actor
6035 pattern: '/^[a-z0-9._]+$/'
6040 description: immutable name of the channel, used to interact with its actor
6041 example: framasoft_videos
6042 pattern: '/^[a-zA-Z0-9\\-_.:]+$/'
6053 description: category id of the video (see [/videos/categories](#operation/getCategories))
6055 VideoConstantNumber-Category:
6058 $ref: '#/components/schemas/VideoCategorySet'
6061 example: Science & Technology
6065 description: licence id of the video (see [/videos/licences](#operation/getLicences))
6067 VideoConstantNumber-Licence:
6070 $ref: '#/components/schemas/VideoLicenceSet'
6073 example: Attribution - Share Alike
6077 description: language id of the video (see [/videos/languages](#operation/getLanguages))
6079 VideoConstantString-Language:
6082 $ref: '#/components/schemas/VideoLanguageSet'
6087 VideoPlaylistPrivacySet:
6093 description: Video playlist privacy policy (see [/video-playlists/privacies](#operation/getPlaylistPrivacyPolicies))
6094 VideoPlaylistPrivacyConstant:
6097 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
6101 VideoPlaylistTypeSet:
6106 description: The video playlist type (Regular = `1`, Watch Later = `2`)
6107 VideoPlaylistTypeConstant:
6110 $ref: '#/components/schemas/VideoPlaylistTypeSet'
6121 description: privacy id of the video (see [/videos/privacies](#operation/getVideoPrivacyPolicies))
6122 VideoPrivacyConstant:
6125 $ref: '#/components/schemas/VideoPrivacySet'
6133 additionalProperties:
6134 x-additionalPropertiesName: account
6143 additionalProperties:
6144 x-additionalPropertiesName: host
6165 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
6172 description: 'Admin flags for the user (None = `0`, Bypass video blocklist = `1`)'
6175 LiveVideoLatencyMode:
6181 description: 'The live latency mode (Default = `1`, High latency = `2`, Small Latency = `3`)'
6183 LiveVideoReplaySettings:
6187 # description: Video playlist privacy policy (see [../video-playlists/privacies])
6188 $ref: '#/components/schemas/VideoPrivacySet'
6210 - `4`: Waiting for live stream
6212 - `6`: To move to an external storage (object storage...)
6213 - `7`: Transcoding failed
6214 - `8`: Moving to an external storage failed
6215 - `9`: To edit using studio edition feature
6225 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
6229 $ref: '#/components/schemas/AbuseStateSet'
6232 AbusePredefinedReasons:
6245 example: [spamOrMisleading]
6250 Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`)
6252 `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos.
6254 VideoResolutionConstant:
6255 description: resolutions and their labels for the video
6258 $ref: '#/components/schemas/VideoResolutionSet'
6262 VideoScheduledUpdate:
6265 $ref: '#/components/schemas/VideoPrivacySet'
6269 description: When to update the video
6289 $ref: '#/components/schemas/ActorImage'
6290 VideoChannelSummary:
6293 $ref: '#/components/schemas/id'
6307 $ref: '#/components/schemas/ActorImage'
6321 - $ref: '#/components/schemas/Video'
6326 $ref: '#/components/schemas/id'
6330 description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file
6331 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
6333 $ref: '#/components/schemas/VideoResolutionConstant'
6336 description: Video file size in bytes
6339 description: Direct URL of the torrent file
6343 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
6347 description: Direct URL of the video
6351 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
6355 description: Frames per second of the video file
6359 description: URL dereferencing the output of ffprobe on the file
6360 VideoStreamingPlaylists:
6365 $ref: '#/components/schemas/id'
6373 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS'
6374 VideoStreamingPlaylists-HLS:
6385 Video files associated to this playlist.
6387 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.)
6389 $ref: '#/components/schemas/VideoFile'
6401 $ref: '#/components/schemas/Video/properties/id'
6403 $ref: '#/components/schemas/Video/properties/uuid'
6405 $ref: '#/components/schemas/Video/properties/name'
6409 description: object id for the video
6411 - $ref: '#/components/schemas/id'
6413 description: universal identifier for the video, that can be used across instances
6415 - $ref: '#/components/schemas/UUIDv4'
6418 - $ref: '#/components/schemas/shortUUID'
6424 example: 2017-10-01T10:52:46.396Z
6425 description: time at which the video object was first drafted
6429 example: 2018-10-01T10:52:46.396Z
6430 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
6434 example: 2021-05-04T08:01:01.502Z
6435 description: last time the video's metadata was modified
6436 originallyPublishedAt:
6439 example: 2010-10-01T10:52:46.396Z
6440 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
6443 - $ref: '#/components/schemas/VideoConstantNumber-Category'
6444 description: category in which the video is classified
6447 - $ref: '#/components/schemas/VideoConstantNumber-Licence'
6448 description: licence under which the video is distributed
6451 - $ref: '#/components/schemas/VideoConstantString-Language'
6452 description: main language used in the video
6455 - $ref: '#/components/schemas/VideoPrivacyConstant'
6456 description: privacy policy used to distribute the video
6460 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n
6461 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr...
6465 truncated description of the video, written in Markdown.
6466 Resolve `descriptionPath` to get the full description of maximum `10000` characters.
6471 description: duration of the video in seconds
6476 description: title of the video
6477 example: What is PeerTube?
6482 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
6485 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
6488 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
6505 - $ref: '#/components/schemas/VideoStateConstant'
6506 description: represents the internal state of the video processing within the PeerTube instance
6510 - $ref: '#/components/schemas/VideoScheduledUpdate'
6518 $ref: '#/components/schemas/AccountSummary'
6520 $ref: '#/components/schemas/VideoChannelSummary'
6529 - $ref: '#/components/schemas/Video'
6534 description: If the video is a live, you have the amount of current viewers
6537 example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description
6538 description: path at which to get the full description of maximum `10000` characters
6541 description: A text tell the audience how to support the video creator
6542 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6546 $ref: '#/components/schemas/VideoChannel'
6548 $ref: '#/components/schemas/Account'
6550 example: [flowers, gardening]
6568 - https://peertube2.cpy.re/tracker/announce
6569 - wss://peertube2.cpy.re/tracker/socket
6573 $ref: '#/components/schemas/VideoFile'
6575 WebTorrent/raw video files. If WebTorrent is disabled on the server:
6577 - field will be empty
6578 - video files will be found in `streamingPlaylists[].files` field
6582 $ref: '#/components/schemas/VideoStreamingPlaylists'
6584 HLS playlists/manifest files. If HLS is disabled on the server:
6586 - field will be empty
6587 - video files will be found in `files` field
6588 FileRedundancyInformation:
6591 $ref: '#/components/schemas/id'
6616 $ref: '#/components/schemas/id'
6623 $ref: '#/components/schemas/UUIDv4'
6630 $ref: '#/components/schemas/FileRedundancyInformation'
6634 $ref: '#/components/schemas/FileRedundancyInformation'
6635 VideoImportStateConstant:
6643 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
6650 additionalProperties: false
6654 $ref: '#/components/schemas/VideoImport/properties/targetUrl'
6655 required: [targetUrl]
6658 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
6659 required: [magnetUri]
6662 $ref: '#/components/schemas/VideoImport/properties/torrentfile'
6663 required: [torrentfile]
6664 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6673 - $ref: '#/components/schemas/id'
6677 description: remote URL where to find the import's source video
6678 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
6682 description: magnet URI allowing to resolve the import's source video
6683 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
6688 description: Torrent file containing only the video file
6695 - $ref: '#/components/schemas/VideoImportStateConstant'
6711 - $ref: '#/components/schemas/Video'
6721 $ref: '#/components/schemas/VideoImport'
6725 $ref: '#/components/schemas/id'
6728 example: The video is a spam
6732 $ref: '#/components/schemas/AbusePredefinedReasons'
6734 $ref: '#/components/schemas/Account'
6736 $ref: '#/components/schemas/AbuseStateConstant'
6739 example: Decided to ban the server since it spams us regularly
6743 $ref: '#/components/schemas/VideoInfo'
6750 $ref: '#/components/schemas/id'
6761 $ref: '#/components/schemas/AccountSummary'
6765 $ref: '#/components/schemas/id'
6767 $ref: '#/components/schemas/Video/properties/id'
6779 $ref: '#/components/schemas/UUIDv4'
6797 $ref: '#/components/schemas/id'
6799 $ref: '#/components/schemas/UUIDv4'
6802 - $ref: '#/components/schemas/shortUUID'
6825 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
6827 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
6829 $ref: '#/components/schemas/AccountSummary'
6831 $ref: '#/components/schemas/VideoChannelSummary'
6835 $ref: '#/components/schemas/id'
6842 description: Text of the comment
6844 example: This video is wonderful!
6846 $ref: '#/components/schemas/id'
6850 - $ref: '#/components/schemas/id'
6852 $ref: '#/components/schemas/Video/properties/id'
6867 totalRepliesFromVideoAuthor:
6874 $ref: '#/components/schemas/Account'
6875 VideoCommentThreadTree:
6878 $ref: '#/components/schemas/VideoComment'
6882 $ref: '#/components/schemas/VideoCommentThreadTree'
6886 $ref: '#/components/schemas/VideoConstantString-Language'
6908 $ref: '#/components/schemas/id'
6919 $ref: '#/components/schemas/ActorImage'
6923 $ref: '#/components/schemas/id'
6928 description: immutable name of the actor, used to find or mention it
6930 - $ref: '#/components/schemas/username'
6934 description: server on which the actor is resident
6935 hostRedundancyAllowed:
6937 description: whether this actor's host allows redundancy of its videos
6941 description: number of actors subscribed to by this actor, as seen by this instance
6945 description: number of followers of this actor, as seen by this instance
6954 - $ref: '#/components/schemas/Actor'
6957 description: object id for the user tied to this account
6959 - $ref: '#/components/schemas/User/properties/id'
6962 description: editable name of the account, displayed in its representations
6967 description: text or bio displayed on the account's profile
6975 description: timestamp within the video, in seconds
6982 Event since last viewing call:
6983 * `seek` - If the user seeked the video
7006 VideoStatsRetention:
7018 VideoStatsTimeserie:
7095 allowedForCurrentIP:
7097 requiresEmailVerification:
7115 $ref: '#/components/schemas/VideoResolutionSet'
7132 videoChannelSynchronization:
7205 example: 16810141515
7246 description: URL of the current user page
7253 description: Stack trace of the error if there is one
7256 description: User agent of the web browser that sends the message
7259 description: Additional information regarding this log
7269 totalDailyActiveUsers:
7271 totalWeeklyActiveUsers:
7273 totalMonthlyActiveUsers:
7277 totalLocalVideoViews:
7279 description: Total video views made on the instance
7280 totalLocalVideoComments:
7282 description: Total comments made by local users
7283 totalLocalVideoFilesSize:
7289 totalLocalVideoChannels:
7291 totalLocalDailyActiveVideoChannels:
7293 totalLocalWeeklyActiveVideoChannels:
7295 totalLocalMonthlyActiveVideoChannels:
7297 totalLocalPlaylists:
7299 totalInstanceFollowers:
7301 totalInstanceFollowing:
7318 totalActivityPubMessagesProcessed:
7320 totalActivityPubMessagesSuccesses:
7322 totalActivityPubMessagesErrors:
7325 activityPubMessagesProcessedPerSecond:
7327 totalActivityPubMessagesWaiting:
7404 requiresEmailVerification:
7419 description: Settings that apply to new users, if registration is enabled
7423 example: 16810141515
7429 description: Settings pertaining to transcoding jobs
7433 allowAdditionalExtensions:
7435 description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos
7438 description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
7441 description: Amount of threads used by ffmpeg for 1 transcoding job
7444 description: Amount of transcoding jobs to execute in parallel
7450 New profiles can be added by plugins ; available in core PeerTube: 'default'.
7453 description: Resolutions to transcode _new videos_ to
7475 description: WebTorrent-specific settings
7481 description: HLS-specific settings
7501 video_channel_synchronization:
7536 $ref: '#/components/schemas/id'
7538 $ref: '#/components/schemas/Actor'
7540 $ref: '#/components/schemas/Actor'
7543 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
7556 PredefinedAbuseReasons:
7557 description: Reason categories that help triage reports
7575 $ref: '#/components/schemas/id'
7587 - activitypub-http-unicast
7588 - activitypub-http-broadcast
7589 - activitypub-http-fetcher
7590 - activitypub-follow
7595 - videos-views-stats
7596 - activitypub-refresher
7598 - video-channel-import
7601 additionalProperties: true
7604 additionalProperties: true
7620 $ref: '#/components/schemas/id'
7625 $ref: '#/components/schemas/id'
7626 VideoUploadRequestCommon:
7629 description: Video name
7631 example: What is PeerTube?
7635 description: Channel id that will contain this video
7640 $ref: '#/components/schemas/VideoPrivacySet'
7642 $ref: '#/components/schemas/VideoCategorySet'
7644 $ref: '#/components/schemas/VideoLicenceSet'
7646 $ref: '#/components/schemas/VideoLanguageSet'
7648 description: Video description
7651 **[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)**
7653 description: Whether or not we wait transcoding before publish the video
7656 description: A text tell the audience how to support the video creator
7657 example: Please support our work on https://soutenir.framasoft.org/en/ <3
7660 description: Whether or not this video contains sensitive content
7663 description: Video tags (maximum 5 tags each between 2 and 30 characters)
7676 description: Enable or disable comments for this video
7679 description: Enable or disable downloading for this video
7681 originallyPublishedAt:
7682 description: Date when the content was originally published
7686 $ref: '#/components/schemas/VideoScheduledUpdate'
7688 description: Video thumbnail file
7692 description: Video preview file
7698 VideoUploadRequestLegacy:
7700 - $ref: '#/components/schemas/VideoUploadRequestCommon'
7706 description: Video file
7709 VideoUploadRequestResumable:
7711 - $ref: '#/components/schemas/VideoUploadRequestCommon'
7717 description: Video filename including extension
7720 example: what_is_peertube.mp4
7722 description: Video thumbnail file
7726 description: Video preview file
7729 VideoUploadResponse:
7735 $ref: '#/components/schemas/Video/properties/id'
7737 $ref: '#/components/schemas/Video/properties/uuid'
7739 $ref: '#/components/schemas/Video/properties/shortUUID'
7740 CommentThreadResponse:
7749 $ref: '#/components/schemas/VideoComment'
7750 CommentThreadPostResponse:
7753 $ref: '#/components/schemas/VideoComment'
7773 $ref: '#/components/schemas/Video'
7777 $ref: '#/components/schemas/Account'
7780 description: Automatically start playing the upcoming video after the currently playing video
7781 autoPlayNextVideoPlaylist:
7783 description: Automatically start playing the video on the playlist after the currently playing video
7786 description: Automatically start playing the video on the watch page
7796 description: The user email
7799 description: Has the user confirmed their email address?
7802 - $ref: '#/components/schemas/id'
7806 description: Auth plugin to use to authenticate the user
7810 noInstanceConfigWarningModal:
7812 noAccountSetupWarningModal:
7817 $ref: '#/components/schemas/NSFWPolicy'
7822 $ref: '#/components/schemas/UserRole'
7831 description: Theme enabled by this user
7833 $ref: '#/components/schemas/username'
7837 $ref: '#/components/schemas/VideoChannel'
7840 description: The user video quota in bytes
7844 description: The user daily video quota in bytes
7848 description: Enable P2P in the player
7851 - $ref: '#/components/schemas/User'
7853 # optionally present fields: they require WITH_STATS scope
7856 description: Count of videos published
7859 description: Count of reports/abuses of which the user is a target
7860 abusesAcceptedCount:
7862 description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team
7865 description: Count of reports/abuses created by the user
7868 description: Count of comments published
7872 $ref: '#/components/schemas/username'
7874 $ref: '#/components/schemas/password'
7878 description: The user email
7881 description: The user video quota in bytes
7885 description: The user daily video quota in bytes
7888 $ref: '#/components/schemas/usernameChannel'
7890 $ref: '#/components/schemas/UserRole'
7892 $ref: '#/components/schemas/UserAdminFlags'
7903 description: The updated email of the user
7905 - $ref: '#/components/schemas/User/properties/email'
7908 description: Set the email as verified
7911 description: The updated video quota of the user in bytes
7914 description: The updated daily video quota of the user in bytes
7918 description: The auth plugin to use to authenticate the user
7919 example: 'peertube-plugin-auth-saml2'
7921 $ref: '#/components/schemas/UserRole'
7923 $ref: '#/components/schemas/UserAdminFlags'
7925 $ref: '#/components/schemas/password'
7927 # see shared/models/users/user-update-me.model.ts:
7930 $ref: '#/components/schemas/password'
7932 $ref: '#/components/schemas/password'
7934 description: new email used for login and service communications
7936 - $ref: '#/components/schemas/User/properties/email'
7939 description: new name of the user in its representations
7944 description: new NSFW display policy
7951 description: whether to enable P2P in the player or not
7954 description: new preference regarding playing videos automatically
7957 description: new preference regarding playing following videos automatically
7958 autoPlayNextVideoPlaylist:
7960 description: new preference regarding playing following playlist videos automatically
7961 videosHistoryEnabled:
7963 description: whether to keep track of watched history or not
7968 description: list of languages to filter videos down to
7971 noInstanceConfigWarningModal:
7973 noAccountSetupWarningModal:
7980 $ref: '#/components/schemas/id'
7987 description: Rating of the video
7994 $ref: '#/components/schemas/Video'
8001 description: Rating of the video
8009 description: immutable name of the user, used to find or mention its actor
8011 - $ref: '#/components/schemas/username'
8013 $ref: '#/components/schemas/password'
8017 description: email of the user, used for login or service communications
8020 description: editable name of the user, displayed in its representations
8025 description: channel base information used to create the first channel of the user
8028 $ref: '#/components/schemas/usernameChannel'
8036 UserRegistrationRequest:
8038 - $ref: '#/components/schemas/RegisterUser'
8043 description: reason for the user to register on the instance
8045 - registrationReason
8047 UserRegistrationAcceptOrReject:
8052 description: Moderation response to send to the user
8053 preventEmailDelivery:
8055 description: Set it to true if you don't want PeerTube to send an email to the user
8057 - moderationResponse
8062 $ref: '#/components/schemas/id'
8072 description: 'The registration state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
8102 description: If the registration has been accepted, this is a partial user object created by the registration
8105 $ref: '#/components/schemas/id'
8111 pattern: /^[a-z0-9]$/
8114 example: v1ikx5hnfop4mdpnci8nsqh93c45rldf
8117 pattern: /^[a-zA-Z0-9]$/
8120 example: AjWiOapPltI6EnsWQwlFarRtLh4u8tDt
8121 OAuthToken-password:
8123 - $ref: '#/components/schemas/OAuthClient'
8133 $ref: '#/components/schemas/User/properties/username'
8135 $ref: '#/components/schemas/password'
8142 OAuthToken-refresh_token:
8144 - $ref: '#/components/schemas/OAuthClient'
8155 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
8164 - $ref: '#/components/schemas/Actor'
8169 description: editable name of the channel, displayed in its representations
8170 example: Videos of Framasoft
8175 example: Videos made with <3 by Framasoft
8180 description: text shown by default on all videos of this channel, to tell the audience how to support it
8181 example: Please support our work on https://soutenir.framasoft.org/en/ <3
8194 $ref: '#/components/schemas/ActorImage'
8203 $ref: '#/components/schemas/UUIDv4'
8208 description: Channel display name
8210 description: Channel description
8212 description: How to support/fund the channel
8216 - $ref: '#/components/schemas/VideoChannelEdit'
8219 description: username of the channel to create
8221 - $ref: '#/components/schemas/usernameChannel'
8227 - $ref: '#/components/schemas/VideoChannelEdit'
8229 bulkVideosSupportUpdate:
8231 description: Update the support field for all videos of this channel
8242 - $ref: '#/components/schemas/VideoChannel'
8243 - $ref: '#/components/schemas/Actor'
8245 ImportVideosInChannelCreate:
8250 example: https://youtube.com/c/UC_myfancychannel
8253 description: If part of a channel sync process, specify its id to assign video imports to this channel synchronization
8255 - 'externalChannelUrl'
8261 $ref: '#/components/schemas/id'
8273 example: 'https://youtube.com/c/UC_myfancychannel'
8282 $ref: '#/components/schemas/VideoChannel'
8283 VideoChannelSyncList:
8293 - $ref: '#/components/schemas/VideoChannelSync'
8294 VideoChannelSyncCreate:
8299 example: https://youtube.com/c/UC_myfancychannel
8301 $ref: '#/components/schemas/id'
8305 name: 'media:peerLink'
8314 - application/x-bittorrent
8320 name: 'media:content'
8351 VideoCommentsForXML:
8386 description: video watch page URL
8389 description: video canonical URL
8393 description: video publication date
8396 description: video description
8399 description: video description
8402 description: publisher user name
8405 description: video category (MRSS)
8408 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
8423 description: video embed path, relative to the canonical URL domain (MRSS)
8432 description: video watch path, relative to the canonical URL domain (MRSS)
8453 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
8454 'media:description':
8461 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
8464 description: main streamable file for the video
8474 - application/x-bittorrent
8483 description: list of streamable files for the video. see [media:peerLink](https://www.rssboard.org/media-rss#media-peerlink) and [media:content](https://www.rssboard.org/media-rss#media-content) or (MRSS)
8486 - $ref: '#/components/schemas/MRSSPeerLink'
8487 - $ref: '#/components/schemas/MRSSGroupContent'
8488 NotificationSettingValue:
8491 Notification type. One of the following values, or a sum of multiple values:
8501 $ref: '#/components/schemas/id'
8505 Notification type, following the `UserNotificationType` enum:
8507 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
8509 - `2` NEW_COMMENT_ON_MY_VIDEO
8511 - `3` NEW_ABUSE_FOR_MODERATORS
8513 - `4` BLACKLIST_ON_MY_VIDEO
8515 - `5` UNBLACKLIST_ON_MY_VIDEO
8517 - `6` MY_VIDEO_PUBLISHED
8519 - `7` MY_VIDEO_IMPORT_SUCCESS
8521 - `8` MY_VIDEO_IMPORT_ERROR
8523 - `9` NEW_USER_REGISTRATION
8527 - `11` COMMENT_MENTION
8529 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
8531 - `13` NEW_INSTANCE_FOLLOWER
8533 - `14` AUTO_INSTANCE_FOLLOWING
8535 - `15` ABUSE_STATE_CHANGE
8537 - `16` ABUSE_NEW_MESSAGE
8539 - `17` NEW_PLUGIN_VERSION
8541 - `18` NEW_PEERTUBE_VERSION
8547 - $ref: '#/components/schemas/VideoInfo'
8551 $ref: '#/components/schemas/ActorInfo'
8557 $ref: '#/components/schemas/id'
8560 $ref: '#/components/schemas/VideoInfo'
8565 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
8575 $ref: '#/components/schemas/id'
8579 $ref: '#/components/schemas/VideoInfo'
8581 $ref: '#/components/schemas/ActorInfo'
8587 $ref: '#/components/schemas/id'
8590 - $ref: '#/components/schemas/VideoInfo'
8596 $ref: '#/components/schemas/id'
8599 - $ref: '#/components/schemas/VideoInfo'
8603 - $ref: '#/components/schemas/ActorInfo'
8609 $ref: '#/components/schemas/id'
8611 $ref: '#/components/schemas/ActorInfo'
8639 NotificationListResponse:
8648 $ref: '#/components/schemas/Notification'
8653 example: peertube-plugin-auth-ldap
8681 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
8684 additionalProperties: true
8700 $ref: '#/components/schemas/Plugin'
8707 $ref: '#/components/schemas/LiveVideoReplaySettings'
8709 description: User can stream multiple times in a permanent live
8712 description: User can select live latency mode if enabled by the instance
8713 $ref: '#/components/schemas/LiveVideoLatencyMode'
8719 description: Included in the response if an appropriate token is provided
8722 description: Included in the response if an appropriate token is provided
8725 description: RTMP stream key to use to stream into this live video. Included in the response if an appropriate token is provided
8729 $ref: '#/components/schemas/LiveVideoReplaySettings'
8731 description: User can stream multiple times in a permanent live
8734 description: User can select live latency mode if enabled by the instance
8735 $ref: '#/components/schemas/LiveVideoLatencyMode'
8737 RequestTwoFactorResponse:
8744 description: The token to send to confirm this request
8747 description: The OTP secret
8750 description: The OTP URI
8752 VideoStudioCreateTask:
8800 title: add-watermark
8814 LiveVideoSessionResponse:
8821 description: Start date of the live session
8826 description: End date of the live session
8837 Error type if an error occurred during the live session:
8838 - `1`: Bad socket health (transcoding is too slow)
8839 - `2`: Max duration exceeded
8840 - `3`: Quota exceeded
8841 - `4`: Quota FFmpeg error
8842 - `5`: Video has been blacklisted during the live
8845 description: Video replay information
8850 $ref: '#/components/schemas/UUIDv4'
8852 $ref: '#/components/schemas/shortUUID'
8854 PlaybackMetricCreate:
8859 - 'p2p-media-loader'
8863 description: Current player video resolution
8866 description: Current player video fps
8869 description: How many resolution changes occured since the last metric creation
8872 description: How many errors occured since the last metric creation
8875 description: How many bytes were downloaded with P2P since the last metric creation
8876 downloadedBytesHTTP:
8878 description: How many bytes were downloaded with HTTP since the last metric creation
8881 description: How many bytes were uploaded with P2P since the last metric creation
8884 - $ref: '#/components/schemas/id'
8885 - $ref: '#/components/schemas/UUIDv4'
8886 - $ref: '#/components/schemas/shortUUID'
8891 - downloadedBytesP2P
8892 - downloadedBytesHTTP
8898 'https://search.example.org/api/v1/search/videos':
8900 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
8903 description: successful operation
8907 $ref: '#/components/schemas/VideoListResponse'