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?id=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 | `/live/segments-sha256/*` |
149 | `/.well-known/webfinger` |
151 In addition, all routes serving ActivityPub are CORS-enabled for all origins.
153 url: https://docs.joinpeertube.org/api-rest-reference.html
157 As a visitor, you can use this API to open an account (if registrations are open on
158 that PeerTube instance). As an admin, you should use the dedicated [User creation
159 API](#operation/addUser) instead.
161 x-displayName: Login/Logout
163 Sessions deal with access tokens over time. Only __one session token can currently be used at a time__.
166 Accounts encompass remote accounts discovered across the federation,
167 and correspond to the main Actor, along with video channels a user can create, which
170 When a comment is posted, it is done with your Account's Actor.
173 Using some features of PeerTube require authentication, for which User
174 provide different levels of permission as well as associated user
175 information. Each user has a corresponding local Account for federation.
178 Operations related to your own User, when logged-in.
179 - name: My Subscriptions
181 Operations related to your subscriptions to video channels, their
182 new videos, and how to keep up to date with their latest publications!
185 Operations related to your watch history.
186 - name: My Notifications
188 Notifications following new videos, follows or reports. They allow you
189 to keep track of the interactions and overall important information that
190 concerns you. You MAY set per-notification type delivery preference, to
191 receive the info either by mail, by in-browser notification or both.
194 Each server exposes public information regarding supported videos and
198 Jobs are long-running tasks enqueued and processed by the instance
199 itself. No additional worker registration is currently available.
200 - name: Instance Follows
202 Managing servers which the instance interacts with is crucial to the
203 concept of federation in PeerTube and external video indexation. The PeerTube
204 server then deals with inter-server ActivityPub operations and propagates
205 information across its social graph by posting activities to actors' inbox
208 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-follows
209 - name: Instance Redundancy
211 Redundancy is part of the inter-server solidarity that PeerTube fosters.
212 Manage the list of instances you wish to help by seeding their videos according
213 to the policy of video selection of your choice. Note that you have a similar functionality
214 to mirror individual videos, see [video mirroring](#tag/Video-Mirroring).
216 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-redundancy
219 Managing plugins installed from a local path or from NPM, or search for new ones.
221 url: https://docs.joinpeertube.org/api-plugins
224 Abuses deal with reports of local or remote videos/comments/accounts alike.
227 Operations dealing with listing, uploading, fetching or modifying videos.
230 Operations dealing with adding video or audio. PeerTube supports two upload modes, and three import modes.
234 - [_legacy_](#operation/uploadLegacy), where the video file is sent in a single request
235 - [_resumable_](#operation/uploadResumableInit), where the video file is sent in chunks
237 You can upload videos more reliably by using the resumable variant. Its protocol lets
238 you resume an upload operation after a network interruption or other transmission failure,
239 saving time and bandwidth in the event of network failures.
241 Favor using resumable uploads in any of the following cases:
242 - You are transferring large files
243 - The likelihood of a network interruption is high
244 - Uploads are originating from a device with a low-bandwidth or unstable Internet connection,
245 such as a mobile device
249 - _URL_-based: where the URL points to any service supported by [youtube-dl](https://ytdl-org.github.io/youtube-dl/)
250 - _magnet_-based: where the URI resolves to a BitTorrent ressource containing a single supported video file
251 - _torrent_-based: where the metainfo file resolves to a BitTorrent ressource containing a single supported video file
253 The import function is practical when the desired video/audio is available online. It makes PeerTube
254 download it for you, saving you as much bandwidth and avoiding any instability or limitation your network might have.
255 - name: Video Imports
256 description: Operations dealing with listing, adding and removing video imports.
257 - name: Video Captions
258 description: Operations dealing with listing, adding and removing closed captions of a video.
259 - name: Video Channels
260 description: Operations dealing with the creation, modification and listing of videos within a channel.
261 - name: Video Comments
263 Operations dealing with comments to a video. Comments are organized in threads: adding a
264 comment in response to the video starts a thread, adding a reply to a comment adds it to
265 its root comment thread.
267 description: Operations dealing with blocking videos (removing them from view and preventing interactions).
269 description: Like/dislike a video.
270 - name: Video Playlists
271 description: Operations dealing with playlists of videos. Playlists are bound to users and/or channels.
273 description: Operations on video files
274 - name: Video Transcoding
275 description: Video transcoding related operations
277 description: Server syndication feeds
280 The search helps to find _videos_ or _channels_ from within the instance and beyond.
281 Videos from other instances federated by the instance (that is, instances
282 followed by the instance) can be found via keywords and other criteria of
285 Administrators can also enable the use of a remote search system, indexing
286 videos and channels not could be not federated by the instance.
288 description: Get and update the custom homepage
289 - name: Video Mirroring
291 PeerTube instances can mirror videos from one another, and help distribute some videos.
293 For importing videos as your own, refer to [video imports](#operation/importVideo).
317 - Video Ownership Change
335 - name: Instance Configuration
339 - Instance Redundancy
349 summary: Get an account
350 operationId: getAccount
352 - $ref: '#/components/parameters/name'
355 description: successful operation
359 $ref: '#/components/schemas/Account'
361 description: account not found
363 '/accounts/{name}/videos':
368 summary: 'List videos of an account'
369 operationId: getAccountVideos
371 - $ref: '#/components/parameters/name'
372 - $ref: '#/components/parameters/categoryOneOf'
373 - $ref: '#/components/parameters/isLive'
374 - $ref: '#/components/parameters/tagsOneOf'
375 - $ref: '#/components/parameters/tagsAllOf'
376 - $ref: '#/components/parameters/licenceOneOf'
377 - $ref: '#/components/parameters/languageOneOf'
378 - $ref: '#/components/parameters/nsfw'
379 - $ref: '#/components/parameters/isLocal'
380 - $ref: '#/components/parameters/include'
381 - $ref: '#/components/parameters/privacyOneOf'
382 - $ref: '#/components/parameters/hasHLSFiles'
383 - $ref: '#/components/parameters/hasWebtorrentFiles'
384 - $ref: '#/components/parameters/skipCount'
385 - $ref: '#/components/parameters/start'
386 - $ref: '#/components/parameters/count'
387 - $ref: '#/components/parameters/videosSort'
390 description: successful operation
394 $ref: '#/components/schemas/VideoListResponse'
398 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
399 .then(function(response) {
400 return response.json()
401 }).then(function(data) {
407 curl -s https://peertube2.cpy.re/api/v1/accounts/{name}/videos | jq
413 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
415 http = Net::HTTP.new(uri.host, uri.port)
418 response = http.get(uri.request_uri)
420 puts JSON.parse(response.read_body)
425 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
430 '/accounts/{name}/followers':
434 summary: 'List followers of an account'
437 operationId: getAccountFollowers
439 - $ref: '#/components/parameters/name'
440 - $ref: '#/components/parameters/start'
441 - $ref: '#/components/parameters/count'
442 - $ref: '#/components/parameters/followersSort'
443 - $ref: '#/components/parameters/search'
446 description: successful operation
458 $ref: '#/components/schemas/Follow'
464 summary: List accounts
465 operationId: getAccounts
467 - $ref: '#/components/parameters/start'
468 - $ref: '#/components/parameters/count'
469 - $ref: '#/components/parameters/sort'
472 description: successful operation
478 $ref: '#/components/schemas/Account'
484 summary: Get instance public configuration
485 operationId: getConfig
488 description: successful operation
492 $ref: '#/components/schemas/ServerConfig'
495 externalValue: https://peertube2.cpy.re/api/v1/config
499 summary: Get instance "About" information
500 operationId: getAbout
505 description: successful operation
509 $ref: '#/components/schemas/ServerConfigAbout'
512 externalValue: https://peertube2.cpy.re/api/v1/config/about
516 summary: Get instance runtime configuration
517 operationId: getCustomConfig
525 description: successful operation
529 $ref: '#/components/schemas/ServerConfigCustom'
531 summary: Set instance runtime configuration
532 operationId: putCustomConfig
540 description: successful operation
542 x-summary: field inconsistencies
545 - the emailer is disabled and the instance is open to registrations
546 - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
548 summary: Delete instance runtime configuration
549 operationId: delCustomConfig
557 description: successful operation
559 /custom-pages/homepage/instance:
561 summary: Get instance custom homepage
566 description: No homepage set
568 description: successful operation
572 $ref: '#/components/schemas/CustomHomepage'
574 summary: Set instance custom homepage
588 description: content of the homepage, that will be injected in the client
591 description: successful operation
595 summary: Pause job queue
603 description: successful operation
607 summary: Resume job queue
615 description: successful operation
619 summary: List instance jobs
630 description: The state of the job ('' for for no filter)
640 - $ref: '#/components/parameters/jobType'
641 - $ref: '#/components/parameters/start'
642 - $ref: '#/components/parameters/count'
643 - $ref: '#/components/parameters/sort'
646 description: successful operation
659 $ref: '#/components/schemas/Job'
665 summary: List instances following the server
667 - $ref: '#/components/parameters/followState'
668 - $ref: '#/components/parameters/actorType'
669 - $ref: '#/components/parameters/start'
670 - $ref: '#/components/parameters/count'
671 - $ref: '#/components/parameters/sort'
674 description: successful operation
686 $ref: '#/components/schemas/Follow'
688 '/server/followers/{nameWithHost}':
690 summary: Remove or reject a follower to your server
700 description: The remote actor handle to remove from your followers
706 description: successful operation
708 description: follower not found
710 '/server/followers/{nameWithHost}/reject':
712 summary: Reject a pending follower to your server
722 description: The remote actor handle to remove from your followers
728 description: successful operation
730 description: follower not found
732 '/server/followers/{nameWithHost}/accept':
734 summary: Accept a pending follower to your server
744 description: The remote actor handle to remove from your followers
750 description: successful operation
752 description: follower not found
758 summary: List instances followed by the server
760 - $ref: '#/components/parameters/followState'
761 - $ref: '#/components/parameters/actorType'
762 - $ref: '#/components/parameters/start'
763 - $ref: '#/components/parameters/count'
764 - $ref: '#/components/parameters/sort'
767 description: successful operation
779 $ref: '#/components/schemas/Follow'
786 summary: Follow a list of actors (PeerTube instance, channel or account)
789 description: successful operation
791 description: cannot follow a non-HTTPS server
810 '/server/following/{hostOrHandle}':
812 summary: Unfollow an actor (PeerTube instance, channel or account)
822 description: The hostOrHandle to unfollow
827 description: successful operation
829 description: host or handle not found
833 summary: Create a user
842 description: user created
846 $ref: '#/components/schemas/AddUserResponse'
852 id: '$response.body#/user/id'
857 id: '$response.body#/user/id'
862 id: '$response.body#/user/id'
864 description: insufficient authority to create an admin or moderator
869 $ref: '#/components/schemas/AddUser'
871 If the smtp server is configured, you can leave the password empty and an email will be sent
872 asking the user to set it first.
876 operationId: getUsers
883 - $ref: '#/components/parameters/usersSearch'
884 - $ref: '#/components/parameters/usersBlocked'
885 - $ref: '#/components/parameters/start'
886 - $ref: '#/components/parameters/count'
887 - $ref: '#/components/parameters/usersSort'
890 description: successful operation
896 $ref: '#/components/schemas/User'
900 - $ref: '#/components/parameters/id'
902 summary: Delete a user
911 description: successful operation
922 description: include statistics about the user (only available as a moderator/admin)
927 x-summary: successful operation
929 As an admin/moderator, you can request a response augmented with statistics about the user's
930 moderation relations and videos usage, by using the `withStats` parameter.
935 - $ref: '#/components/schemas/User'
936 - $ref: '#/components/schemas/UserWithStats'
938 summary: Update a user
946 description: successful operation
951 $ref: '#/components/schemas/UpdateUser'
954 /oauth-clients/local:
956 summary: Login prerequisite
957 description: You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken).
958 operationId: getOAuthClient
963 description: successful operation
967 $ref: '#/components/schemas/OAuthClient'
969 UseOAuthClientToLogin:
970 operationId: getOAuthToken
972 client_id: '$response.body#/client_id'
973 client_secret: '$response.body#/client_secret'
977 API="https://peertube2.cpy.re/api/v1"
980 curl -s "$API/oauth-clients/local"
985 operationId: getOAuthToken
986 description: With your [client id and secret](#operation/getOAuthClient), you can retrieve an access and refresh tokens.
991 application/x-www-form-urlencoded:
994 - $ref: '#/components/schemas/OAuthToken-password'
995 - $ref: '#/components/schemas/OAuthToken-refresh_token'
997 propertyName: grant_type
999 password: '#/components/schemas/OAuthToken-password'
1000 refresh_token: '#/components/schemas/OAuthToken-refresh_token'
1003 description: successful operation
1014 example: 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0
1015 description: valid for 1 day
1018 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
1019 description: valid for 2 weeks
1024 refresh_token_expires_in:
1029 x-summary: client or credentials are invalid
1031 Disambiguate via `type`:
1032 - `invalid_client` for an unmatched `client_id`
1033 - `invalid_grant` for unmatched credentials
1035 x-summary: token expired
1037 Disambiguate via `type`:
1038 - default value for a regular authentication failure
1039 - `invalid_token` for an expired token
1044 API="https://peertube2.cpy.re/api/v1"
1045 USERNAME="<your_username>"
1046 PASSWORD="<your_password>"
1049 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
1050 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
1051 curl -s "$API/users/token" \
1052 --data client_id="$client_id" \
1053 --data client_secret="$client_secret" \
1054 --data grant_type=password \
1055 --data username="$USERNAME" \
1056 --data password="$PASSWORD" \
1057 | jq -r ".access_token"
1059 /users/revoke-token:
1062 description: Revokes your access token and its associated refresh token, destroying your current session.
1063 operationId: revokeOAuthToken
1070 description: successful operation
1074 summary: Register a user
1075 operationId: registerUser
1081 description: successful operation
1086 $ref: '#/components/schemas/RegisterUser'
1089 /users/{id}/verify-email:
1091 summary: Verify a user
1092 operationId: verifyUser
1094 Following a user registration, the new user will receive an email asking to click a link
1095 containing a secret.
1100 - $ref: '#/components/parameters/id'
1113 - verificationString
1116 description: successful operation
1118 description: invalid verification string
1120 description: user not found
1122 /users/ask-send-verify-email:
1124 summary: Resend user verification link
1125 operationId: resendEmailToVerifyUser
1131 description: successful operation
1135 summary: Get my user information
1136 operationId: getUserInfo
1144 description: successful operation
1150 $ref: '#/components/schemas/User'
1152 summary: Update my user information
1153 operationId: putUserInfo
1161 description: successful operation
1166 $ref: '#/components/schemas/UpdateMe'
1169 /users/me/videos/imports:
1171 summary: Get video imports of my user
1179 - $ref: '#/components/parameters/start'
1180 - $ref: '#/components/parameters/count'
1181 - $ref: '#/components/parameters/sort'
1184 description: successful operation
1188 $ref: '#/components/schemas/VideoImportsList'
1190 /users/me/video-quota-used:
1192 summary: Get my user used quota
1200 description: successful operation
1208 description: The user video quota used so far in bytes
1209 example: 16810141515
1210 videoQuotaUsedDaily:
1212 description: The user video quota used today in bytes
1215 '/users/me/videos/{videoId}/rating':
1217 summary: Get rate of my user for a video
1227 description: The video id
1229 $ref: '#/components/schemas/Video/properties/id'
1232 description: successful operation
1236 $ref: '#/components/schemas/GetMeVideoRating'
1240 summary: Get videos of my user
1248 - $ref: '#/components/parameters/start'
1249 - $ref: '#/components/parameters/count'
1250 - $ref: '#/components/parameters/sort'
1253 description: successful operation
1257 $ref: '#/components/schemas/VideoListResponse'
1259 /users/me/subscriptions:
1261 summary: Get my user subscriptions
1268 - $ref: '#/components/parameters/start'
1269 - $ref: '#/components/parameters/count'
1270 - $ref: '#/components/parameters/sort'
1273 description: successful operation
1277 $ref: '#/components/schemas/VideoChannelList'
1281 summary: Add subscription to my user
1294 description: uri of the video channels to subscribe to
1300 uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr
1303 description: successful operation
1305 /users/me/subscriptions/exist:
1307 summary: Get if subscriptions exist for my user
1314 - $ref: '#/components/parameters/subscriptionsUris'
1317 description: successful operation
1323 /users/me/subscriptions/videos:
1325 summary: List videos of subscriptions of my user
1333 - $ref: '#/components/parameters/categoryOneOf'
1334 - $ref: '#/components/parameters/isLive'
1335 - $ref: '#/components/parameters/tagsOneOf'
1336 - $ref: '#/components/parameters/tagsAllOf'
1337 - $ref: '#/components/parameters/licenceOneOf'
1338 - $ref: '#/components/parameters/languageOneOf'
1339 - $ref: '#/components/parameters/nsfw'
1340 - $ref: '#/components/parameters/isLocal'
1341 - $ref: '#/components/parameters/include'
1342 - $ref: '#/components/parameters/privacyOneOf'
1343 - $ref: '#/components/parameters/hasHLSFiles'
1344 - $ref: '#/components/parameters/hasWebtorrentFiles'
1345 - $ref: '#/components/parameters/skipCount'
1346 - $ref: '#/components/parameters/start'
1347 - $ref: '#/components/parameters/count'
1348 - $ref: '#/components/parameters/videosSort'
1351 description: successful operation
1355 $ref: '#/components/schemas/VideoListResponse'
1357 '/users/me/subscriptions/{subscriptionHandle}':
1359 summary: Get subscription of my user
1366 - $ref: '#/components/parameters/subscriptionHandle'
1369 description: successful operation
1373 $ref: '#/components/schemas/VideoChannel'
1375 summary: Delete subscription of my user
1382 - $ref: '#/components/parameters/subscriptionHandle'
1385 description: successful operation
1387 /users/me/notifications:
1389 summary: List my notifications
1397 description: only list unread notifications
1400 - $ref: '#/components/parameters/start'
1401 - $ref: '#/components/parameters/count'
1402 - $ref: '#/components/parameters/sort'
1405 description: successful operation
1409 $ref: '#/components/schemas/NotificationListResponse'
1411 /users/me/notifications/read:
1413 summary: Mark notifications as read by their id
1426 description: ids of the notifications to mark as read
1433 description: successful operation
1435 /users/me/notifications/read-all:
1437 summary: Mark all my notification as read
1444 description: successful operation
1446 /users/me/notification-settings:
1448 summary: Update my notification settings
1459 newVideoFromSubscription:
1460 $ref: '#/components/schemas/NotificationSettingValue'
1461 newCommentOnMyVideo:
1462 $ref: '#/components/schemas/NotificationSettingValue'
1464 $ref: '#/components/schemas/NotificationSettingValue'
1465 videoAutoBlacklistAsModerator:
1466 $ref: '#/components/schemas/NotificationSettingValue'
1468 $ref: '#/components/schemas/NotificationSettingValue'
1470 $ref: '#/components/schemas/NotificationSettingValue'
1471 myVideoImportFinished:
1472 $ref: '#/components/schemas/NotificationSettingValue'
1474 $ref: '#/components/schemas/NotificationSettingValue'
1475 newUserRegistration:
1476 $ref: '#/components/schemas/NotificationSettingValue'
1478 $ref: '#/components/schemas/NotificationSettingValue'
1479 newInstanceFollower:
1480 $ref: '#/components/schemas/NotificationSettingValue'
1481 autoInstanceFollowing:
1482 $ref: '#/components/schemas/NotificationSettingValue'
1485 description: successful operation
1487 /users/me/history/videos:
1489 summary: List watched videos history
1495 - $ref: '#/components/parameters/start'
1496 - $ref: '#/components/parameters/count'
1497 - $ref: '#/components/parameters/search'
1500 description: successful operation
1504 $ref: '#/components/schemas/VideoListResponse'
1506 /users/me/history/videos/{videoId}:
1508 summary: Delete history element
1518 $ref: '#/components/schemas/Video/properties/id'
1521 description: successful operation
1523 /users/me/history/videos/remove:
1525 summary: Clear video history
1532 multipart/form-data:
1537 description: history before this date will be deleted
1542 description: successful operation
1544 /users/me/avatar/pick:
1546 summary: Update my user avatar
1553 description: successful operation
1562 $ref: '#/components/schemas/ActorImage'
1564 description: image file too large
1566 X-File-Maximum-Size:
1570 description: Maximum file size for the avatar
1573 multipart/form-data:
1578 description: The file to upload
1583 contentType: image/png, image/jpeg
1587 summary: Delete my avatar
1594 description: successful operation
1598 summary: List video ownership changes
1600 - Video Ownership Change
1605 description: successful operation
1607 '/videos/ownership/{id}/accept':
1609 summary: Accept ownership change request
1611 - Video Ownership Change
1615 - $ref: '#/components/parameters/idOrUUID'
1618 description: successful operation
1620 description: cannot terminate an ownership change of another user
1622 description: video ownership change not found
1624 '/videos/ownership/{id}/refuse':
1626 summary: Refuse ownership change request
1628 - Video Ownership Change
1632 - $ref: '#/components/parameters/idOrUUID'
1635 description: successful operation
1637 description: cannot terminate an ownership change of another user
1639 description: video ownership change not found
1641 '/videos/{id}/give-ownership':
1643 summary: Request ownership change
1645 - Video Ownership Change
1649 - $ref: '#/components/parameters/idOrUUID'
1653 application/x-www-form-urlencoded:
1663 description: successful operation
1665 description: changing video ownership to a remote account is not supported yet
1667 description: video not found
1671 summary: List videos
1672 operationId: getVideos
1676 - $ref: '#/components/parameters/categoryOneOf'
1677 - $ref: '#/components/parameters/isLive'
1678 - $ref: '#/components/parameters/tagsOneOf'
1679 - $ref: '#/components/parameters/tagsAllOf'
1680 - $ref: '#/components/parameters/licenceOneOf'
1681 - $ref: '#/components/parameters/languageOneOf'
1682 - $ref: '#/components/parameters/nsfw'
1683 - $ref: '#/components/parameters/isLocal'
1684 - $ref: '#/components/parameters/include'
1685 - $ref: '#/components/parameters/privacyOneOf'
1686 - $ref: '#/components/parameters/hasHLSFiles'
1687 - $ref: '#/components/parameters/hasWebtorrentFiles'
1688 - $ref: '#/components/parameters/skipCount'
1689 - $ref: '#/components/parameters/start'
1690 - $ref: '#/components/parameters/count'
1691 - $ref: '#/components/parameters/videosSort'
1694 description: successful operation
1698 $ref: '#/components/schemas/VideoListResponse'
1702 summary: List available video categories
1703 operationId: getCategories
1708 description: successful operation
1717 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
1721 summary: List available video licences
1722 operationId: getLicences
1727 description: successful operation
1736 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
1740 summary: List available video languages
1741 operationId: getLanguages
1746 description: successful operation
1755 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
1759 summary: List available video privacy policies
1760 operationId: getPrivacyPolicies
1765 description: successful operation
1774 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
1778 summary: Update a video
1779 operationId: putVideo
1785 - $ref: '#/components/parameters/idOrUUID'
1788 description: successful operation
1791 multipart/form-data:
1796 description: Video thumbnail file
1800 description: Video preview file
1804 $ref: '#/components/schemas/VideoCategorySet'
1806 $ref: '#/components/schemas/VideoLicenceSet'
1808 $ref: '#/components/schemas/VideoLanguageSet'
1810 $ref: '#/components/schemas/VideoPrivacySet'
1812 description: Video description
1815 description: Whether or not we wait transcoding before publish the video
1818 description: A text tell the audience how to support the video creator
1819 example: Please support our work on https://soutenir.framasoft.org/en/ <3
1822 description: Whether or not this video contains sensitive content
1825 description: Video name
1830 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1839 description: Enable or disable comments for this video
1842 description: Enable or disable downloading for this video
1844 originallyPublishedAt:
1845 description: Date when the content was originally published
1849 $ref: '#/components/schemas/VideoScheduledUpdate'
1852 contentType: image/jpeg
1854 contentType: image/jpeg
1856 summary: Get a video
1857 operationId: getVideo
1861 - $ref: '#/components/parameters/idOrUUID'
1864 description: successful operation
1868 $ref: '#/components/schemas/VideoDetails'
1870 summary: Delete a video
1871 operationId: delVideo
1877 - $ref: '#/components/parameters/idOrUUID'
1880 description: successful operation
1882 '/videos/{id}/description':
1884 summary: Get complete video description
1885 operationId: getVideoDesc
1889 - $ref: '#/components/parameters/idOrUUID'
1892 description: successful operation
1901 **[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)**
1903 '/videos/{id}/views':
1905 summary: Add a view to a video
1906 operationId: addView
1910 - $ref: '#/components/parameters/idOrUUID'
1913 description: successful operation
1915 '/videos/{id}/watching':
1917 summary: Set watching progress of a video
1918 operationId: setProgress
1924 - $ref: '#/components/parameters/idOrUUID'
1929 $ref: '#/components/schemas/UserWatchingVideo'
1933 description: successful operation
1937 summary: Upload a video
1938 description: Uses a single request to upload a video.
1939 operationId: uploadLegacy
1947 description: successful operation
1951 $ref: '#/components/schemas/VideoUploadResponse'
1953 description: video didn't pass upload filter
1955 description: upload has timed out
1957 x-summary: video file too large, due to quota or max body size limit set by the reverse-proxy
1959 If the response has no body, it means the reverse-proxy didn't let it through. Otherwise disambiguate via `type`:
1960 - `quota_reached` for quota limits wether daily or global
1962 X-File-Maximum-Size:
1966 description: Maximum file size for the video
1968 description: video type unsupported
1970 description: video unreadable
1973 multipart/form-data:
1975 $ref: '#/components/schemas/VideoUploadRequestLegacy'
1978 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1980 contentType: image/jpeg
1982 contentType: image/jpeg
1987 USERNAME="<your_username>"
1988 PASSWORD="<your_password>"
1989 FILE_PATH="<your_file_path>"
1990 CHANNEL_ID="<your_channel_id>"
1992 API="https://peertube2.cpy.re/api/v1"
1995 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
1996 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
1997 token=$(curl -s "$API/users/token" \
1998 --data client_id="$client_id" \
1999 --data client_secret="$client_secret" \
2000 --data grant_type=password \
2001 --data username="$USERNAME" \
2002 --data password="$PASSWORD" \
2003 | jq -r ".access_token")
2006 curl -s "$API/videos/upload" \
2007 -H "Authorization: Bearer $token" \
2009 --form videofile=@"$FILE_PATH" \
2010 --form channelId=$CHANNEL_ID \
2013 /videos/upload-resumable:
2015 summary: Initialize the resumable upload of a video
2016 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video
2017 operationId: uploadResumableInit
2024 - name: X-Upload-Content-Length
2030 description: Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading.
2031 - name: X-Upload-Content-Type
2038 description: MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.
2043 $ref: '#/components/schemas/VideoUploadRequestResumable'
2046 description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead
2048 description: created
2054 example: /api/v1/videos/upload-resumable?upload_id=471e97554f21dec3b8bb5d4602939c51
2060 x-summary: video file too large, due to quota, absolute max file size or concurrent partial upload limit
2062 Disambiguate via `type`:
2063 - `max_file_size_reached` for the absolute file size limit
2064 - `quota_reached` for quota limits whether daily or global
2066 description: video type unsupported
2068 summary: Send chunk for the resumable upload of a video
2069 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
2070 operationId: uploadResumable
2081 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
2082 not valid anymore and you need to initialize a new upload.
2085 - name: Content-Range
2089 example: bytes 0-262143/2469036
2092 Specifies the bytes in the file that the request is uploading.
2094 For example, a value of `bytes 0-262143/1000000` shows that the request is sending the first
2095 262144 bytes (256 x 1024) in a 2,469,036 byte file.
2096 - name: Content-Length
2103 Size of the chunk that the request is sending.
2105 The chunk size __must be a multiple of 256 KB__, and unlike [Google Resumable](https://developers.google.com/youtube/v3/guides/using_resumable_upload_protocol)
2106 doesn't mandate for chunks to have the same size throughout the upload sequence.
2108 Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from
2109 1048576 bytes (~1MB) and increases or reduces size depending on connection health.
2112 application/octet-stream:
2118 description: last chunk received
2126 $ref: '#/components/schemas/VideoUploadResponse'
2128 description: resume incomplete
2133 example: bytes=0-262143
2139 description: video didn't pass upload filter
2141 description: upload not found
2143 description: chunk doesn't match range
2145 description: video unreadable
2147 description: too many concurrent requests
2149 description: upload is already being processed
2156 summary: Cancel the resumable upload of a video, deleting any data uploaded so far
2157 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video
2158 operationId: uploadResumableCancel
2169 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
2170 not valid anymore and the upload session has already been deleted with its data ;-)
2173 - name: Content-Length
2181 description: upload cancelled
2188 description: upload not found
2192 summary: Import a video
2193 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
2194 operationId: importVideo
2202 multipart/form-data:
2204 $ref: '#/components/schemas/VideoCreateImport'
2207 contentType: application/x-bittorrent
2209 contentType: image/jpeg
2211 contentType: image/jpeg
2214 description: successful operation
2218 $ref: '#/components/schemas/VideoUploadResponse'
2220 description: '`magnetUri` or `targetUrl` or a torrent file missing'
2222 description: video didn't pass pre-import filter
2224 description: HTTP or Torrent/magnetURI import not enabled
2226 /videos/imports/{id}/cancel:
2228 summary: Cancel video import
2229 description: Cancel a pending video import
2235 - $ref: '#/components/parameters/id'
2238 description: successful operation
2240 /videos/imports/{id}:
2242 summary: Delete video import
2243 description: Delete ended video import
2249 - $ref: '#/components/parameters/id'
2252 description: successful operation
2256 summary: Create a live
2257 operationId: addLive
2265 description: successful operation
2269 $ref: '#/components/schemas/VideoUploadResponse'
2271 x-summary: validation error, or conflicting `saveReplay` and `permanentLive` parameter set
2273 Disambiguate via `type`:
2274 - default type for a validation error
2275 - `live_conflicting_permanent_and_save_replay` for conflicting parameters set
2277 x-summary: live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
2279 Disambiguate via `type`:
2280 - `live_not_enabled` for a disabled live feature
2281 - `live_not_allowing_replay` for a disabled replay feature
2282 - `max_instance_lives_limit_reached` for the absolute concurrent live limit
2283 - `max_user_lives_limit_reached` for the user concurrent live limit
2286 multipart/form-data:
2291 description: Channel id that will contain this live video
2296 description: User can stream multiple times in a permanent live
2299 description: User can select live latency mode if enabled by the instance
2300 $ref: '#/components/schemas/LiveVideoLatencyMode'
2302 description: Live video/replay thumbnail file
2306 description: Live video/replay preview file
2310 $ref: '#/components/schemas/VideoPrivacySet'
2312 $ref: '#/components/schemas/VideoCategorySet'
2314 $ref: '#/components/schemas/VideoLicenceSet'
2316 $ref: '#/components/schemas/VideoLanguageSet'
2318 description: Live video/replay description
2321 description: A text tell the audience how to support the creator
2322 example: Please support our work on https://soutenir.framasoft.org/en/ <3
2325 description: Whether or not this live video/replay contains sensitive content
2328 description: Live video/replay name
2333 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
2342 description: Enable or disable comments for this live video/replay
2345 description: Enable or disable downloading for the replay of this live video
2352 contentType: image/jpeg
2354 contentType: image/jpeg
2358 summary: Get information about a live
2359 operationId: getLiveId
2366 - $ref: '#/components/parameters/idOrUUID'
2369 description: successful operation
2373 $ref: '#/components/schemas/LiveVideoResponse'
2375 summary: Update information about a live
2376 operationId: updateLiveId
2383 - $ref: '#/components/parameters/idOrUUID'
2388 $ref: '#/components/schemas/LiveVideoUpdate'
2391 description: successful operation
2393 description: bad parameters or trying to update a live that has already started
2395 description: trying to save replay of the live but saving replay is not enabled on the instance
2399 summary: List my abuses
2400 operationId: getMyAbuses
2409 description: only list the report with this id
2415 $ref: '#/components/schemas/AbuseStateSet'
2416 - $ref: '#/components/parameters/abusesSort'
2417 - $ref: '#/components/parameters/start'
2418 - $ref: '#/components/parameters/count'
2421 description: successful operation
2433 $ref: '#/components/schemas/Abuse'
2437 summary: List abuses
2438 operationId: getAbuses
2448 description: only list the report with this id
2451 - name: predefinedReason
2453 description: predefined reason the listed reports should contain
2455 $ref: '#/components/schemas/PredefinedAbuseReasons'
2458 description: plain search that will match with video titles, reporter names and more
2464 $ref: '#/components/schemas/AbuseStateSet'
2465 - name: searchReporter
2467 description: only list reports of a specific reporter
2470 - name: searchReportee
2471 description: only list reports of a specific reportee
2477 description: only list reports of a specific video
2480 - name: searchVideoChannel
2482 description: only list reports of a specific video channel
2487 description: only list deleted or blocklisted videos
2495 description: only list account, comment or video reports
2502 - $ref: '#/components/parameters/start'
2503 - $ref: '#/components/parameters/count'
2504 - $ref: '#/components/parameters/abusesSort'
2507 description: successful operation
2519 $ref: '#/components/schemas/Abuse'
2521 summary: Report an abuse
2534 description: Reason why the user reports this video
2539 $ref: '#/components/schemas/PredefinedAbuseReasons'
2544 description: Video id to report
2546 - $ref: '#/components/schemas/Video/properties/id'
2550 description: Timestamp in the video that marks the beginning of the report
2555 description: Timestamp in the video that marks the ending of the report
2561 description: Comment id to report
2563 - $ref: '#/components/schemas/VideoComment/properties/id'
2568 description: Account id to report
2574 description: successful operation
2584 $ref: '#/components/schemas/id'
2586 description: incorrect request parameters
2588 '/abuses/{abuseId}':
2590 summary: Update an abuse
2598 - $ref: '#/components/parameters/abuseId'
2606 $ref: '#/components/schemas/AbuseStateSet'
2609 description: Update the report comment visible only to the moderation team
2614 description: successful operation
2616 description: abuse not found
2620 summary: Delete an abuse
2626 - $ref: '#/components/parameters/abuseId'
2629 description: successful operation
2631 description: block not found
2633 '/abuses/{abuseId}/messages':
2635 summary: List messages of an abuse
2641 - $ref: '#/components/parameters/abuseId'
2644 description: successful operation
2656 $ref: '#/components/schemas/AbuseMessage'
2658 summary: Add message to an abuse
2664 - $ref: '#/components/parameters/abuseId'
2673 description: Message to send
2681 description: successful operation
2683 description: incorrect request parameters
2685 '/abuses/{abuseId}/messages/{abuseMessageId}':
2687 summary: Delete an abuse message
2693 - $ref: '#/components/parameters/abuseId'
2694 - $ref: '#/components/parameters/abuseMessageId'
2697 description: successful operation
2699 '/videos/{id}/blacklist':
2701 summary: Block a video
2702 operationId: addVideoBlock
2710 - $ref: '#/components/parameters/idOrUUID'
2713 description: successful operation
2715 summary: Unblock a video by its id
2716 operationId: delVideoBlock
2724 - $ref: '#/components/parameters/idOrUUID'
2727 description: successful operation
2729 description: block not found
2735 summary: List video blocks
2736 operationId: getVideoBlocks
2745 list only blocks that match this type:
2749 - `2`: automatic block that needs review
2757 description: plain search that will match with video titles, and more
2760 - $ref: '#/components/parameters/start'
2761 - $ref: '#/components/parameters/count'
2762 - $ref: '#/components/parameters/blacklistsSort'
2765 description: successful operation
2777 $ref: '#/components/schemas/VideoBlacklist'
2779 /videos/{id}/captions:
2781 summary: List captions of a video
2782 operationId: getVideoCaptions
2786 - $ref: '#/components/parameters/idOrUUID'
2789 description: successful operation
2801 $ref: '#/components/schemas/VideoCaption'
2803 /videos/{id}/captions/{captionLanguage}:
2805 summary: Add or replace a video caption
2806 operationId: addVideoCaption
2813 - $ref: '#/components/parameters/idOrUUID'
2814 - $ref: '#/components/parameters/captionLanguage'
2817 multipart/form-data:
2822 description: The file to upload.
2827 contentType: text/vtt, application/x-subrip, text/plain
2830 description: successful operation
2832 description: video or language not found
2834 summary: Delete a video caption
2835 operationId: delVideoCaption
2842 - $ref: '#/components/parameters/idOrUUID'
2843 - $ref: '#/components/parameters/captionLanguage'
2846 description: successful operation
2848 description: video or language or caption for that language not found
2852 summary: List video channels
2853 operationId: getVideoChannels
2857 - $ref: '#/components/parameters/start'
2858 - $ref: '#/components/parameters/count'
2859 - $ref: '#/components/parameters/sort'
2862 description: successful operation
2866 $ref: '#/components/schemas/VideoChannelList'
2868 summary: Create a video channel
2869 operationId: addVideoChannel
2876 description: successful operation
2886 $ref: '#/components/schemas/id'
2891 $ref: '#/components/schemas/VideoChannelCreate'
2893 '/video-channels/{channelHandle}':
2895 summary: Get a video channel
2896 operationId: getVideoChannel
2900 - $ref: '#/components/parameters/channelHandle'
2903 description: successful operation
2907 $ref: '#/components/schemas/VideoChannel'
2909 summary: Update a video channel
2910 operationId: putVideoChannel
2916 - $ref: '#/components/parameters/channelHandle'
2919 description: successful operation
2924 $ref: '#/components/schemas/VideoChannelUpdate'
2926 summary: Delete a video channel
2927 operationId: delVideoChannel
2933 - $ref: '#/components/parameters/channelHandle'
2936 description: successful operation
2938 '/video-channels/{channelHandle}/videos':
2940 summary: List videos of a video channel
2941 operationId: getVideoChannelVideos
2946 - $ref: '#/components/parameters/channelHandle'
2947 - $ref: '#/components/parameters/categoryOneOf'
2948 - $ref: '#/components/parameters/isLive'
2949 - $ref: '#/components/parameters/tagsOneOf'
2950 - $ref: '#/components/parameters/tagsAllOf'
2951 - $ref: '#/components/parameters/licenceOneOf'
2952 - $ref: '#/components/parameters/languageOneOf'
2953 - $ref: '#/components/parameters/nsfw'
2954 - $ref: '#/components/parameters/isLocal'
2955 - $ref: '#/components/parameters/include'
2956 - $ref: '#/components/parameters/privacyOneOf'
2957 - $ref: '#/components/parameters/hasHLSFiles'
2958 - $ref: '#/components/parameters/hasWebtorrentFiles'
2959 - $ref: '#/components/parameters/skipCount'
2960 - $ref: '#/components/parameters/start'
2961 - $ref: '#/components/parameters/count'
2962 - $ref: '#/components/parameters/videosSort'
2965 description: successful operation
2969 $ref: '#/components/schemas/VideoListResponse'
2971 '/video-channels/{channelHandle}/followers':
2975 summary: 'List followers of a video channel'
2978 operationId: getVideoChannelFollowers
2980 - $ref: '#/components/parameters/channelHandle'
2981 - $ref: '#/components/parameters/start'
2982 - $ref: '#/components/parameters/count'
2983 - $ref: '#/components/parameters/followersSort'
2984 - $ref: '#/components/parameters/search'
2987 description: successful operation
2999 $ref: '#/components/schemas/Follow'
3001 '/video-channels/{channelHandle}/avatar/pick':
3003 summary: Update channel avatar
3009 - $ref: '#/components/parameters/channelHandle'
3012 description: successful operation
3021 $ref: '#/components/schemas/ActorImage'
3023 description: image file too large
3025 X-File-Maximum-Size:
3029 description: Maximum file size for the avatar
3032 multipart/form-data:
3037 description: The file to upload.
3042 contentType: image/png, image/jpeg
3044 '/video-channels/{channelHandle}/avatar':
3046 summary: Delete channel avatar
3052 - $ref: '#/components/parameters/channelHandle'
3055 description: successful operation
3057 '/video-channels/{channelHandle}/banner/pick':
3059 summary: Update channel banner
3065 - $ref: '#/components/parameters/channelHandle'
3068 description: successful operation
3077 $ref: '#/components/schemas/ActorImage'
3079 description: image file too large
3081 X-File-Maximum-Size:
3085 description: Maximum file size for the banner
3088 multipart/form-data:
3093 description: The file to upload.
3098 contentType: image/png, image/jpeg
3100 '/video-channels/{channelHandle}/banner':
3102 summary: Delete channel banner
3108 - $ref: '#/components/parameters/channelHandle'
3111 description: successful operation
3113 /video-playlists/privacies:
3115 summary: List available playlist privacy policies
3116 operationId: getPlaylistPrivacyPolicies
3121 description: successful operation
3130 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
3134 summary: List video playlists
3135 operationId: getPlaylists
3139 - $ref: '#/components/parameters/start'
3140 - $ref: '#/components/parameters/count'
3141 - $ref: '#/components/parameters/sort'
3144 description: successful operation
3156 $ref: '#/components/schemas/VideoPlaylist'
3158 summary: Create a video playlist
3159 description: If the video playlist is set as public, `videoChannelId` is mandatory.
3160 operationId: addPlaylist
3167 description: successful operation
3177 $ref: '#/components/schemas/VideoPlaylist/properties/id'
3179 $ref: '#/components/schemas/VideoPlaylist/properties/uuid'
3181 $ref: '#/components/schemas/VideoPlaylist/properties/shortUUID'
3184 multipart/form-data:
3189 description: Video playlist display name
3194 description: Video playlist thumbnail file
3198 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
3200 description: Video playlist description
3206 - $ref: '#/components/schemas/id'
3207 description: Video channel in which the playlist will be published
3212 contentType: image/jpeg
3214 /video-playlists/{playlistId}:
3216 summary: Get a video playlist
3220 - $ref: '#/components/parameters/playlistId'
3223 description: successful operation
3227 $ref: '#/components/schemas/VideoPlaylist'
3229 summary: Update a video playlist
3230 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
3237 description: successful operation
3239 - $ref: '#/components/parameters/playlistId'
3242 multipart/form-data:
3247 description: Video playlist display name
3252 description: Video playlist thumbnail file
3256 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
3258 description: Video playlist description
3262 - $ref: '#/components/schemas/id'
3263 description: Video channel in which the playlist will be published
3266 contentType: image/jpeg
3268 summary: Delete a video playlist
3274 - $ref: '#/components/parameters/playlistId'
3277 description: successful operation
3279 /video-playlists/{playlistId}/videos:
3281 summary: 'List videos of a playlist'
3282 operationId: getVideoPlaylistVideos
3287 - $ref: '#/components/parameters/playlistId'
3288 - $ref: '#/components/parameters/start'
3289 - $ref: '#/components/parameters/count'
3292 description: successful operation
3296 $ref: '#/components/schemas/VideoListResponse'
3298 summary: Add a video in a playlist
3299 operationId: addVideoPlaylistVideo
3306 - $ref: '#/components/parameters/playlistId'
3309 description: successful operation
3315 videoPlaylistElement:
3329 - $ref: '#/components/schemas/Video/properties/uuid'
3330 - $ref: '#/components/schemas/Video/properties/id'
3331 description: Video to add in the playlist
3335 description: Start the video at this specific timestamp
3339 description: Stop the video at this specific timestamp
3343 /video-playlists/{playlistId}/videos/reorder:
3345 summary: 'Reorder a playlist'
3346 operationId: reorderVideoPlaylist
3352 - $ref: '#/components/parameters/playlistId'
3355 description: successful operation
3364 description: 'Start position of the element to reorder'
3366 insertAfterPosition:
3368 description: 'New position for the block to reorder, to add the block before the first element'
3372 description: 'How many element from `startPosition` to reorder'
3376 - insertAfterPosition
3378 /video-playlists/{playlistId}/videos/{playlistElementId}:
3380 summary: Update a playlist element
3381 operationId: putVideoPlaylistVideo
3387 - $ref: '#/components/parameters/playlistId'
3388 - $ref: '#/components/parameters/playlistElementId'
3391 description: successful operation
3401 description: Start the video at this specific timestamp
3405 description: Stop the video at this specific timestamp
3407 summary: Delete an element from a playlist
3408 operationId: delVideoPlaylistVideo
3414 - $ref: '#/components/parameters/playlistId'
3415 - $ref: '#/components/parameters/playlistElementId'
3418 description: successful operation
3420 '/users/me/video-playlists/videos-exist':
3422 summary: Check video exists in my playlists
3431 description: The video ids to check
3435 $ref: '#/components/schemas/Video/properties/id'
3438 description: successful operation
3460 '/accounts/{name}/video-channels':
3462 summary: List video channels of an account
3467 - $ref: '#/components/parameters/name'
3470 description: include view statistics for the last 30 days (only if authentified as the account user)
3473 - $ref: '#/components/parameters/start'
3474 - $ref: '#/components/parameters/count'
3475 - $ref: '#/components/parameters/sort'
3478 description: successful operation
3482 $ref: '#/components/schemas/VideoChannelList'
3484 '/accounts/{name}/ratings':
3486 summary: List ratings of an account
3492 - $ref: '#/components/parameters/name'
3493 - $ref: '#/components/parameters/start'
3494 - $ref: '#/components/parameters/count'
3495 - $ref: '#/components/parameters/sort'
3499 description: Optionally filter which ratings to retrieve
3507 description: successful operation
3513 $ref: '#/components/schemas/VideoRating'
3515 '/videos/{id}/comment-threads':
3517 summary: List threads of a video
3521 - $ref: '#/components/parameters/idOrUUID'
3522 - $ref: '#/components/parameters/start'
3523 - $ref: '#/components/parameters/count'
3524 - $ref: '#/components/parameters/commentsSort'
3527 description: successful operation
3531 $ref: '#/components/schemas/CommentThreadResponse'
3533 summary: Create a thread
3539 - $ref: '#/components/parameters/idOrUUID'
3542 description: successful operation
3546 $ref: '#/components/schemas/CommentThreadPostResponse'
3548 description: video does not exist
3557 - $ref: '#/components/schemas/VideoComment/properties/text'
3563 '/videos/{id}/comment-threads/{threadId}':
3565 summary: Get a thread
3569 - $ref: '#/components/parameters/idOrUUID'
3570 - $ref: '#/components/parameters/threadId'
3573 description: successful operation
3577 $ref: '#/components/schemas/VideoCommentThreadTree'
3579 '/videos/{id}/comments/{commentId}':
3581 summary: Reply to a thread of a video
3587 - $ref: '#/components/parameters/idOrUUID'
3588 - $ref: '#/components/parameters/commentId'
3591 description: successful operation
3595 $ref: '#/components/schemas/CommentThreadPostResponse'
3597 description: thread or video does not exist
3606 - $ref: '#/components/schemas/VideoComment/properties/text'
3612 summary: Delete a comment or a reply
3618 - $ref: '#/components/parameters/idOrUUID'
3619 - $ref: '#/components/parameters/commentId'
3622 description: successful operation
3624 description: cannot remove comment of another user
3626 description: comment or video does not exist
3628 description: comment is already deleted
3630 '/videos/{id}/rate':
3632 summary: Like/dislike a video
3638 - $ref: '#/components/parameters/idOrUUID'
3654 description: successful operation
3656 description: video does not exist
3660 summary: Delete video HLS files
3666 operationId: delVideoHLS
3668 - $ref: '#/components/parameters/idOrUUID'
3671 description: successful operation
3673 description: video does not exist
3674 '/videos/{id}/webtorrent':
3676 summary: Delete video WebTorrent files
3682 operationId: delVideoWebTorrent
3684 - $ref: '#/components/parameters/idOrUUID'
3687 description: successful operation
3689 description: video does not exist
3691 '/videos/{id}/transcoding':
3693 summary: Create a transcoding job
3699 operationId: createVideoTranscoding
3701 - $ref: '#/components/parameters/idOrUUID'
3717 description: successful operation
3719 description: video does not exist
3725 summary: Search videos
3726 operationId: searchVideos
3731 allowEmptyValue: false
3733 String to search. If the user can make a remote URI search, and the string is an URI then the
3734 PeerTube instance will fetch the remote object and add it to its database. Then,
3735 you can use the REST API to fetch the complete video information and interact with it.
3738 - $ref: '#/components/parameters/categoryOneOf'
3739 - $ref: '#/components/parameters/isLive'
3740 - $ref: '#/components/parameters/tagsOneOf'
3741 - $ref: '#/components/parameters/tagsAllOf'
3742 - $ref: '#/components/parameters/licenceOneOf'
3743 - $ref: '#/components/parameters/languageOneOf'
3744 - $ref: '#/components/parameters/nsfw'
3745 - $ref: '#/components/parameters/isLocal'
3746 - $ref: '#/components/parameters/include'
3747 - $ref: '#/components/parameters/privacyOneOf'
3748 - $ref: '#/components/parameters/hasHLSFiles'
3749 - $ref: '#/components/parameters/hasWebtorrentFiles'
3750 - $ref: '#/components/parameters/skipCount'
3751 - $ref: '#/components/parameters/start'
3752 - $ref: '#/components/parameters/count'
3753 - $ref: '#/components/parameters/searchTarget'
3754 - $ref: '#/components/parameters/videosSearchSort'
3757 description: Get videos that are published after this date
3763 description: Get videos that are published before this date
3767 - name: originallyPublishedStartDate
3769 description: Get videos that are originally published after this date
3773 - name: originallyPublishedEndDate
3775 description: Get videos that are originally published before this date
3781 description: Get videos that have this minimum duration
3786 description: Get videos that have this maximum duration
3790 'searchTarget === search-index':
3791 $ref: '#/components/callbacks/searchIndex'
3794 description: successful operation
3798 $ref: '#/components/schemas/VideoListResponse'
3800 description: search index unavailable
3802 /search/video-channels:
3806 summary: Search channels
3807 operationId: searchChannels
3813 String to search. If the user can make a remote URI search, and the string is an URI then the
3814 PeerTube instance will fetch the remote object and add it to its database. Then,
3815 you can use the REST API to fetch the complete channel information and interact with it.
3818 - $ref: '#/components/parameters/start'
3819 - $ref: '#/components/parameters/count'
3820 - $ref: '#/components/parameters/searchTarget'
3821 - $ref: '#/components/parameters/sort'
3823 'searchTarget === search-index':
3824 $ref: '#/components/callbacks/searchIndex'
3827 description: successful operation
3831 $ref: '#/components/schemas/VideoChannelList'
3833 description: search index unavailable
3835 /search/video-playlists:
3839 summary: Search playlists
3840 operationId: searchPlaylists
3846 String to search. If the user can make a remote URI search, and the string is an URI then the
3847 PeerTube instance will fetch the remote object and add it to its database. Then,
3848 you can use the REST API to fetch the complete playlist information and interact with it.
3851 - $ref: '#/components/parameters/start'
3852 - $ref: '#/components/parameters/count'
3853 - $ref: '#/components/parameters/searchTarget'
3854 - $ref: '#/components/parameters/sort'
3856 'searchTarget === search-index':
3857 $ref: '#/components/callbacks/searchIndex'
3860 description: successful operation
3872 $ref: '#/components/schemas/VideoPlaylist'
3874 description: search index unavailable
3881 summary: Get block status of accounts/hosts
3886 description: 'Check if these accounts are blocked'
3887 example: [ 'goofy@example.com', 'donald@example.com' ]
3895 description: 'Check if these hosts are blocked'
3896 example: [ 'example.com' ]
3903 description: successful operation
3907 $ref: '#/components/schemas/BlockStatus'
3909 /server/blocklist/accounts:
3913 summary: List account blocks
3918 - $ref: '#/components/parameters/start'
3919 - $ref: '#/components/parameters/count'
3920 - $ref: '#/components/parameters/sort'
3923 description: successful operation
3927 summary: Block an account
3939 example: chocobozzz@example.org
3940 description: account to block, in the form `username@domain`
3945 description: successful operation
3947 description: self-blocking forbidden
3949 '/server/blocklist/accounts/{accountName}':
3953 summary: Unblock an account by its handle
3961 description: account to unblock, in the form `username@domain`
3966 description: successful operation
3968 description: account or account block does not exist
3970 /server/blocklist/servers:
3974 summary: List server blocks
3979 - $ref: '#/components/parameters/start'
3980 - $ref: '#/components/parameters/count'
3981 - $ref: '#/components/parameters/sort'
3984 description: successful operation
3988 summary: Block a server
4001 description: server domain to block
4006 description: successful operation
4008 description: self-blocking forbidden
4010 '/server/blocklist/servers/{host}':
4014 summary: Unblock a server by its domain
4022 description: server domain to unblock
4028 description: successful operation
4030 description: account block does not exist
4032 /server/redundancy/{host}:
4035 - Instance Redundancy
4036 summary: Update a server redundancy policy
4044 description: server domain to mirror
4056 description: allow mirroring of the host's local videos
4061 description: successful operation
4063 description: server is not already known
4065 /server/redundancy/videos:
4069 summary: List videos being mirrored
4070 operationId: getMirroredVideos
4078 description: direction of the mirror
4084 - $ref: '#/components/parameters/start'
4085 - $ref: '#/components/parameters/count'
4086 - $ref: '#/components/parameters/videoRedundanciesSort'
4089 description: successful operation
4095 $ref: '#/components/schemas/VideoRedundancy'
4099 summary: Mirror a video
4100 operationId: putMirroredVideo
4111 $ref: '#/components/schemas/Video/properties/id'
4116 description: successful operation
4118 description: cannot mirror a local video
4120 description: video does not exist
4122 description: video is already mirrored
4124 /server/redundancy/videos/{redundancyId}:
4128 summary: Delete a mirror done on a video
4129 operationId: delMirroredVideo
4134 - name: redundancyId
4137 description: id of an existing redundancy on a video
4142 description: successful operation
4144 description: video redundancy not found
4146 '/feeds/video-comments.{format}':
4150 summary: List comments on videos
4151 operationId: getSyndicatedComments
4156 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
4169 description: 'limit listing to a specific video'
4174 description: 'limit listing to a specific account'
4179 description: 'limit listing to a specific account'
4182 - name: videoChannelId
4184 description: 'limit listing to a specific video channel'
4187 - name: videoChannelName
4189 description: 'limit listing to a specific video channel'
4194 description: successful operation
4199 default: 'max-age=900' # 15 min cache
4203 $ref: '#/components/schemas/VideoCommentsForXML'
4206 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
4207 application/rss+xml:
4209 $ref: '#/components/schemas/VideoCommentsForXML'
4212 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
4215 $ref: '#/components/schemas/VideoCommentsForXML'
4218 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
4219 application/atom+xml:
4221 $ref: '#/components/schemas/VideoCommentsForXML'
4224 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
4230 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
4232 x-summary: field inconsistencies
4235 - videoId filter is mixed with a channel filter
4237 description: video, video channel or account not found
4239 description: accept header unsupported
4241 '/feeds/videos.{format}':
4245 summary: List videos
4246 operationId: getSyndicatedVideos
4251 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
4264 description: 'limit listing to a specific account'
4269 description: 'limit listing to a specific account'
4272 - name: videoChannelId
4274 description: 'limit listing to a specific video channel'
4277 - name: videoChannelName
4279 description: 'limit listing to a specific video channel'
4282 - $ref: '#/components/parameters/sort'
4283 - $ref: '#/components/parameters/nsfw'
4284 - $ref: '#/components/parameters/isLocal'
4285 - $ref: '#/components/parameters/include'
4286 - $ref: '#/components/parameters/privacyOneOf'
4287 - $ref: '#/components/parameters/hasHLSFiles'
4288 - $ref: '#/components/parameters/hasWebtorrentFiles'
4291 description: successful operation
4296 default: 'max-age=900' # 15 min cache
4300 $ref: '#/components/schemas/VideosForXML'
4303 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
4304 application/rss+xml:
4306 $ref: '#/components/schemas/VideosForXML'
4309 externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
4312 $ref: '#/components/schemas/VideosForXML'
4315 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
4316 application/atom+xml:
4318 $ref: '#/components/schemas/VideosForXML'
4321 externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
4327 externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
4329 description: video channel or account not found
4331 description: accept header unsupported
4333 '/feeds/subscriptions.{format}':
4338 summary: List videos of subscriptions tied to a token
4339 operationId: getSyndicatedSubscriptionVideos
4344 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
4357 description: limit listing to a specific account
4363 description: private token allowing access
4367 - $ref: '#/components/parameters/sort'
4368 - $ref: '#/components/parameters/nsfw'
4369 - $ref: '#/components/parameters/isLocal'
4370 - $ref: '#/components/parameters/include'
4371 - $ref: '#/components/parameters/privacyOneOf'
4372 - $ref: '#/components/parameters/hasHLSFiles'
4373 - $ref: '#/components/parameters/hasWebtorrentFiles'
4376 description: successful operation
4381 default: 'max-age=900' # 15 min cache
4385 $ref: '#/components/schemas/VideosForXML'
4386 application/rss+xml:
4388 $ref: '#/components/schemas/VideosForXML'
4391 $ref: '#/components/schemas/VideosForXML'
4392 application/atom+xml:
4394 $ref: '#/components/schemas/VideosForXML'
4399 description: accept header unsupported
4405 summary: List plugins
4406 operationId: getPlugins
4419 - $ref: '#/components/parameters/start'
4420 - $ref: '#/components/parameters/count'
4421 - $ref: '#/components/parameters/sort'
4424 description: successful operation
4428 $ref: '#/components/schemas/PluginResponse'
4434 summary: List available plugins
4435 operationId: getAvailablePlugins
4448 - name: currentPeerTubeEngine
4452 - $ref: '#/components/parameters/start'
4453 - $ref: '#/components/parameters/count'
4454 - $ref: '#/components/parameters/sort'
4457 description: successful operation
4461 $ref: '#/components/schemas/PluginResponse'
4463 description: plugin index unavailable
4469 summary: Install a plugin
4470 operationId: addPlugin
4483 example: peertube-plugin-auth-ldap
4486 additionalProperties: false
4493 additionalProperties: false
4496 description: successful operation
4498 description: should have either `npmName` or `path` set
4504 summary: Update a plugin
4505 operationId: updatePlugin
4518 example: peertube-plugin-auth-ldap
4521 additionalProperties: false
4528 additionalProperties: false
4531 description: successful operation
4533 description: should have either `npmName` or `path` set
4535 description: existing plugin not found
4541 summary: Uninstall a plugin
4542 operationId: uninstallPlugin
4554 description: name of the plugin/theme in its package.json
4555 example: peertube-plugin-auth-ldap
4560 description: successful operation
4562 description: existing plugin not found
4568 summary: Get a plugin
4569 operationId: getPlugin
4574 - $ref: '#/components/parameters/npmName'
4577 description: successful operation
4581 $ref: '#/components/schemas/Plugin'
4583 description: plugin not found
4585 /plugins/{npmName}/settings:
4589 summary: Set a plugin's settings
4594 - $ref: '#/components/parameters/npmName'
4603 additionalProperties: true
4606 description: successful operation
4608 description: plugin not found
4610 /plugins/{npmName}/public-settings:
4614 summary: Get a plugin's public settings
4616 - $ref: '#/components/parameters/npmName'
4619 description: successful operation
4624 additionalProperties: true
4626 description: plugin not found
4628 /plugins/{npmName}/registered-settings:
4632 summary: Get a plugin's registered settings
4637 - $ref: '#/components/parameters/npmName'
4640 description: successful operation
4645 additionalProperties: true
4647 description: plugin not found
4650 - url: 'https://peertube2.cpy.re/api/v1'
4651 description: Live Test Server (live data - latest nightly version)
4652 - url: 'https://peertube3.cpy.re/api/v1'
4653 description: Live Test Server (live data - latest RC version)
4654 - url: 'https://peertube.cpy.re/api/v1'
4655 description: Live Test Server (live data - stable version)
4662 description: Offset used to paginate results
4670 description: "Number of items to return"
4680 description: Sort column
4688 description: Plain text search, applied to various parts of the model depending on endpoint
4696 If the administrator enabled search index support, you can override the default search target.
4699 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
4700 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
4701 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
4702 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
4703 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
4704 * 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
4705 the data from the origin instance API
4715 description: Sort videos by criteria
4731 description: Sort videos by criteria
4746 description: Sort comments by criteria
4756 description: Sort blocklists by criteria
4772 description: Plain text search that will match with user usernames or emails
4779 description: Filter results down to (un)banned users
4786 description: Sort users by criteria
4797 description: Sort abuses by criteria
4804 videoRedundanciesSort:
4808 description: Sort abuses by criteria
4817 description: Sort followers by criteria
4826 description: The username or handle of the account
4829 example: chocobozzz | chocobozzz@example.org
4834 description: Entity id
4836 $ref: '#/components/schemas/id'
4841 description: The object id, uuid or short uuid
4844 - $ref: '#/components/schemas/id'
4845 - $ref: '#/components/schemas/UUIDv4'
4846 - $ref: '#/components/schemas/shortUUID'
4851 description: Playlist id
4853 $ref: '#/components/schemas/VideoPlaylist/properties/id'
4855 name: playlistElementId
4858 description: Playlist element id
4860 $ref: '#/components/schemas/id'
4865 description: Abuse id
4867 $ref: '#/components/schemas/Abuse/properties/id'
4869 name: abuseMessageId
4872 description: Abuse message id
4874 $ref: '#/components/schemas/AbuseMessage/properties/id'
4876 name: captionLanguage
4879 description: The caption language
4881 $ref: '#/components/schemas/VideoLanguageSet'
4886 description: The video channel handle
4889 example: my_username | my_username@example.com
4891 name: subscriptionHandle
4894 description: The subscription handle
4897 example: my_username | my_username@example.com
4902 description: The thread id (root comment id)
4909 description: The comment id
4911 $ref: '#/components/schemas/VideoComment/properties/id'
4916 description: whether or not the video is a live
4923 description: category id of the video (see [/videos/categories](#operation/getCategories))
4926 - $ref: '#/components/schemas/VideoCategorySet'
4929 $ref: '#/components/schemas/VideoCategorySet'
4936 description: tag(s) of the video
4950 description: tag(s) of the video, where all should be present in the video
4963 description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language
4966 - $ref: '#/components/schemas/VideoLanguageSet'
4969 $ref: '#/components/schemas/VideoLanguageSet'
4976 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4979 - $ref: '#/components/schemas/VideoLicenceSet'
4982 $ref: '#/components/schemas/VideoLicenceSet'
4989 description: if you don't need the `total` in the response
5000 description: whether to include nsfw videos, if any
5012 description: '**PeerTube >= 4.0** Display only local or remote videos'
5019 description: '**PeerTube >= 4.0** Display only videos that have HLS files'
5021 name: hasWebtorrentFiles
5026 description: '**PeerTube >= 4.0** Display only videos that have WebTorrent files'
5032 $ref: '#/components/schemas/VideoPrivacySet'
5033 description: '**PeerTube >= 4.0** Display only videos in this specific privacy/privacies'
5047 **PeerTube >= 4.0** Include additional videos in results (can be combined using bitwise or operator)
5051 - `1` NOT_PUBLISHED_STATE
5062 description: list of uris to check if each is part of the user subscriptions
5072 description: name of the plugin/theme on npmjs.com or in its package.json
5075 example: peertube-plugin-auth-ldap
5080 description: job type
5084 - activitypub-follow
5085 - activitypub-http-broadcast
5086 - activitypub-http-fetcher
5087 - activitypub-http-unicast
5092 - videos-views-stats
5093 - activitypub-refresher
5118 Authenticating via OAuth requires the following steps:
5119 - Have an activated account
5120 - [Generate] an access token for that account at `/api/v1/users/token`.
5121 - Make requests with the *Authorization: Bearer <token\>* header
5122 - Profit, depending on the role assigned to the account
5124 Note that the __access token is valid for 1 day__ and is given
5125 along with a __refresh token valid for 2 weeks__.
5127 [Generate]: https://docs.joinpeertube.org/api-rest-getting-started
5131 tokenUrl: /api/v1/users/token
5134 moderator: Moderator scope
5137 # Resuable core properties
5145 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
5146 pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
5151 description: translation of a uuid v4 with a bigger alphabet to have a shorter uuid
5152 example: 2y84q2MQUMWPbiEcxNXMgC
5155 description: immutable name of the user, used to find or mention its actor
5157 pattern: '/^[a-z0-9._]+$/'
5162 description: immutable name of the channel, used to interact with its actor
5163 example: framasoft_videos
5164 pattern: '/^[a-zA-Z0-9\\-_.:]+$/'
5175 description: category id of the video (see [/videos/categories](#operation/getCategories))
5177 VideoConstantNumber-Category:
5180 $ref: '#/components/schemas/VideoCategorySet'
5183 example: Science & Technology
5187 description: licence id of the video (see [/videos/licences](#operation/getLicences))
5189 VideoConstantNumber-Licence:
5192 $ref: '#/components/schemas/VideoLicenceSet'
5195 example: Attribution - Share Alike
5199 description: language id of the video (see [/videos/languages](#operation/getLanguages))
5201 VideoConstantString-Language:
5204 $ref: '#/components/schemas/VideoLanguageSet'
5209 VideoPlaylistPrivacySet:
5215 description: Video playlist privacy policy (see [/video-playlists/privacies])
5216 VideoPlaylistPrivacyConstant:
5219 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
5223 VideoPlaylistTypeSet:
5228 description: The video playlist type (Regular = `1`, Watch Later = `2`)
5229 VideoPlaylistTypeConstant:
5232 $ref: '#/components/schemas/VideoPlaylistTypeSet'
5243 description: privacy id of the video (see [/videos/privacies](#operation/getPrivacyPolicies))
5244 VideoPrivacyConstant:
5247 $ref: '#/components/schemas/VideoPrivacySet'
5255 additionalProperties:
5256 x-additionalPropertiesName: account
5265 additionalProperties:
5266 x-additionalPropertiesName: host
5287 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
5294 description: 'Admin flags for the user (None = `0`, Bypass video blocklist = `1`)'
5297 LiveVideoLatencyMode:
5303 description: 'The live latency mode (Default = `1`, HIght latency = `2`, Small Latency = `3`)'
5313 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
5323 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
5327 $ref: '#/components/schemas/AbuseStateSet'
5330 AbusePredefinedReasons:
5343 example: [spamOrMisleading]
5348 Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`)
5350 `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos.
5352 VideoResolutionConstant:
5353 description: resolutions and their labels for the video
5356 $ref: '#/components/schemas/VideoResolutionSet'
5360 VideoScheduledUpdate:
5363 $ref: '#/components/schemas/VideoPrivacySet'
5367 description: When to update the video
5387 $ref: '#/components/schemas/ActorImage'
5388 VideoChannelSummary:
5391 $ref: '#/components/schemas/id'
5405 $ref: '#/components/schemas/ActorImage'
5419 - $ref: '#/components/schemas/Video'
5426 description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file
5427 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5429 $ref: '#/components/schemas/VideoResolutionConstant'
5432 description: Video file size in bytes
5435 description: Direct URL of the torrent file
5439 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
5443 description: Direct URL of the video
5447 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
5451 description: Frames per second of the video file
5455 description: URL dereferencing the output of ffprobe on the file
5456 VideoStreamingPlaylists:
5461 $ref: '#/components/schemas/id'
5469 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS'
5470 VideoStreamingPlaylists-HLS:
5481 Video files associated to this playlist.
5483 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.)
5485 $ref: '#/components/schemas/VideoFile'
5497 $ref: '#/components/schemas/Video/properties/id'
5499 $ref: '#/components/schemas/Video/properties/uuid'
5501 $ref: '#/components/schemas/Video/properties/name'
5505 description: object id for the video
5507 - $ref: '#/components/schemas/id'
5509 description: universal identifier for the video, that can be used across instances
5511 - $ref: '#/components/schemas/UUIDv4'
5514 - $ref: '#/components/schemas/shortUUID'
5520 example: 2017-10-01T10:52:46.396Z
5521 description: time at which the video object was first drafted
5525 example: 2018-10-01T10:52:46.396Z
5526 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
5530 example: 2021-05-04T08:01:01.502Z
5531 description: last time the video's metadata was modified
5532 originallyPublishedAt:
5535 example: 2010-10-01T10:52:46.396Z
5536 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
5539 - $ref: '#/components/schemas/VideoConstantNumber-Category'
5540 description: category in which the video is classified
5543 - $ref: '#/components/schemas/VideoConstantNumber-Licence'
5544 description: licence under which the video is distributed
5547 - $ref: '#/components/schemas/VideoConstantString-Language'
5548 description: main language used in the video
5551 - $ref: '#/components/schemas/VideoPrivacyConstant'
5552 description: privacy policy used to distribute the video
5556 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n
5557 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr...
5561 truncated description of the video, written in Markdown.
5562 Resolve `descriptionPath` to get the full description of maximum `10000` characters.
5567 description: duration of the video in seconds
5572 description: title of the video
5573 example: What is PeerTube?
5578 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5581 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5584 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
5601 - $ref: '#/components/schemas/VideoStateConstant'
5602 description: represents the internal state of the video processing within the PeerTube instance
5606 - $ref: '#/components/schemas/VideoScheduledUpdate'
5614 $ref: '#/components/schemas/AccountSummary'
5616 $ref: '#/components/schemas/VideoChannelSummary'
5625 - $ref: '#/components/schemas/Video'
5630 description: If the video is a live, you have the amount of current viewers
5633 example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description
5634 description: path at which to get the full description of maximum `10000` characters
5637 description: A text tell the audience how to support the video creator
5638 example: Please support our work on https://soutenir.framasoft.org/en/ <3
5642 $ref: '#/components/schemas/VideoChannel'
5644 $ref: '#/components/schemas/Account'
5646 example: [flowers, gardening]
5664 - https://peertube2.cpy.re/tracker/announce
5665 - wss://peertube2.cpy.re/tracker/socket
5669 $ref: '#/components/schemas/VideoFile'
5671 WebTorrent/raw video files. If WebTorrent is disabled on the server:
5673 - field will be empty
5674 - video files will be found in `streamingPlaylists[].files` field
5678 $ref: '#/components/schemas/VideoStreamingPlaylists'
5680 HLS playlists/manifest files. If HLS is disabled on the server:
5682 - field will be empty
5683 - video files will be found in `files` field
5684 FileRedundancyInformation:
5687 $ref: '#/components/schemas/id'
5712 $ref: '#/components/schemas/id'
5719 $ref: '#/components/schemas/UUIDv4'
5726 $ref: '#/components/schemas/FileRedundancyInformation'
5730 $ref: '#/components/schemas/FileRedundancyInformation'
5731 VideoImportStateConstant:
5739 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
5746 additionalProperties: false
5750 $ref: '#/components/schemas/VideoImport/properties/targetUrl'
5751 required: [targetUrl]
5754 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
5755 required: [magnetUri]
5758 $ref: '#/components/schemas/VideoImport/properties/torrentfile'
5759 required: [torrentfile]
5760 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5769 - $ref: '#/components/schemas/id'
5773 description: remote URL where to find the import's source video
5774 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
5778 description: magnet URI allowing to resolve the import's source video
5779 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5784 description: Torrent file containing only the video file
5791 - $ref: '#/components/schemas/VideoImportStateConstant'
5807 - $ref: '#/components/schemas/Video'
5817 $ref: '#/components/schemas/VideoImport'
5821 $ref: '#/components/schemas/id'
5824 example: The video is a spam
5828 $ref: '#/components/schemas/AbusePredefinedReasons'
5830 $ref: '#/components/schemas/Account'
5832 $ref: '#/components/schemas/AbuseStateConstant'
5835 example: Decided to ban the server since it spams us regularly
5839 $ref: '#/components/schemas/VideoInfo'
5846 $ref: '#/components/schemas/id'
5857 $ref: '#/components/schemas/AccountSummary'
5861 $ref: '#/components/schemas/id'
5863 $ref: '#/components/schemas/Video/properties/id'
5875 $ref: '#/components/schemas/UUIDv4'
5893 $ref: '#/components/schemas/id'
5895 $ref: '#/components/schemas/UUIDv4'
5898 - $ref: '#/components/schemas/shortUUID'
5921 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
5923 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
5925 $ref: '#/components/schemas/AccountSummary'
5927 $ref: '#/components/schemas/VideoChannelSummary'
5931 $ref: '#/components/schemas/id'
5938 description: Text of the comment
5940 example: This video is wonderful!
5942 $ref: '#/components/schemas/id'
5946 - $ref: '#/components/schemas/id'
5948 $ref: '#/components/schemas/Video/properties/id'
5963 totalRepliesFromVideoAuthor:
5970 $ref: '#/components/schemas/Account'
5971 VideoCommentThreadTree:
5974 $ref: '#/components/schemas/VideoComment'
5978 $ref: '#/components/schemas/VideoCommentThreadTree'
5982 $ref: '#/components/schemas/VideoConstantString-Language'
6000 $ref: '#/components/schemas/id'
6011 $ref: '#/components/schemas/ActorImage'
6015 $ref: '#/components/schemas/id'
6020 description: immutable name of the actor, used to find or mention it
6022 - $ref: '#/components/schemas/username'
6026 description: server on which the actor is resident
6027 hostRedundancyAllowed:
6029 description: whether this actor's host allows redundancy of its videos
6033 description: number of actors subscribed to by this actor, as seen by this instance
6037 description: number of followers of this actor, as seen by this instance
6046 - $ref: '#/components/schemas/Actor'
6049 description: object id for the user tied to this account
6051 - $ref: '#/components/schemas/User/properties/id'
6054 description: editable name of the account, displayed in its representations
6059 description: text or bio displayed on the account's profile
6065 description: timestamp within the video, in seconds
6132 allowedForCurrentIP:
6134 requiresEmailVerification:
6152 $ref: '#/components/schemas/VideoResolutionSet'
6237 example: 16810141515
6346 requiresEmailVerification:
6361 description: Settings that apply to new users, if registration is enabled
6365 example: 16810141515
6371 description: Settings pertaining to transcoding jobs
6375 allowAdditionalExtensions:
6377 description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos
6380 description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
6383 description: Amount of threads used by ffmpeg for 1 transcoding job
6386 description: Amount of transcoding jobs to execute in parallel
6392 New profiles can be added by plugins ; available in core PeerTube: 'default'.
6395 description: Resolutions to transcode _new videos_ to
6417 description: WebTorrent-specific settings
6423 description: HLS-specific settings
6473 $ref: '#/components/schemas/id'
6475 $ref: '#/components/schemas/Actor'
6477 $ref: '#/components/schemas/Actor'
6480 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
6493 PredefinedAbuseReasons:
6494 description: Reason categories that help triage reports
6512 $ref: '#/components/schemas/id'
6524 - activitypub-http-unicast
6525 - activitypub-http-broadcast
6526 - activitypub-http-fetcher
6527 - activitypub-follow
6532 - videos-views-stats
6533 - activitypub-refresher
6537 additionalProperties: true
6540 additionalProperties: true
6556 $ref: '#/components/schemas/id'
6561 $ref: '#/components/schemas/id'
6562 VideoUploadRequestCommon:
6565 description: Video name
6567 example: What is PeerTube?
6571 description: Channel id that will contain this video
6576 $ref: '#/components/schemas/VideoPrivacySet'
6578 $ref: '#/components/schemas/VideoCategorySet'
6580 $ref: '#/components/schemas/VideoLicenceSet'
6582 $ref: '#/components/schemas/VideoLanguageSet'
6584 description: Video description
6587 **[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)**
6589 description: Whether or not we wait transcoding before publish the video
6592 description: A text tell the audience how to support the video creator
6593 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6596 description: Whether or not this video contains sensitive content
6599 description: Video tags (maximum 5 tags each between 2 and 30 characters)
6612 description: Enable or disable comments for this video
6615 description: Enable or disable downloading for this video
6617 originallyPublishedAt:
6618 description: Date when the content was originally published
6622 $ref: '#/components/schemas/VideoScheduledUpdate'
6624 description: Video thumbnail file
6628 description: Video preview file
6634 VideoUploadRequestLegacy:
6636 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6642 description: Video file
6645 VideoUploadRequestResumable:
6647 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6653 description: Video filename including extension
6656 example: what_is_peertube.mp4
6658 description: Video thumbnail file
6662 description: Video preview file
6665 VideoUploadResponse:
6671 $ref: '#/components/schemas/Video/properties/id'
6673 $ref: '#/components/schemas/Video/properties/uuid'
6675 $ref: '#/components/schemas/Video/properties/shortUUID'
6676 CommentThreadResponse:
6685 $ref: '#/components/schemas/VideoComment'
6686 CommentThreadPostResponse:
6689 $ref: '#/components/schemas/VideoComment'
6699 $ref: '#/components/schemas/Video'
6703 $ref: '#/components/schemas/Account'
6706 description: Automatically start playing the upcoming video after the currently playing video
6707 autoPlayNextVideoPlaylist:
6709 description: Automatically start playing the video on the playlist after the currently playing video
6712 description: Automatically start playing the video on the watch page
6722 description: The user email
6725 description: Has the user confirmed their email address?
6728 - $ref: '#/components/schemas/id'
6732 description: Auth plugin to use to authenticate the user
6736 noInstanceConfigWarningModal:
6738 noAccountSetupWarningModal:
6743 $ref: '#/components/schemas/NSFWPolicy'
6745 $ref: '#/components/schemas/UserRole'
6754 description: Theme enabled by this user
6756 $ref: '#/components/schemas/username'
6760 $ref: '#/components/schemas/VideoChannel'
6763 description: The user video quota in bytes
6767 description: The user daily video quota in bytes
6771 description: Enable P2P in the player
6774 - $ref: '#/components/schemas/User'
6776 # optionally present fields: they require WITH_STATS scope
6779 description: Count of videos published
6782 description: Count of reports/abuses of which the user is a target
6783 abusesAcceptedCount:
6785 description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team
6788 description: Count of reports/abuses created by the user
6791 description: Count of comments published
6795 $ref: '#/components/schemas/username'
6797 $ref: '#/components/schemas/password'
6801 description: The user email
6804 description: The user video quota in bytes
6808 description: The user daily video quota in bytes
6811 $ref: '#/components/schemas/usernameChannel'
6813 $ref: '#/components/schemas/UserRole'
6815 $ref: '#/components/schemas/UserAdminFlags'
6826 description: The updated email of the user
6828 - $ref: '#/components/schemas/User/properties/email'
6831 description: Set the email as verified
6834 description: The updated video quota of the user in bytes
6837 description: The updated daily video quota of the user in bytes
6841 description: The auth plugin to use to authenticate the user
6842 example: 'peertube-plugin-auth-saml2'
6844 $ref: '#/components/schemas/UserRole'
6846 $ref: '#/components/schemas/UserAdminFlags'
6848 $ref: '#/components/schemas/password'
6850 # see shared/models/users/user-update-me.model.ts:
6853 $ref: '#/components/schemas/password'
6855 $ref: '#/components/schemas/password'
6857 description: new email used for login and service communications
6859 - $ref: '#/components/schemas/User/properties/email'
6862 description: new name of the user in its representations
6867 description: new NSFW display policy
6874 description: whether to enable P2P in the player or not
6877 description: new preference regarding playing videos automatically
6880 description: new preference regarding playing following videos automatically
6881 autoPlayNextVideoPlaylist:
6883 description: new preference regarding playing following playlist videos automatically
6884 videosHistoryEnabled:
6886 description: whether to keep track of watched history or not
6891 description: list of languages to filter videos down to
6894 noInstanceConfigWarningModal:
6896 noAccountSetupWarningModal:
6903 $ref: '#/components/schemas/id'
6910 description: Rating of the video
6917 $ref: '#/components/schemas/Video'
6924 description: Rating of the video
6931 description: immutable name of the user, used to find or mention its actor
6933 - $ref: '#/components/schemas/username'
6935 $ref: '#/components/schemas/password'
6939 description: email of the user, used for login or service communications
6942 description: editable name of the user, displayed in its representations
6947 description: channel base information used to create the first channel of the user
6950 $ref: '#/components/schemas/usernameChannel'
6962 pattern: /^[a-z0-9]$/
6965 example: v1ikx5hnfop4mdpnci8nsqh93c45rldf
6968 pattern: /^[a-zA-Z0-9]$/
6971 example: AjWiOapPltI6EnsWQwlFarRtLh4u8tDt
6972 OAuthToken-password:
6974 - $ref: '#/components/schemas/OAuthClient'
6984 $ref: '#/components/schemas/User/properties/username'
6986 $ref: '#/components/schemas/password'
6993 OAuthToken-refresh_token:
6995 - $ref: '#/components/schemas/OAuthClient'
7006 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
7015 - $ref: '#/components/schemas/Actor'
7020 description: editable name of the channel, displayed in its representations
7021 example: Videos of Framasoft
7026 example: Videos made with <3 by Framasoft
7031 description: text shown by default on all videos of this channel, to tell the audience how to support it
7032 example: Please support our work on https://soutenir.framasoft.org/en/ <3
7045 $ref: '#/components/schemas/ActorImage'
7054 $ref: '#/components/schemas/UUIDv4'
7057 - $ref: '#/components/schemas/VideoChannel'
7060 description: username of the channel to create
7062 - $ref: '#/components/schemas/usernameChannel'
7068 - $ref: '#/components/schemas/VideoChannel'
7070 bulkVideosSupportUpdate:
7072 description: Update the support field for all videos of this channel
7082 - $ref: '#/components/schemas/VideoChannel'
7083 - $ref: '#/components/schemas/Actor'
7088 name: 'media:peerLink'
7097 - application/x-bittorrent
7103 name: 'media:content'
7134 VideoCommentsForXML:
7169 description: video watch page URL
7172 description: video canonical URL
7176 description: video publication date
7179 description: video description
7182 description: video description
7185 description: publisher user name
7188 description: video category (MRSS)
7191 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
7206 description: video embed path, relative to the canonical URL domain (MRSS)
7215 description: video watch path, relative to the canonical URL domain (MRSS)
7236 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
7237 'media:description':
7244 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
7247 description: main streamable file for the video
7257 - application/x-bittorrent
7266 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)
7269 - $ref: '#/components/schemas/MRSSPeerLink'
7270 - $ref: '#/components/schemas/MRSSGroupContent'
7271 NotificationSettingValue:
7288 $ref: '#/components/schemas/id'
7292 Notification type, following the `UserNotificationType` enum:
7294 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
7296 - `2` NEW_COMMENT_ON_MY_VIDEO
7298 - `3` NEW_ABUSE_FOR_MODERATORS
7300 - `4` BLACKLIST_ON_MY_VIDEO
7302 - `5` UNBLACKLIST_ON_MY_VIDEO
7304 - `6` MY_VIDEO_PUBLISHED
7306 - `7` MY_VIDEO_IMPORT_SUCCESS
7308 - `8` MY_VIDEO_IMPORT_ERROR
7310 - `9` NEW_USER_REGISTRATION
7314 - `11` COMMENT_MENTION
7316 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
7318 - `13` NEW_INSTANCE_FOLLOWER
7320 - `14` AUTO_INSTANCE_FOLLOWING
7322 - `15` ABUSE_STATE_CHANGE
7324 - `16` ABUSE_NEW_MESSAGE
7326 - `17` NEW_PLUGIN_VERSION
7328 - `18` NEW_PEERTUBE_VERSION
7334 - $ref: '#/components/schemas/VideoInfo'
7338 $ref: '#/components/schemas/ActorInfo'
7344 $ref: '#/components/schemas/id'
7347 $ref: '#/components/schemas/VideoInfo'
7352 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
7362 $ref: '#/components/schemas/id'
7366 $ref: '#/components/schemas/VideoInfo'
7368 $ref: '#/components/schemas/ActorInfo'
7374 $ref: '#/components/schemas/id'
7377 - $ref: '#/components/schemas/VideoInfo'
7383 $ref: '#/components/schemas/id'
7386 - $ref: '#/components/schemas/VideoInfo'
7390 - $ref: '#/components/schemas/ActorInfo'
7396 $ref: '#/components/schemas/id'
7398 $ref: '#/components/schemas/ActorInfo'
7426 NotificationListResponse:
7435 $ref: '#/components/schemas/Notification'
7440 example: peertube-plugin-auth-ldap
7468 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
7471 additionalProperties: true
7487 $ref: '#/components/schemas/Plugin'
7494 description: User can stream multiple times in a permanent live
7497 description: User can select live latency mode if enabled by the instance
7498 $ref: '#/components/schemas/LiveVideoLatencyMode'
7508 description: RTMP stream key to use to stream into this live video
7512 description: User can stream multiple times in a permanent live
7515 description: User can select live latency mode if enabled by the instance
7516 $ref: '#/components/schemas/LiveVideoLatencyMode'
7520 'https://search.example.org/api/v1/search/videos':
7522 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
7525 description: successful operation
7529 $ref: '#/components/schemas/VideoListResponse'