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 with 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
44 HTTP 1.1 404 Not Found
45 Content-Type: application/json
49 "error": "Account not found"
53 We provide error codes for [a growing number of cases](https://github.com/Chocobozzz/PeerTube/blob/develop/shared/models/server/server-error-code.enum.ts),
54 but it is still optional.
58 Each parameter is evaluated on its own against a set of rules before the route validator
59 proceeds with potential testing involving parameter combinations. Errors coming from Validation
60 errors appear earlier and benefit from a more detailed error type:
63 HTTP 1.1 400 Bad Request
64 Content-Type: application/json
69 "value": "a117eb-c6a9-4756-bb09-2a956239f",
70 "msg": "Should have a valid id",
78 Where `id` is the name of the field concerned by the error, within the route definition.
79 `errors.<field>.location` can be either 'params', 'body', 'header', 'query' or 'cookies', and
80 `errors.<field>.value` reports the value that didn't pass validation whose `errors.<field>.msg`
85 We are rate-limiting all endpoints of PeerTube's API. Custom values can be set by administrators:
87 | Endpoint (prefix: `/api/v1`) | Calls | Time frame |
88 |------------------------------|---------------|--------------|
89 | `/*` | 50 | 10 seconds |
90 | `POST /users/token` | 15 | 5 minutes |
91 | `POST /users/register` | 2<sup>*</sup> | 5 minutes |
92 | `POST /users/ask-send-verify-email` | 3 | 5 minutes |
94 Depending on the endpoint, <sup>*</sup>failed requests are not taken into account. A service
95 limit is announced by a `429 Too Many Requests` status code.
97 You can get details about the current state of your rate limit by reading the
100 | Header | Description |
101 |-------------------------|------------------------------------------------------------|
102 | `X-RateLimit-Limit` | Number of max requests allowed in the current time period |
103 | `X-RateLimit-Remaining` | Number of remaining requests in the current time period |
104 | `X-RateLimit-Reset` | Timestamp of end of current time period as UNIX timestamp |
105 | `Retry-After` | Seconds to delay after the first `429` is received |
109 This API features [Cross-Origin Resource Sharing (CORS)](https://fetch.spec.whatwg.org/),
110 allowing cross-domain communication from the browser for some routes:
113 |------------------------- ---|
117 | `/live/segments-sha256/*` |
118 | `/.well-known/webfinger` |
120 In addition, all routes serving ActivityPub are CORS-enabled for all origins.
122 url: https://docs.joinpeertube.org/api-rest-reference.html
126 As a visitor, you can use this API to open an account (if registrations are open on
127 that PeerTube instance). As an admin, you should use the dedicated [User creation
128 API](#operation/createUser) instead.
130 x-displayName: Login/Logout
132 Sessions deal with access tokens over time. Only __one session token can currently be used at a time__.
135 Accounts encompass remote accounts discovered across the federation,
136 and correspond to the main Actor, along with video channels a user can create, which
139 When a comment is posted, it is done with your Account's Actor.
142 Using some features of PeerTube require authentication, for which User
143 provide different levels of permission as well as associated user
144 information. Each user has a corresponding local Account for federation.
147 Operations related to your own User, when logged-in.
148 - name: My Subscriptions
150 Operations related to your subscriptions to video channels, their
151 new videos, and how to keep up to date with their latest publications!
154 Operations related to your watch history.
155 - name: My Notifications
157 Notifications following new videos, follows or reports. They allow you
158 to keep track of the interactions and overall important information that
159 concerns you. You MAY set per-notification type delivery preference, to
160 receive the info either by mail, by in-browser notification or both.
163 Each server exposes public information regarding supported videos and
167 Jobs are long-running tasks enqueued and processed by the instance
168 itself. No additional worker registration is currently available.
169 - name: Instance Follows
171 Managing servers which the instance interacts with is crucial to the
172 concept of federation in PeerTube and external video indexation. The PeerTube
173 server then deals with inter-server ActivityPub operations and propagates
174 information across its social graph by posting activities to actors' inbox
177 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-follows
178 - name: Instance Redundancy
180 Redundancy is part of the inter-server solidarity that PeerTube fosters.
181 Manage the list of instances you wish to help by seeding their videos according
182 to the policy of video selection of your choice. Note that you have a similar functionality
183 to mirror individual videos, see [video mirroring](#tag/Video-Mirroring).
185 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-redundancy
188 Managing plugins installed from a local path or from NPM, or search for new ones.
190 url: https://docs.joinpeertube.org/api-plugins
193 Abuses deal with reports of local or remote videos/comments/accounts alike.
196 Operations dealing with listing, uploading, fetching or modifying videos.
199 Operations dealing with adding video or audio. PeerTube supports two upload modes, and three import modes.
203 - [_legacy_](#operation/uploadLegacy), where the video file is sent in a single request
204 - [_resumable_](#operation/uploadResumableInit), where the video file is sent in chunks
206 You can upload videos more reliably by using the resumable variant. Its protocol lets
207 you resume an upload operation after a network interruption or other transmission failure,
208 saving time and bandwidth in the event of network failures.
210 Favor using resumable uploads in any of the following cases:
211 - You are transferring large files
212 - The likelihood of a network interruption is high
213 - Uploads are originating from a device with a low-bandwidth or unstable Internet connection,
214 such as a mobile device
218 - _URL_-based: where the URL points to any service supported by [youtube-dl](https://ytdl-org.github.io/youtube-dl/)
219 - _magnet_-based: where the URI resolves to a BitTorrent ressource containing a single supported video file
220 - _torrent_-based: where the metainfo file resolves to a BitTorrent ressource containing a single supported video file
222 The import function is practical when the desired video/audio is available online. It makes PeerTube
223 download it for you, saving you as much bandwidth and avoiding any instability or limitation your network might have.
224 - name: Video Captions
225 description: Operations dealing with listing, adding and removing closed captions of a video.
226 - name: Video Channels
227 description: Operations dealing with the creation, modification and listing of videos within a channel.
228 - name: Video Comments
230 Operations dealing with comments to a video. Comments are organized in threads: adding a
231 comment in response to the video starts a thread, adding a reply to a comment adds it to
232 its root comment thread.
234 description: Operations dealing with blocking videos (removing them from view and preventing interactions).
236 description: Like/dislike a video.
237 - name: Video Playlists
238 description: Operations dealing with playlists of videos. Playlists are bound to users and/or channels.
240 description: Server syndication feeds
243 The search helps to find _videos_ or _channels_ from within the instance and beyond.
244 Videos from other instances federated by the instance (that is, instances
245 followed by the instance) can be found via keywords and other criteria of
248 Administrators can also enable the use of a remote search system, indexing
249 videos and channels not could be not federated by the instance.
250 - name: Video Mirroring
252 PeerTube instances can mirror videos from one another, and help distribute some videos.
254 For importing videos as your own, refer to [video imports](#operation/importVideo).
277 - Video Ownership Change
290 - name: Instance Configuration
294 - Instance Redundancy
304 summary: Get an account
305 operationId: getAccount
307 - $ref: '#/components/parameters/name'
310 description: successful operation
314 $ref: '#/components/schemas/Account'
316 description: account not found
318 '/accounts/{name}/videos':
323 summary: 'List videos of an account'
324 operationId: getAccountVideos
326 - $ref: '#/components/parameters/name'
327 - $ref: '#/components/parameters/categoryOneOf'
328 - $ref: '#/components/parameters/isLive'
329 - $ref: '#/components/parameters/tagsOneOf'
330 - $ref: '#/components/parameters/tagsAllOf'
331 - $ref: '#/components/parameters/licenceOneOf'
332 - $ref: '#/components/parameters/languageOneOf'
333 - $ref: '#/components/parameters/nsfw'
334 - $ref: '#/components/parameters/filter'
335 - $ref: '#/components/parameters/skipCount'
336 - $ref: '#/components/parameters/start'
337 - $ref: '#/components/parameters/count'
338 - $ref: '#/components/parameters/videosSort'
341 description: successful operation
345 $ref: '#/components/schemas/VideoListResponse'
349 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
350 .then(function(response) {
351 return response.json()
352 }).then(function(data) {
358 curl -s https://peertube2.cpy.re/api/v1/accounts/{name}/videos | jq
364 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
366 http = Net::HTTP.new(uri.host, uri.port)
369 response = http.get(uri.request_uri)
371 puts JSON.parse(response.read_body)
376 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
385 summary: List accounts
386 operationId: getAccounts
388 - $ref: '#/components/parameters/start'
389 - $ref: '#/components/parameters/count'
390 - $ref: '#/components/parameters/sort'
393 description: successful operation
399 $ref: '#/components/schemas/Account'
405 summary: Get instance public configuration
406 operationId: getConfig
409 description: successful operation
413 $ref: '#/components/schemas/ServerConfig'
416 externalValue: https://peertube2.cpy.re/api/v1/config
420 summary: Get instance "About" information
421 operationId: getAbout
426 description: successful operation
430 $ref: '#/components/schemas/ServerConfigAbout'
433 externalValue: https://peertube2.cpy.re/api/v1/config/about
437 summary: Get instance runtime configuration
438 operationId: getCustomConfig
446 description: successful operation
450 $ref: '#/components/schemas/ServerConfigCustom'
452 summary: Set instance runtime configuration
453 operationId: putCustomConfig
461 description: successful operation
463 x-summary: field inconsistencies
466 - the emailer is disabled and the instance is open to registrations
467 - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
469 summary: Delete instance runtime configuration
470 operationId: delCustomConfig
478 description: successful operation
482 summary: List instance jobs
493 description: The state of the job ('' for for no filter)
503 - $ref: '#/components/parameters/jobType'
504 - $ref: '#/components/parameters/start'
505 - $ref: '#/components/parameters/count'
506 - $ref: '#/components/parameters/sort'
509 description: successful operation
522 $ref: '#/components/schemas/Job'
528 summary: List instances following the server
530 - $ref: '#/components/parameters/followState'
531 - $ref: '#/components/parameters/actorType'
532 - $ref: '#/components/parameters/start'
533 - $ref: '#/components/parameters/count'
534 - $ref: '#/components/parameters/sort'
537 description: successful operation
549 $ref: '#/components/schemas/Follow'
551 '/server/followers/{nameWithHost}':
553 summary: Remove or reject a follower to your server
563 description: The remote actor handle to remove from your followers
569 description: successful operation
571 description: follower not found
573 '/server/followers/{nameWithHost}/reject':
575 summary: Reject a pending follower to your server
585 description: The remote actor handle to remove from your followers
591 description: successful operation
593 description: follower not found
595 '/server/followers/{nameWithHost}/accept':
597 summary: Accept a pending follower to your server
607 description: The remote actor handle to remove from your followers
613 description: successful operation
615 description: follower not found
621 summary: List instances followed by the server
623 - $ref: '#/components/parameters/followState'
624 - $ref: '#/components/parameters/actorType'
625 - $ref: '#/components/parameters/start'
626 - $ref: '#/components/parameters/count'
627 - $ref: '#/components/parameters/sort'
630 description: successful operation
642 $ref: '#/components/schemas/Follow'
649 summary: Follow a list of servers
652 description: successful operation
654 description: cannot follow a non-HTTPS server
668 '/server/following/{host}':
670 summary: Unfollow a server
680 description: The host to unfollow
686 description: successful operation
688 description: host not found
692 summary: Create a user
693 operationId: createUser
701 description: user created
705 $ref: '#/components/schemas/AddUserResponse'
709 operationId: getUserId
711 id: '$response.body#/user/id'
714 operationId: putUserId
716 id: '$response.body#/user/id'
719 operationId: delUserId
721 id: '$response.body#/user/id'
723 description: insufficient authority to create an admin or moderator
728 $ref: '#/components/schemas/AddUser'
730 If the smtp server is configured, you can leave the password empty and an email will be sent
731 asking the user to set it first.
735 operationId: getUsers
742 - $ref: '#/components/parameters/usersSearch'
743 - $ref: '#/components/parameters/usersBlocked'
744 - $ref: '#/components/parameters/start'
745 - $ref: '#/components/parameters/count'
746 - $ref: '#/components/parameters/usersSort'
749 description: successful operation
755 $ref: '#/components/schemas/User'
759 - $ref: '#/components/parameters/id'
761 summary: Delete a user
767 operationId: delUserId
770 description: successful operation
777 operationId: getUserId
781 description: include statistics about the user (only available as a moderator/admin)
786 x-summary: successful operation
788 As an admin/moderator, you can request a response augmented with statistics about the user's
789 moderation relations and videos usage, by using the `withStats` parameter.
794 - $ref: '#/components/schemas/User'
795 - $ref: '#/components/schemas/UserWithStats'
797 summary: Update a user
802 operationId: putUserId
805 description: successful operation
810 $ref: '#/components/schemas/UpdateUser'
813 /oauth-clients/local:
815 summary: Login prerequisite
816 description: You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken).
817 operationId: getOAuthClient
822 description: successful operation
826 $ref: '#/components/schemas/OAuthClient'
828 UseOAuthClientToLogin:
829 operationId: getOAuthToken
831 client_id: '$response.body#/client_id'
832 client_secret: '$response.body#/client_secret'
836 API="https://peertube2.cpy.re/api/v1"
839 curl -s "$API/oauth-clients/local"
844 operationId: getOAuthToken
845 description: With your [client id and secret](#operation/getOAuthClient), you can retrieve an access and refresh tokens.
850 application/x-www-form-urlencoded:
853 - $ref: '#/components/schemas/OAuthToken-password'
854 - $ref: '#/components/schemas/OAuthToken-refresh_token'
856 propertyName: grant_type
858 password: '#/components/schemas/OAuthToken-password'
859 refresh_token: '#/components/schemas/OAuthToken-refresh_token'
862 description: successful operation
873 example: 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0
874 description: valid for 1 day
877 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
878 description: valid for 2 weeks
883 refresh_token_expires_in:
891 API="https://peertube2.cpy.re/api/v1"
892 USERNAME="<your_username>"
893 PASSWORD="<your_password>"
896 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
897 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
898 curl -s "$API/users/token" \
899 --data client_id="$client_id" \
900 --data client_secret="$client_secret" \
901 --data grant_type=password \
902 --data username="$USERNAME" \
903 --data password="$PASSWORD" \
904 | jq -r ".access_token"
909 description: Revokes your access token and its associated refresh token, destroying your current session.
910 operationId: revokeOAuthToken
917 description: successful operation
921 summary: Register a user
922 operationId: registerUser
928 description: successful operation
933 $ref: '#/components/schemas/RegisterUser'
936 /users/{id}/verify-email:
938 summary: Verify a user
939 operationId: verifyUser
941 Following a user registration, the new user will receive an email asking to click a link
947 - $ref: '#/components/parameters/id'
963 description: successful operation
965 description: invalid verification string
967 description: user not found
969 /users/ask-send-verify-email:
971 summary: Resend user verification link
972 operationId: resendEmailToVerifyUser
978 description: successful operation
982 summary: Get my user information
983 operationId: getUserInfo
991 description: successful operation
997 $ref: '#/components/schemas/User'
999 summary: Update my user information
1000 operationId: putUserInfo
1008 description: successful operation
1013 $ref: '#/components/schemas/UpdateMe'
1016 /users/me/videos/imports:
1018 summary: Get video imports of my user
1026 - $ref: '#/components/parameters/start'
1027 - $ref: '#/components/parameters/count'
1028 - $ref: '#/components/parameters/sort'
1031 description: successful operation
1035 $ref: '#/components/schemas/VideoImportsList'
1037 /users/me/video-quota-used:
1039 summary: Get my user used quota
1047 description: successful operation
1055 description: The user video quota used so far in bytes
1056 example: 16810141515
1057 videoQuotaUsedDaily:
1059 description: The user video quota used today in bytes
1062 '/users/me/videos/{videoId}/rating':
1064 summary: Get rate of my user for a video
1074 description: The video id
1076 $ref: '#/components/schemas/Video/properties/id'
1079 description: successful operation
1083 $ref: '#/components/schemas/GetMeVideoRating'
1087 summary: Get videos of my user
1095 - $ref: '#/components/parameters/start'
1096 - $ref: '#/components/parameters/count'
1097 - $ref: '#/components/parameters/sort'
1100 description: successful operation
1104 $ref: '#/components/schemas/VideoListResponse'
1106 /users/me/subscriptions:
1108 summary: Get my user subscriptions
1115 - $ref: '#/components/parameters/start'
1116 - $ref: '#/components/parameters/count'
1117 - $ref: '#/components/parameters/sort'
1120 description: successful operation
1124 $ref: '#/components/schemas/VideoChannelList'
1128 summary: Add subscription to my user
1141 description: uri of the video channels to subscribe to
1147 uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr
1150 description: successful operation
1152 /users/me/subscriptions/exist:
1154 summary: Get if subscriptions exist for my user
1161 - $ref: '#/components/parameters/subscriptionsUris'
1164 description: successful operation
1170 /users/me/subscriptions/videos:
1172 summary: List videos of subscriptions of my user
1180 - $ref: '#/components/parameters/categoryOneOf'
1181 - $ref: '#/components/parameters/isLive'
1182 - $ref: '#/components/parameters/tagsOneOf'
1183 - $ref: '#/components/parameters/tagsAllOf'
1184 - $ref: '#/components/parameters/licenceOneOf'
1185 - $ref: '#/components/parameters/languageOneOf'
1186 - $ref: '#/components/parameters/nsfw'
1187 - $ref: '#/components/parameters/filter'
1188 - $ref: '#/components/parameters/skipCount'
1189 - $ref: '#/components/parameters/start'
1190 - $ref: '#/components/parameters/count'
1191 - $ref: '#/components/parameters/videosSort'
1194 description: successful operation
1198 $ref: '#/components/schemas/VideoListResponse'
1200 '/users/me/subscriptions/{subscriptionHandle}':
1202 summary: Get subscription of my user
1209 - $ref: '#/components/parameters/subscriptionHandle'
1212 description: successful operation
1216 $ref: '#/components/schemas/VideoChannel'
1218 summary: Delete subscription of my user
1225 - $ref: '#/components/parameters/subscriptionHandle'
1228 description: successful operation
1230 /users/me/notifications:
1232 summary: List my notifications
1240 description: only list unread notifications
1243 - $ref: '#/components/parameters/start'
1244 - $ref: '#/components/parameters/count'
1245 - $ref: '#/components/parameters/sort'
1248 description: successful operation
1252 $ref: '#/components/schemas/NotificationListResponse'
1254 /users/me/notifications/read:
1256 summary: Mark notifications as read by their id
1269 description: ids of the notifications to mark as read
1276 description: successful operation
1278 /users/me/notifications/read-all:
1280 summary: Mark all my notification as read
1287 description: successful operation
1289 /users/me/notification-settings:
1291 summary: Update my notification settings
1302 newVideoFromSubscription:
1303 $ref: '#/components/schemas/NotificationSettingValue'
1304 newCommentOnMyVideo:
1305 $ref: '#/components/schemas/NotificationSettingValue'
1307 $ref: '#/components/schemas/NotificationSettingValue'
1308 videoAutoBlacklistAsModerator:
1309 $ref: '#/components/schemas/NotificationSettingValue'
1311 $ref: '#/components/schemas/NotificationSettingValue'
1313 $ref: '#/components/schemas/NotificationSettingValue'
1314 myVideoImportFinished:
1315 $ref: '#/components/schemas/NotificationSettingValue'
1317 $ref: '#/components/schemas/NotificationSettingValue'
1318 newUserRegistration:
1319 $ref: '#/components/schemas/NotificationSettingValue'
1321 $ref: '#/components/schemas/NotificationSettingValue'
1322 newInstanceFollower:
1323 $ref: '#/components/schemas/NotificationSettingValue'
1324 autoInstanceFollowing:
1325 $ref: '#/components/schemas/NotificationSettingValue'
1328 description: successful operation
1330 /users/me/history/videos:
1332 summary: List watched videos history
1338 - $ref: '#/components/parameters/start'
1339 - $ref: '#/components/parameters/count'
1340 - $ref: '#/components/parameters/search'
1343 description: successful operation
1347 $ref: '#/components/schemas/VideoListResponse'
1349 /users/me/history/videos/remove:
1351 summary: Clear video history
1358 multipart/form-data:
1363 description: history before this date will be deleted
1368 description: successful operation
1370 /users/me/avatar/pick:
1372 summary: Update my user avatar
1379 description: successful operation
1386 $ref: '#/components/schemas/ActorImage'
1388 description: image file too large
1390 X-File-Maximum-Size:
1394 description: Maximum file size for the avatar
1397 multipart/form-data:
1402 description: The file to upload
1407 contentType: image/png, image/jpeg
1411 summary: Delete my avatar
1418 description: successful operation
1422 summary: List video ownership changes
1424 - Video Ownership Change
1429 description: successful operation
1431 '/videos/ownership/{id}/accept':
1433 summary: Accept ownership change request
1435 - Video Ownership Change
1439 - $ref: '#/components/parameters/idOrUUID'
1442 description: successful operation
1444 description: cannot terminate an ownership change of another user
1446 description: video owneship change not found
1448 '/videos/ownership/{id}/refuse':
1450 summary: Refuse ownership change request
1452 - Video Ownership Change
1456 - $ref: '#/components/parameters/idOrUUID'
1459 description: successful operation
1461 description: cannot terminate an ownership change of another user
1463 description: video owneship change not found
1465 '/videos/{id}/give-ownership':
1467 summary: Request ownership change
1469 - Video Ownership Change
1473 - $ref: '#/components/parameters/idOrUUID'
1477 application/x-www-form-urlencoded:
1487 description: successful operation
1489 description: changing video ownership to a remote account is not supported yet
1491 description: video not found
1495 summary: List videos
1499 - $ref: '#/components/parameters/categoryOneOf'
1500 - $ref: '#/components/parameters/isLive'
1501 - $ref: '#/components/parameters/tagsOneOf'
1502 - $ref: '#/components/parameters/tagsAllOf'
1503 - $ref: '#/components/parameters/licenceOneOf'
1504 - $ref: '#/components/parameters/languageOneOf'
1505 - $ref: '#/components/parameters/nsfw'
1506 - $ref: '#/components/parameters/filter'
1507 - $ref: '#/components/parameters/skipCount'
1508 - $ref: '#/components/parameters/start'
1509 - $ref: '#/components/parameters/count'
1510 - $ref: '#/components/parameters/videosSort'
1513 description: successful operation
1517 $ref: '#/components/schemas/VideoListResponse'
1521 summary: List available video categories
1522 operationId: getCategories
1527 description: successful operation
1536 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
1540 summary: List available video licences
1541 operationId: getLicences
1546 description: successful operation
1555 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
1559 summary: List available video languages
1560 operationId: getLanguages
1565 description: successful operation
1574 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
1578 summary: List available video privacy policies
1579 operationId: getPrivacyPolicies
1584 description: successful operation
1593 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
1597 summary: Update a video
1598 operationId: putVideo
1604 - $ref: '#/components/parameters/idOrUUID'
1607 description: successful operation
1610 multipart/form-data:
1615 description: Video thumbnail file
1619 description: Video preview file
1623 $ref: '#/components/schemas/VideoCategorySet'
1625 $ref: '#/components/schemas/VideoLicenceSet'
1627 $ref: '#/components/schemas/VideoLanguageSet'
1629 $ref: '#/components/schemas/VideoPrivacySet'
1631 description: Video description
1634 description: Whether or not we wait transcoding before publish the video
1637 description: A text tell the audience how to support the video creator
1638 example: Please support our work on https://soutenir.framasoft.org/en/ <3
1641 description: Whether or not this video contains sensitive content
1644 description: Video name
1649 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1658 description: Enable or disable comments for this video
1660 originallyPublishedAt:
1661 description: Date when the content was originally published
1665 $ref: '#/components/schemas/VideoScheduledUpdate'
1668 contentType: image/jpeg
1670 contentType: image/jpeg
1672 summary: Get a video
1673 operationId: getVideo
1677 - $ref: '#/components/parameters/idOrUUID'
1680 description: successful operation
1684 $ref: '#/components/schemas/VideoDetails'
1686 summary: Delete a video
1687 operationId: delVideo
1693 - $ref: '#/components/parameters/idOrUUID'
1696 description: successful operation
1698 '/videos/{id}/description':
1700 summary: Get complete video description
1701 operationId: getVideoDesc
1705 - $ref: '#/components/parameters/idOrUUID'
1708 description: successful operation
1717 **[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)**
1719 '/videos/{id}/views':
1721 summary: Add a view to a video
1725 - $ref: '#/components/parameters/idOrUUID'
1728 description: successful operation
1730 '/videos/{id}/watching':
1732 summary: Set watching progress of a video
1738 - $ref: '#/components/parameters/idOrUUID'
1743 $ref: '#/components/schemas/UserWatchingVideo'
1747 description: successful operation
1751 summary: Upload a video
1752 description: Uses a single request to upload a video.
1753 operationId: uploadLegacy
1761 description: successful operation
1765 $ref: '#/components/schemas/VideoUploadResponse'
1767 description: invalid file field, schedule date or parameter
1769 description: video didn't pass upload filter
1771 description: upload has timed out
1773 description: video file too large, due to quota or max body size limit set by the reverse-proxy
1775 X-File-Maximum-Size:
1779 description: Maximum file size for the video
1781 description: video type unsupported
1783 description: video unreadable
1786 multipart/form-data:
1788 $ref: '#/components/schemas/VideoUploadRequestLegacy'
1791 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1793 contentType: image/jpeg
1795 contentType: image/jpeg
1800 USERNAME="<your_username>"
1801 PASSWORD="<your_password>"
1802 FILE_PATH="<your_file_path>"
1803 CHANNEL_ID="<your_channel_id>"
1805 API="https://peertube2.cpy.re/api/v1"
1808 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
1809 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
1810 token=$(curl -s "$API/users/token" \
1811 --data client_id="$client_id" \
1812 --data client_secret="$client_secret" \
1813 --data grant_type=password \
1814 --data username="$USERNAME" \
1815 --data password="$PASSWORD" \
1816 | jq -r ".access_token")
1819 curl -s "$API/videos/upload" \
1820 -H "Authorization: Bearer $token" \
1822 --form videofile=@"$FILE_PATH" \
1823 --form channelId=$CHANNEL_ID \
1826 /videos/upload-resumable:
1828 summary: Initialize the resumable upload of a video
1829 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video
1830 operationId: uploadResumableInit
1837 - name: X-Upload-Content-Length
1843 description: Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading.
1844 - name: X-Upload-Content-Type
1851 description: MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.
1856 $ref: '#/components/schemas/VideoUploadRequestResumable'
1859 description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead
1861 description: created
1867 example: /api/v1/videos/upload-resumable?upload_id=471e97554f21dec3b8bb5d4602939c51
1873 description: invalid file field, schedule date or parameter
1875 description: video file too large, due to quota, absolute max file size or concurrent partial upload limit
1877 description: video type unsupported
1879 summary: Send chunk for the resumable upload of a video
1880 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
1881 operationId: uploadResumable
1892 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
1893 not valid anymore and you need to initialize a new upload.
1896 - name: Content-Range
1900 example: bytes 0-262143/2469036
1903 Specifies the bytes in the file that the request is uploading.
1905 For example, a value of `bytes 0-262143/1000000` shows that the request is sending the first
1906 262144 bytes (256 x 1024) in a 2,469,036 byte file.
1907 - name: Content-Length
1914 Size of the chunk that the request is sending.
1916 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)
1917 doesn't mandate for chunks to have the same size throughout the upload sequence.
1919 Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from
1920 1048576 bytes (~1MB) and increases or reduces size depending on connection health.
1923 application/octet-stream:
1929 description: last chunk received
1937 $ref: '#/components/schemas/VideoUploadResponse'
1939 description: resume incomplete
1944 example: bytes=0-262143
1950 description: video didn't pass upload filter
1952 description: video file too large, due to quota or max body size limit set by the reverse-proxy
1954 description: video unreadable
1956 summary: Cancel the resumable upload of a video, deleting any data uploaded so far
1957 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video
1958 operationId: uploadResumableCancel
1969 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
1970 not valid anymore and the upload session has already been deleted with its data ;-)
1973 - name: Content-Length
1981 description: upload cancelled
1990 summary: Import a video
1991 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
1992 operationId: importVideo
2000 multipart/form-data:
2002 $ref: '#/components/schemas/VideoCreateImport'
2005 contentType: application/x-bittorrent
2007 contentType: image/jpeg
2009 contentType: image/jpeg
2012 description: successful operation
2016 $ref: '#/components/schemas/VideoUploadResponse'
2018 description: '`magnetUri` or `targetUrl` or a torrent file missing'
2020 description: video didn't pass pre-import filter
2022 description: HTTP or Torrent/magnetURI import not enabled
2026 summary: Create a live
2027 operationId: createLive
2035 description: successful operation
2039 $ref: '#/components/schemas/VideoUploadResponse'
2041 description: live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
2044 multipart/form-data:
2049 description: Channel id that will contain this live video
2054 description: User can stream multiple times in a permanent live
2057 description: Live video/replay thumbnail file
2061 description: Live video/replay preview file
2065 $ref: '#/components/schemas/VideoPrivacySet'
2067 $ref: '#/components/schemas/VideoCategorySet'
2069 $ref: '#/components/schemas/VideoLicenceSet'
2071 $ref: '#/components/schemas/VideoLanguageSet'
2073 description: Live video/replay description
2076 description: A text tell the audience how to support the creator
2077 example: Please support our work on https://soutenir.framasoft.org/en/ <3
2080 description: Whether or not this live video/replay contains sensitive content
2083 description: Live video/replay name
2088 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
2097 description: Enable or disable comments for this live video/replay
2100 description: Enable or disable downloading for the replay of this live
2107 contentType: image/jpeg
2109 contentType: image/jpeg
2113 summary: Get information about a live
2114 operationId: getLiveId
2121 - $ref: '#/components/parameters/idOrUUID'
2124 description: successful operation
2128 $ref: '#/components/schemas/LiveVideoResponse'
2130 summary: Update information about a live
2131 operationId: updateLiveId
2138 - $ref: '#/components/parameters/idOrUUID'
2143 $ref: '#/components/schemas/LiveVideoUpdate'
2146 description: successful operation
2148 description: bad parameters or trying to update a live that has already started
2150 description: trying to save replay of the live but saving replay is not enabled on the instance
2154 summary: List my abuses
2155 operationId: getMyAbuses
2164 description: only list the report with this id
2170 $ref: '#/components/schemas/AbuseStateSet'
2171 - $ref: '#/components/parameters/abusesSort'
2172 - $ref: '#/components/parameters/start'
2173 - $ref: '#/components/parameters/count'
2176 description: successful operation
2188 $ref: '#/components/schemas/Abuse'
2192 summary: List abuses
2193 operationId: getAbuses
2203 description: only list the report with this id
2206 - name: predefinedReason
2208 description: predefined reason the listed reports should contain
2210 $ref: '#/components/schemas/PredefinedAbuseReasons'
2213 description: plain search that will match with video titles, reporter names and more
2219 $ref: '#/components/schemas/AbuseStateSet'
2220 - name: searchReporter
2222 description: only list reports of a specific reporter
2225 - name: searchReportee
2226 description: only list reports of a specific reportee
2232 description: only list reports of a specific video
2235 - name: searchVideoChannel
2237 description: only list reports of a specific video channel
2242 description: only list blacklisted or deleted videos
2250 description: only list account, comment or video reports
2257 - $ref: '#/components/parameters/start'
2258 - $ref: '#/components/parameters/count'
2259 - $ref: '#/components/parameters/abusesSort'
2262 description: successful operation
2274 $ref: '#/components/schemas/Abuse'
2276 summary: Report an abuse
2289 description: Reason why the user reports this video
2294 $ref: '#/components/schemas/PredefinedAbuseReasons'
2299 description: Video id to report
2301 - $ref: '#/components/schemas/Video/properties/id'
2305 description: Timestamp in the video that marks the beginning of the report
2310 description: Timestamp in the video that marks the ending of the report
2316 description: Comment id to report
2318 - $ref: '#/components/schemas/VideoComment/properties/id'
2323 description: Account id to report
2329 description: successful operation
2339 $ref: '#/components/schemas/id'
2341 description: incorrect request parameters
2343 '/abuses/{abuseId}':
2345 summary: Update an abuse
2353 - $ref: '#/components/parameters/abuseId'
2361 $ref: '#/components/schemas/AbuseStateSet'
2364 description: Update the report comment visible only to the moderation team
2369 description: successful operation
2371 description: abuse not found
2375 summary: Delete an abuse
2381 - $ref: '#/components/parameters/abuseId'
2384 description: successful operation
2386 description: block not found
2388 '/abuses/{abuseId}/messages':
2390 summary: List messages of an abuse
2396 - $ref: '#/components/parameters/abuseId'
2399 description: successful operation
2411 $ref: '#/components/schemas/AbuseMessage'
2413 summary: Add message to an abuse
2419 - $ref: '#/components/parameters/abuseId'
2428 description: Message to send
2436 description: successful operation
2438 description: incorrect request parameters
2440 '/abuses/{abuseId}/messages/{abuseMessageId}':
2442 summary: Delete an abuse message
2448 - $ref: '#/components/parameters/abuseId'
2449 - $ref: '#/components/parameters/abuseMessageId'
2452 description: successful operation
2454 '/videos/{id}/blacklist':
2456 summary: Block a video
2457 operationId: addVideoBlock
2465 - $ref: '#/components/parameters/idOrUUID'
2468 description: successful operation
2470 summary: Unblock a video by its id
2471 operationId: delVideoBlock
2479 - $ref: '#/components/parameters/idOrUUID'
2482 description: successful operation
2484 description: block not found
2490 summary: List video blocks
2491 operationId: getVideoBlocks
2500 list only blocks that match this type:
2504 - `2`: automatic block that needs review
2512 description: plain search that will match with video titles, and more
2515 - $ref: '#/components/parameters/start'
2516 - $ref: '#/components/parameters/count'
2517 - $ref: '#/components/parameters/blacklistsSort'
2520 description: successful operation
2532 $ref: '#/components/schemas/VideoBlacklist'
2534 /videos/{id}/captions:
2536 summary: List captions of a video
2537 operationId: getVideoCaptions
2541 - $ref: '#/components/parameters/idOrUUID'
2544 description: successful operation
2556 $ref: '#/components/schemas/VideoCaption'
2558 /videos/{id}/captions/{captionLanguage}:
2560 summary: Add or replace a video caption
2561 operationId: addVideoCaption
2568 - $ref: '#/components/parameters/idOrUUID'
2569 - $ref: '#/components/parameters/captionLanguage'
2572 multipart/form-data:
2577 description: The file to upload.
2582 contentType: text/vtt, application/x-subrip, text/plain
2585 description: successful operation
2587 description: video or language not found
2589 summary: Delete a video caption
2590 operationId: delVideoCaption
2597 - $ref: '#/components/parameters/idOrUUID'
2598 - $ref: '#/components/parameters/captionLanguage'
2601 description: successful operation
2603 description: video or language or caption for that language not found
2607 summary: List video channels
2608 operationId: getVideoChannels
2612 - $ref: '#/components/parameters/start'
2613 - $ref: '#/components/parameters/count'
2614 - $ref: '#/components/parameters/sort'
2617 description: successful operation
2621 $ref: '#/components/schemas/VideoChannelList'
2623 summary: Create a video channel
2624 operationId: addVideoChannel
2631 description: successful operation
2641 $ref: '#/components/schemas/VideoChannel/properties/id'
2646 $ref: '#/components/schemas/VideoChannelCreate'
2648 '/video-channels/{channelHandle}':
2650 summary: Get a video channel
2651 operationId: getVideoChannel
2655 - $ref: '#/components/parameters/channelHandle'
2658 description: successful operation
2662 $ref: '#/components/schemas/VideoChannel'
2664 summary: Update a video channel
2665 operationId: putVideoChannel
2671 - $ref: '#/components/parameters/channelHandle'
2674 description: successful operation
2679 $ref: '#/components/schemas/VideoChannelUpdate'
2681 summary: Delete a video channel
2682 operationId: delVideoChannel
2688 - $ref: '#/components/parameters/channelHandle'
2691 description: successful operation
2693 '/video-channels/{channelHandle}/videos':
2695 summary: List videos of a video channel
2696 operationId: getVideoChannelVideos
2701 - $ref: '#/components/parameters/channelHandle'
2702 - $ref: '#/components/parameters/categoryOneOf'
2703 - $ref: '#/components/parameters/isLive'
2704 - $ref: '#/components/parameters/tagsOneOf'
2705 - $ref: '#/components/parameters/tagsAllOf'
2706 - $ref: '#/components/parameters/licenceOneOf'
2707 - $ref: '#/components/parameters/languageOneOf'
2708 - $ref: '#/components/parameters/nsfw'
2709 - $ref: '#/components/parameters/filter'
2710 - $ref: '#/components/parameters/skipCount'
2711 - $ref: '#/components/parameters/start'
2712 - $ref: '#/components/parameters/count'
2713 - $ref: '#/components/parameters/videosSort'
2716 description: successful operation
2720 $ref: '#/components/schemas/VideoListResponse'
2722 '/video-channels/{channelHandle}/avatar/pick':
2724 summary: Update channel avatar
2730 - $ref: '#/components/parameters/channelHandle'
2733 description: successful operation
2740 $ref: '#/components/schemas/ActorImage'
2742 description: image file too large
2744 X-File-Maximum-Size:
2748 description: Maximum file size for the avatar
2751 multipart/form-data:
2756 description: The file to upload.
2761 contentType: image/png, image/jpeg
2763 '/video-channels/{channelHandle}/avatar':
2765 summary: Delete channel avatar
2771 - $ref: '#/components/parameters/channelHandle'
2774 description: successful operation
2776 '/video-channels/{channelHandle}/banner/pick':
2778 summary: Update channel banner
2784 - $ref: '#/components/parameters/channelHandle'
2787 description: successful operation
2794 $ref: '#/components/schemas/ActorImage'
2796 description: image file too large
2798 X-File-Maximum-Size:
2802 description: Maximum file size for the banner
2805 multipart/form-data:
2810 description: The file to upload.
2815 contentType: image/png, image/jpeg
2817 '/video-channels/{channelHandle}/banner':
2819 summary: Delete channel banner
2825 - $ref: '#/components/parameters/channelHandle'
2828 description: successful operation
2830 /video-playlists/privacies:
2832 summary: List available playlist privacy policies
2833 operationId: getPlaylistPrivacyPolicies
2838 description: successful operation
2847 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
2851 summary: List video playlists
2852 operationId: getPlaylists
2856 - $ref: '#/components/parameters/start'
2857 - $ref: '#/components/parameters/count'
2858 - $ref: '#/components/parameters/sort'
2861 description: successful operation
2873 $ref: '#/components/schemas/VideoPlaylist'
2875 summary: Create a video playlist
2876 description: If the video playlist is set as public, `videoChannelId` is mandatory.
2877 operationId: createPlaylist
2884 description: successful operation
2894 $ref: '#/components/schemas/VideoPlaylist/properties/id'
2896 $ref: '#/components/schemas/VideoPlaylist/properties/uuid'
2899 multipart/form-data:
2904 description: Video playlist display name
2909 description: Video playlist thumbnail file
2913 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2915 description: Video playlist description
2921 - $ref: '#/components/schemas/id'
2922 description: Video channel in which the playlist will be published
2927 contentType: image/jpeg
2929 /video-playlists/{playlistId}:
2931 summary: Get a video playlist
2935 - $ref: '#/components/parameters/playlistId'
2938 description: successful operation
2942 $ref: '#/components/schemas/VideoPlaylist'
2944 summary: Update a video playlist
2945 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
2952 description: successful operation
2954 - $ref: '#/components/parameters/playlistId'
2957 multipart/form-data:
2962 description: Video playlist display name
2967 description: Video playlist thumbnail file
2971 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2973 description: Video playlist description
2977 - $ref: '#/components/schemas/id'
2978 description: Video channel in which the playlist will be published
2981 contentType: image/jpeg
2983 summary: Delete a video playlist
2989 - $ref: '#/components/parameters/playlistId'
2992 description: successful operation
2994 /video-playlists/{playlistId}/videos:
2996 summary: 'List videos of a playlist'
3001 - $ref: '#/components/parameters/playlistId'
3004 description: successful operation
3008 $ref: '#/components/schemas/VideoListResponse'
3010 summary: Add a video in a playlist
3017 - $ref: '#/components/parameters/playlistId'
3020 description: successful operation
3026 videoPlaylistElement:
3040 - $ref: '#/components/schemas/Video/properties/uuid'
3041 - $ref: '#/components/schemas/Video/properties/id'
3042 description: Video to add in the playlist
3046 description: Start the video at this specific timestamp
3050 description: Stop the video at this specific timestamp
3054 /video-playlists/{playlistId}/videos/reorder:
3056 summary: 'Reorder a playlist'
3062 - $ref: '#/components/parameters/playlistId'
3065 description: successful operation
3074 description: 'Start position of the element to reorder'
3076 insertAfterPosition:
3078 description: 'New position for the block to reorder, to add the block before the first element'
3082 description: 'How many element from `startPosition` to reorder'
3086 - insertAfterPosition
3088 /video-playlists/{playlistId}/videos/{playlistElementId}:
3090 summary: Update a playlist element
3096 - $ref: '#/components/parameters/playlistId'
3097 - $ref: '#/components/parameters/playlistElementId'
3100 description: successful operation
3110 description: Start the video at this specific timestamp
3114 description: Stop the video at this specific timestamp
3116 summary: Delete an element from a playlist
3122 - $ref: '#/components/parameters/playlistId'
3123 - $ref: '#/components/parameters/playlistElementId'
3126 description: successful operation
3128 '/users/me/video-playlists/videos-exist':
3130 summary: Check video exists in my playlists
3139 description: The video ids to check
3143 $ref: '#/components/schemas/Video/properties/id'
3146 description: successful operation
3168 '/accounts/{name}/video-channels':
3170 summary: List video channels of an account
3175 - $ref: '#/components/parameters/name'
3178 description: include view statistics for the last 30 days (only if authentified as the account user)
3181 - $ref: '#/components/parameters/start'
3182 - $ref: '#/components/parameters/count'
3183 - $ref: '#/components/parameters/sort'
3186 description: successful operation
3190 $ref: '#/components/schemas/VideoChannelList'
3192 '/accounts/{name}/ratings':
3194 summary: List ratings of an account
3200 - $ref: '#/components/parameters/name'
3201 - $ref: '#/components/parameters/start'
3202 - $ref: '#/components/parameters/count'
3203 - $ref: '#/components/parameters/sort'
3207 description: Optionally filter which ratings to retrieve
3215 description: successful operation
3221 $ref: '#/components/schemas/VideoRating'
3223 '/videos/{id}/comment-threads':
3225 summary: List threads of a video
3229 - $ref: '#/components/parameters/idOrUUID'
3230 - $ref: '#/components/parameters/start'
3231 - $ref: '#/components/parameters/count'
3232 - $ref: '#/components/parameters/commentsSort'
3235 description: successful operation
3239 $ref: '#/components/schemas/CommentThreadResponse'
3241 summary: Create a thread
3247 - $ref: '#/components/parameters/idOrUUID'
3250 description: successful operation
3254 $ref: '#/components/schemas/CommentThreadPostResponse'
3256 description: video does not exist
3265 - $ref: '#/components/schemas/VideoComment/properties/text'
3271 '/videos/{id}/comment-threads/{threadId}':
3273 summary: Get a thread
3277 - $ref: '#/components/parameters/idOrUUID'
3278 - $ref: '#/components/parameters/threadId'
3281 description: successful operation
3285 $ref: '#/components/schemas/VideoCommentThreadTree'
3287 '/videos/{id}/comments/{commentId}':
3289 summary: Reply to a thread of a video
3295 - $ref: '#/components/parameters/idOrUUID'
3296 - $ref: '#/components/parameters/commentId'
3299 description: successful operation
3303 $ref: '#/components/schemas/CommentThreadPostResponse'
3305 description: thread or video does not exist
3314 - $ref: '#/components/schemas/VideoComment/properties/text'
3320 summary: Delete a comment or a reply
3326 - $ref: '#/components/parameters/idOrUUID'
3327 - $ref: '#/components/parameters/commentId'
3330 description: successful operation
3332 description: cannot remove comment of another user
3334 description: comment or video does not exist
3336 description: comment is already deleted
3338 '/videos/{id}/rate':
3340 summary: Like/dislike a video
3346 - $ref: '#/components/parameters/idOrUUID'
3362 description: successful operation
3364 description: video does not exist
3370 summary: Search videos
3375 allowEmptyValue: false
3377 String to search. If the user can make a remote URI search, and the string is an URI then the
3378 PeerTube instance will fetch the remote object and add it to its database. Then,
3379 you can use the REST API to fetch the complete video information and interact with it.
3382 - $ref: '#/components/parameters/categoryOneOf'
3383 - $ref: '#/components/parameters/isLive'
3384 - $ref: '#/components/parameters/tagsOneOf'
3385 - $ref: '#/components/parameters/tagsAllOf'
3386 - $ref: '#/components/parameters/licenceOneOf'
3387 - $ref: '#/components/parameters/languageOneOf'
3388 - $ref: '#/components/parameters/nsfw'
3389 - $ref: '#/components/parameters/filter'
3390 - $ref: '#/components/parameters/skipCount'
3391 - $ref: '#/components/parameters/start'
3392 - $ref: '#/components/parameters/count'
3393 - $ref: '#/components/parameters/searchTarget'
3394 - $ref: '#/components/parameters/videosSearchSort'
3397 description: Get videos that are published after this date
3403 description: Get videos that are published before this date
3407 - name: originallyPublishedStartDate
3409 description: Get videos that are originally published after this date
3413 - name: originallyPublishedEndDate
3415 description: Get videos that are originally published before this date
3421 description: Get videos that have this minimum duration
3426 description: Get videos that have this maximum duration
3430 'searchTarget === search-index':
3431 $ref: '#/components/callbacks/searchIndex'
3434 description: successful operation
3438 $ref: '#/components/schemas/VideoListResponse'
3440 description: search index unavailable
3442 /search/video-channels:
3446 summary: Search channels
3452 String to search. If the user can make a remote URI search, and the string is an URI then the
3453 PeerTube instance will fetch the remote object and add it to its database. Then,
3454 you can use the REST API to fetch the complete channel information and interact with it.
3457 - $ref: '#/components/parameters/start'
3458 - $ref: '#/components/parameters/count'
3459 - $ref: '#/components/parameters/searchTarget'
3460 - $ref: '#/components/parameters/sort'
3462 'searchTarget === search-index':
3463 $ref: '#/components/callbacks/searchIndex'
3466 description: successful operation
3470 $ref: '#/components/schemas/VideoChannelList'
3472 description: search index unavailable
3474 /server/blocklist/accounts:
3478 summary: List account blocks
3483 - $ref: '#/components/parameters/start'
3484 - $ref: '#/components/parameters/count'
3485 - $ref: '#/components/parameters/sort'
3488 description: successful operation
3492 summary: Block an account
3504 example: chocobozzz@example.org
3505 description: account to block, in the form `username@domain`
3510 description: successful operation
3512 description: self-blocking forbidden
3514 '/server/blocklist/accounts/{accountName}':
3518 summary: Unblock an account by its handle
3526 description: account to unblock, in the form `username@domain`
3531 description: successful operation
3533 description: account or account block does not exist
3535 /server/blocklist/servers:
3539 summary: List server blocks
3544 - $ref: '#/components/parameters/start'
3545 - $ref: '#/components/parameters/count'
3546 - $ref: '#/components/parameters/sort'
3549 description: successful operation
3553 summary: Block a server
3566 description: server domain to block
3571 description: successful operation
3573 description: self-blocking forbidden
3575 '/server/blocklist/servers/{host}':
3579 summary: Unblock a server by its domain
3587 description: server domain to unblock
3593 description: successful operation
3595 description: account block does not exist
3597 /server/redundancy/{host}:
3600 - Instance Redundancy
3601 summary: Update a server redundancy policy
3609 description: server domain to mirror
3621 description: allow mirroring of the host's local videos
3626 description: successful operation
3628 description: server is not already known
3630 /server/redundancy/videos:
3634 summary: List videos being mirrored
3642 description: direction of the mirror
3648 - $ref: '#/components/parameters/start'
3649 - $ref: '#/components/parameters/count'
3650 - $ref: '#/components/parameters/videoRedundanciesSort'
3653 description: successful operation
3659 $ref: '#/components/schemas/VideoRedundancy'
3663 summary: Mirror a video
3674 $ref: '#/components/schemas/Video/properties/id'
3679 description: successful operation
3681 description: cannot mirror a local video
3683 description: video does not exist
3685 description: video is already mirrored
3687 /server/redundancy/videos/{redundancyId}:
3691 summary: Delete a mirror done on a video
3696 - name: redundancyId
3699 description: id of an existing redundancy on a video
3704 description: successful operation
3706 description: video redundancy not found
3708 '/feeds/video-comments.{format}':
3712 summary: List comments on videos
3717 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3730 description: 'limit listing to a specific video'
3735 description: 'limit listing to a specific account'
3740 description: 'limit listing to a specific account'
3743 - name: videoChannelId
3745 description: 'limit listing to a specific video channel'
3748 - name: videoChannelName
3750 description: 'limit listing to a specific video channel'
3755 description: successful operation
3760 default: 'max-age=900' # 15 min cache
3764 $ref: '#/components/schemas/VideoCommentsForXML'
3767 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3768 application/rss+xml:
3770 $ref: '#/components/schemas/VideoCommentsForXML'
3773 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
3776 $ref: '#/components/schemas/VideoCommentsForXML'
3779 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3780 application/atom+xml:
3782 $ref: '#/components/schemas/VideoCommentsForXML'
3785 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
3791 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
3793 x-summary: field inconsistencies
3796 - videoId filter is mixed with a channel filter
3798 description: video, video channel or account not found
3800 description: accept header unsupported
3802 '/feeds/videos.{format}':
3806 summary: List videos
3811 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3824 description: 'limit listing to a specific account'
3829 description: 'limit listing to a specific account'
3832 - name: videoChannelId
3834 description: 'limit listing to a specific video channel'
3837 - name: videoChannelName
3839 description: 'limit listing to a specific video channel'
3842 - $ref: '#/components/parameters/sort'
3843 - $ref: '#/components/parameters/nsfw'
3844 - $ref: '#/components/parameters/filter'
3847 description: successful operation
3852 default: 'max-age=900' # 15 min cache
3856 $ref: '#/components/schemas/VideosForXML'
3859 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
3860 application/rss+xml:
3862 $ref: '#/components/schemas/VideosForXML'
3865 externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
3868 $ref: '#/components/schemas/VideosForXML'
3871 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
3872 application/atom+xml:
3874 $ref: '#/components/schemas/VideosForXML'
3877 externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
3883 externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
3885 description: video channel or account not found
3887 description: accept header unsupported
3889 '/feeds/subscriptions.{format}':
3894 summary: List videos of subscriptions tied to a token
3899 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3912 description: limit listing to a specific account
3918 description: private token allowing access
3922 - $ref: '#/components/parameters/sort'
3923 - $ref: '#/components/parameters/nsfw'
3924 - $ref: '#/components/parameters/filter'
3927 description: successful operation
3932 default: 'max-age=900' # 15 min cache
3936 $ref: '#/components/schemas/VideosForXML'
3937 application/rss+xml:
3939 $ref: '#/components/schemas/VideosForXML'
3942 $ref: '#/components/schemas/VideosForXML'
3943 application/atom+xml:
3945 $ref: '#/components/schemas/VideosForXML'
3950 description: accept header unsupported
3956 summary: List plugins
3969 - $ref: '#/components/parameters/start'
3970 - $ref: '#/components/parameters/count'
3971 - $ref: '#/components/parameters/sort'
3974 description: successful operation
3978 $ref: '#/components/schemas/PluginResponse'
3984 summary: List available plugins
3997 - name: currentPeerTubeEngine
4001 - $ref: '#/components/parameters/start'
4002 - $ref: '#/components/parameters/count'
4003 - $ref: '#/components/parameters/sort'
4006 description: successful operation
4010 $ref: '#/components/schemas/PluginResponse'
4012 description: plugin index unavailable
4018 summary: Install a plugin
4031 example: peertube-plugin-auth-ldap
4034 additionalProperties: false
4041 additionalProperties: false
4044 description: successful operation
4046 description: should have either `npmName` or `path` set
4052 summary: Update a plugin
4065 example: peertube-plugin-auth-ldap
4068 additionalProperties: false
4075 additionalProperties: false
4078 description: successful operation
4080 description: should have either `npmName` or `path` set
4082 description: existing plugin not found
4088 summary: Uninstall a plugin
4100 description: name of the plugin/theme in its package.json
4101 example: peertube-plugin-auth-ldap
4106 description: successful operation
4108 description: existing plugin not found
4114 summary: Get a plugin
4119 - $ref: '#/components/parameters/npmName'
4122 description: successful operation
4126 $ref: '#/components/schemas/Plugin'
4128 description: plugin not found
4130 /plugins/{npmName}/settings:
4134 summary: Set a plugin's settings
4139 - $ref: '#/components/parameters/npmName'
4148 additionalProperties: true
4151 description: successful operation
4153 description: plugin not found
4155 /plugins/{npmName}/public-settings:
4159 summary: Get a plugin's public settings
4161 - $ref: '#/components/parameters/npmName'
4164 description: successful operation
4169 additionalProperties: true
4171 description: plugin not found
4173 /plugins/{npmName}/registered-settings:
4177 summary: Get a plugin's registered settings
4182 - $ref: '#/components/parameters/npmName'
4185 description: successful operation
4190 additionalProperties: true
4192 description: plugin not found
4195 - url: 'https://peertube2.cpy.re/api/v1'
4196 description: Live Test Server (live data - latest nightly version)
4197 - url: 'https://peertube3.cpy.re/api/v1'
4198 description: Live Test Server (live data - latest RC version)
4199 - url: 'https://peertube.cpy.re/api/v1'
4200 description: Live Test Server (live data - stable version)
4207 description: Offset used to paginate results
4215 description: "Number of items to return"
4225 description: Sort column
4233 description: Plain text search, applied to various parts of the model depending on endpoint
4241 If the administrator enabled search index support, you can override the default search target.
4244 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
4245 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
4246 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
4247 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
4248 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
4249 * 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
4250 the data from the origin instance API
4260 description: Sort videos by criteria
4276 description: Sort videos by criteria
4291 description: Sort comments by criteria
4301 description: Sort blacklists by criteria
4317 description: Plain text search that will match with user usernames or emails
4324 description: Filter results down to (un)banned users
4331 description: Sort users by criteria
4342 description: Sort abuses by criteria
4349 videoRedundanciesSort:
4353 description: Sort abuses by criteria
4362 description: The username or handle of the account
4365 example: chocobozzz | chocobozzz@example.org
4370 description: The user id
4372 $ref: '#/components/schemas/id'
4377 description: The object id or uuid
4380 - $ref: '#/components/schemas/id'
4381 - $ref: '#/components/schemas/UUIDv4'
4386 description: Playlist id
4388 $ref: '#/components/schemas/VideoPlaylist/properties/id'
4390 name: playlistElementId
4393 description: Playlist element id
4395 $ref: '#/components/schemas/id'
4400 description: Abuse id
4402 $ref: '#/components/schemas/Abuse/properties/id'
4404 name: abuseMessageId
4407 description: Abuse message id
4409 $ref: '#/components/schemas/AbuseMessage/properties/id'
4411 name: captionLanguage
4414 description: The caption language
4416 $ref: '#/components/schemas/VideoLanguageSet'
4421 description: The video channel handle
4424 example: my_username | my_username@example.com
4426 name: subscriptionHandle
4429 description: The subscription handle
4432 example: my_username | my_username@example.com
4437 description: The thread id (root comment id)
4439 $ref: '#/components/schemas/VideoCommentThreadTree/properties/comment/properties/id'
4444 description: The comment id
4446 $ref: '#/components/schemas/VideoComment/properties/id'
4451 description: whether or not the video is a live
4458 description: category id of the video (see [/videos/categories](#operation/getCategories))
4461 - $ref: '#/components/schemas/VideoCategorySet'
4464 $ref: '#/components/schemas/VideoCategorySet'
4471 description: tag(s) of the video
4485 description: tag(s) of the video, where all should be present in the video
4498 description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language
4501 - $ref: '#/components/schemas/VideoLanguageSet'
4504 $ref: '#/components/schemas/VideoLanguageSet'
4511 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4514 - $ref: '#/components/schemas/VideoLicenceSet'
4517 $ref: '#/components/schemas/VideoLicenceSet'
4524 description: if you don't need the `total` in the response
4535 description: whether to include nsfw videos, if any
4546 Special filters which might require special rights:
4547 * `local` - only videos local to the instance
4548 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
4549 * `all` - all videos, showing private and unlisted videos (requires Admin privileges)
4559 description: list of uris to check if each is part of the user subscriptions
4569 description: name of the plugin/theme on npmjs.com or in its package.json
4572 example: peertube-plugin-auth-ldap
4577 description: job type
4581 - activitypub-follow
4582 - activitypub-http-broadcast
4583 - activitypub-http-fetcher
4584 - activitypub-http-unicast
4590 - activitypub-refresher
4615 Authenticating via OAuth requires the following steps:
4616 - Have an activated account
4617 - [Generate] an access token for that account at `/api/v1/users/token`.
4618 - Make requests with the *Authorization: Bearer <token\>* header
4619 - Profit, depending on the role assigned to the account
4621 Note that the __access token is valid for 1 day__ and is given
4622 along with a __refresh token valid for 2 weeks__.
4624 [Generate]: https://docs.joinpeertube.org/api-rest-getting-started
4628 tokenUrl: /api/v1/users/token
4631 moderator: Moderator scope
4634 # Resuable core properties
4642 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4643 pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
4648 description: immutable name of the user, used to find or mention its actor
4650 pattern: '/^[a-z0-9._]+$/'
4655 description: immutable name of the channel, used to interact with its actor
4656 example: framasoft_videos
4657 pattern: '/^[a-zA-Z0-9\\-_.:]+$/'
4668 description: category id of the video (see [/videos/categories](#operation/getCategories))
4670 VideoConstantNumber-Category:
4673 $ref: '#/components/schemas/VideoCategorySet'
4676 example: Science & Technology
4680 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4682 VideoConstantNumber-Licence:
4685 $ref: '#/components/schemas/VideoLicenceSet'
4688 example: Attribution - Share Alike
4692 description: language id of the video (see [/videos/languages](#operation/getLanguages))
4694 VideoConstantString-Language:
4697 $ref: '#/components/schemas/VideoLanguageSet'
4702 VideoPlaylistPrivacySet:
4708 description: Video playlist privacy policy (see [/video-playlists/privacies])
4709 VideoPlaylistPrivacyConstant:
4712 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4716 VideoPlaylistTypeSet:
4721 description: The video playlist type (Regular = `1`, Watch Later = `2`)
4722 VideoPlaylistTypeConstant:
4725 $ref: '#/components/schemas/VideoPlaylistTypeSet'
4736 description: privacy id of the video (see [/videos/privacies](#operation/getPrivacyPolicies))
4737 VideoPrivacyConstant:
4740 $ref: '#/components/schemas/VideoPrivacySet'
4757 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
4764 description: 'Admin flags for the user (None = `0`, Bypass video blacklist = `1`)'
4775 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
4785 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
4789 $ref: '#/components/schemas/AbuseStateSet'
4792 AbusePredefinedReasons:
4805 example: [spamOrMisleading]
4810 Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`)
4812 `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos.
4814 VideoResolutionConstant:
4815 description: resolutions and their labels for the video
4818 $ref: '#/components/schemas/VideoResolutionSet'
4822 VideoScheduledUpdate:
4825 $ref: '#/components/schemas/VideoPrivacySet'
4829 description: When to update the video
4849 - $ref: '#/components/schemas/ActorImage'
4850 VideoChannelSummary:
4853 $ref: '#/components/schemas/id'
4867 - $ref: '#/components/schemas/ActorImage'
4881 - $ref: '#/components/schemas/Video'
4888 description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file
4889 example: magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.torrent&xt=urn:btih:38b4747ff788b30bf61f59d1965cd38f9e48e01f&dn=What+is+PeerTube%3F&tr=wss%3A%2F%2Fframatube.org%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.mp4
4890 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
4892 $ref: '#/components/schemas/VideoResolutionConstant'
4895 description: Video file size in bytes
4898 description: Direct URL of the torrent file
4902 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
4906 description: Direct URL of the video
4910 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
4914 description: Frames per second of the video file
4918 description: URL dereferencing the output of ffprobe on the file
4919 VideoStreamingPlaylists:
4924 $ref: '#/components/schemas/id'
4932 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS'
4933 VideoStreamingPlaylists-HLS:
4944 Video files associated to this playlist.
4946 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.)
4948 $ref: '#/components/schemas/VideoFile'
4960 $ref: '#/components/schemas/Video/properties/id'
4962 $ref: '#/components/schemas/Video/properties/uuid'
4964 $ref: '#/components/schemas/Video/properties/name'
4968 description: object id for the video
4970 - $ref: '#/components/schemas/id'
4972 description: universal identifier for the video, that can be used across instances
4974 - $ref: '#/components/schemas/UUIDv4'
4980 example: 2017-10-01T10:52:46.396Z
4981 description: time at which the video object was first drafted
4985 example: 2018-10-01T10:52:46.396Z
4986 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
4990 example: 2021-05-04T08:01:01.502Z
4991 description: last time the video's metadata was modified
4992 originallyPublishedAt:
4995 example: 2010-10-01T10:52:46.396Z
4996 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
4999 - $ref: '#/components/schemas/VideoConstantNumber-Category'
5000 description: category in which the video is classified
5003 - $ref: '#/components/schemas/VideoConstantNumber-Licence'
5004 description: licence under which the video is distributed
5007 - $ref: '#/components/schemas/VideoConstantString-Language'
5008 description: main language used in the video
5011 - $ref: '#/components/schemas/VideoPrivacyConstant'
5012 description: privacy policy used to distribute the video
5016 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n
5017 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr...
5021 truncated description of the video, written in Markdown.
5022 Resolve `descriptionPath` to get the full description of maximum `10000` characters.
5027 description: duration of the video in seconds
5032 description: title of the video
5033 example: What is PeerTube?
5038 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5041 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5044 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
5061 - $ref: '#/components/schemas/VideoStateConstant'
5062 description: represents the internal state of the video processing within the PeerTube instance
5066 - $ref: '#/components/schemas/VideoScheduledUpdate'
5074 $ref: '#/components/schemas/AccountSummary'
5076 $ref: '#/components/schemas/VideoChannelSummary'
5085 - $ref: '#/components/schemas/Video'
5090 example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description
5091 description: path at which to get the full description of maximum `10000` characters
5094 description: A text tell the audience how to support the video creator
5095 example: Please support our work on https://soutenir.framasoft.org/en/ <3
5099 $ref: '#/components/schemas/VideoChannel'
5101 $ref: '#/components/schemas/Account'
5103 example: [flowers, gardening]
5121 - https://peertube2.cpy.re/tracker/announce
5122 - wss://peertube2.cpy.re/tracker/socket
5126 $ref: '#/components/schemas/VideoFile'
5128 WebTorrent/raw video files. If WebTorrent is disabled on the server:
5130 - field will be empty
5131 - video files will be found in `streamingPlaylists[].files` field
5135 $ref: '#/components/schemas/VideoStreamingPlaylists'
5137 HLS playlists/manifest files. If HLS is disabled on the server:
5139 - field will be empty
5140 - video files will be found in `files` field
5141 FileRedundancyInformation:
5144 $ref: '#/components/schemas/id'
5169 $ref: '#/components/schemas/id'
5176 $ref: '#/components/schemas/UUIDv4'
5183 $ref: '#/components/schemas/FileRedundancyInformation'
5187 $ref: '#/components/schemas/FileRedundancyInformation'
5188 VideoImportStateConstant:
5196 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
5203 additionalProperties: false
5207 $ref: '#/components/schemas/VideoImport/properties/targetUrl'
5208 required: [targetUrl]
5211 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
5212 required: [magnetUri]
5215 $ref: '#/components/schemas/VideoImport/properties/torrentfile'
5216 required: [torrentfile]
5217 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5226 - $ref: '#/components/schemas/id'
5230 description: remote URL where to find the import's source video
5231 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
5235 description: magnet URI allowing to resolve the import's source video
5236 example: magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.torrent&xt=urn:btih:38b4747ff788b30bf61f59d1965cd38f9e48e01f&dn=What+is+PeerTube%3F&tr=wss%3A%2F%2Fframatube.org%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.mp4
5237 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5242 description: Torrent file containing only the video file
5249 - $ref: '#/components/schemas/VideoImportStateConstant'
5265 - $ref: '#/components/schemas/Video'
5275 $ref: '#/components/schemas/VideoImport'
5279 $ref: '#/components/schemas/id'
5282 example: The video is a spam
5286 $ref: '#/components/schemas/AbusePredefinedReasons'
5288 $ref: '#/components/schemas/Account'
5290 $ref: '#/components/schemas/AbuseStateConstant'
5293 example: Decided to ban the server since it spams us regularly
5297 $ref: '#/components/schemas/VideoInfo'
5304 $ref: '#/components/schemas/id'
5315 $ref: '#/components/schemas/AccountSummary'
5319 $ref: '#/components/schemas/id'
5321 $ref: '#/components/schemas/Video/properties/id'
5333 $ref: '#/components/schemas/UUIDv4'
5351 $ref: '#/components/schemas/id'
5353 $ref: '#/components/schemas/UUIDv4'
5376 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
5378 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
5380 $ref: '#/components/schemas/AccountSummary'
5382 $ref: '#/components/schemas/VideoChannelSummary'
5386 $ref: '#/components/schemas/id'
5393 description: Text of the comment
5395 example: This video is wonderful!
5397 $ref: '#/components/schemas/id'
5401 - $ref: '#/components/schemas/id'
5403 $ref: '#/components/schemas/Video/properties/id'
5418 totalRepliesFromVideoAuthor:
5425 $ref: '#/components/schemas/Account'
5426 VideoCommentThreadTree:
5429 $ref: '#/components/schemas/VideoComment'
5433 $ref: '#/components/schemas/VideoCommentThreadTree'
5437 $ref: '#/components/schemas/VideoConstantString-Language'
5453 $ref: '#/components/schemas/id'
5470 $ref: '#/components/schemas/id'
5475 description: immutable name of the actor, used to find or mention it
5477 - $ref: '#/components/schemas/username'
5481 description: server on which the actor is resident
5482 hostRedundancyAllowed:
5484 description: whether this actor's host allows redundancy of its videos
5488 description: number of actors subscribed to by this actor, as seen by this instance
5492 description: number of followers of this actor, as seen by this instance
5500 $ref: '#/components/schemas/ActorImage'
5503 - $ref: '#/components/schemas/Actor'
5506 description: object id for the user tied to this account
5508 - $ref: '#/components/schemas/User/properties/id'
5511 description: editable name of the account, displayed in its representations
5516 description: text or bio displayed on the account's profile
5522 description: timestamp within the video, in seconds
5589 allowedForCurrentIP:
5591 requiresEmailVerification:
5609 $ref: '#/components/schemas/VideoResolutionSet'
5694 example: 16810141515
5797 requiresEmailVerification:
5812 description: Settings that apply to new users, if registration is enabled
5816 example: 16810141515
5822 description: Settings pertaining to transcoding jobs
5826 allowAdditionalExtensions:
5828 description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos
5831 description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
5834 description: Amount of threads used by ffmpeg for 1 transcoding job
5837 description: Amount of transcoding jobs to execute in parallel
5843 New profiles can be added by plugins ; available in core PeerTube: 'default'.
5846 description: Resolutions to transcode _new videos_ to
5866 description: WebTorrent-specific settings
5872 description: HLS-specific settings
5916 $ref: '#/components/schemas/id'
5918 $ref: '#/components/schemas/Actor'
5920 $ref: '#/components/schemas/Actor'
5923 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
5936 PredefinedAbuseReasons:
5937 description: Reason categories that help triage reports
5955 $ref: '#/components/schemas/id'
5967 - activitypub-http-unicast
5968 - activitypub-http-broadcast
5969 - activitypub-http-fetcher
5970 - activitypub-follow
5976 - activitypub-refresher
5980 additionalProperties: true
5983 additionalProperties: true
5999 $ref: '#/components/schemas/id'
6004 $ref: '#/components/schemas/id'
6005 VideoUploadRequestCommon:
6008 description: Video name
6010 example: What is PeerTube?
6014 description: Channel id that will contain this video
6019 $ref: '#/components/schemas/VideoPrivacySet'
6021 $ref: '#/components/schemas/VideoCategorySet'
6023 $ref: '#/components/schemas/VideoLicenceSet'
6025 $ref: '#/components/schemas/VideoLanguageSet'
6027 description: Video description
6030 **[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)**
6032 description: Whether or not we wait transcoding before publish the video
6035 description: A text tell the audience how to support the video creator
6036 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6039 description: Whether or not this video contains sensitive content
6042 description: Video tags (maximum 5 tags each between 2 and 30 characters)
6055 description: Enable or disable comments for this video
6058 description: Enable or disable downloading for this video
6060 originallyPublishedAt:
6061 description: Date when the content was originally published
6065 $ref: '#/components/schemas/VideoScheduledUpdate'
6067 description: Video thumbnail file
6071 description: Video preview file
6077 VideoUploadRequestLegacy:
6079 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6085 description: Video file
6088 VideoUploadRequestResumable:
6090 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6096 description: Video filename including extension
6099 example: what_is_peertube.mp4
6101 description: Video thumbnail file
6105 description: Video preview file
6108 VideoUploadResponse:
6114 $ref: '#/components/schemas/Video/properties/id'
6116 $ref: '#/components/schemas/Video/properties/uuid'
6117 CommentThreadResponse:
6126 $ref: '#/components/schemas/VideoComment'
6127 CommentThreadPostResponse:
6130 $ref: '#/components/schemas/VideoComment'
6140 $ref: '#/components/schemas/Video'
6144 $ref: '#/components/schemas/Account'
6147 description: Automatically start playing the upcoming video after the currently playing video
6148 autoPlayNextVideoPlaylist:
6150 description: Automatically start playing the video on the playlist after the currently playing video
6153 description: Automatically start playing the video on the watch page
6163 description: The user email
6166 description: Has the user confirmed their email address?
6169 - $ref: '#/components/schemas/id'
6173 description: Auth plugin to use to authenticate the user
6177 noInstanceConfigWarningModal:
6182 $ref: '#/components/schemas/NSFWPolicy'
6184 $ref: '#/components/schemas/UserRole'
6193 description: Theme enabled by this user
6195 $ref: '#/components/schemas/username'
6199 $ref: '#/components/schemas/VideoChannel'
6202 description: The user video quota in bytes
6206 description: The user daily video quota in bytes
6210 description: Enable P2P in the player
6213 - $ref: '#/components/schemas/User'
6215 # optionally present fields: they require WITH_STATS scope
6218 description: Count of videos published
6221 description: Count of reports/abuses of which the user is a target
6222 abusesAcceptedCount:
6224 description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team
6227 description: Count of reports/abuses created by the user
6230 description: Count of comments published
6234 $ref: '#/components/schemas/username'
6236 $ref: '#/components/schemas/password'
6240 description: The user email
6243 description: The user video quota in bytes
6247 description: The user daily video quota in bytes
6250 $ref: '#/components/schemas/usernameChannel'
6252 $ref: '#/components/schemas/UserRole'
6254 $ref: '#/components/schemas/UserAdminFlags'
6265 description: The updated email of the user
6267 - $ref: '#/components/schemas/User/properties/email'
6270 description: Set the email as verified
6273 description: The updated video quota of the user in bytes
6276 description: The updated daily video quota of the user in bytes
6280 description: The auth plugin to use to authenticate the user
6281 example: 'peertube-plugin-auth-saml2'
6283 $ref: '#/components/schemas/UserRole'
6285 $ref: '#/components/schemas/UserAdminFlags'
6287 # see shared/models/users/user-update-me.model.ts:
6290 $ref: '#/components/schemas/password'
6292 $ref: '#/components/schemas/password'
6294 description: new email used for login and service communications
6296 - $ref: '#/components/schemas/User/properties/email'
6299 description: new name of the user in its representations
6304 description: new NSFW display policy
6311 description: whether to enable P2P in the player or not
6314 description: new preference regarding playing videos automatically
6317 description: new preference regarding playing following videos automatically
6318 autoPlayNextVideoPlaylist:
6320 description: new preference regarding playing following playlist videos automatically
6321 videosHistoryEnabled:
6323 description: whether to keep track of watched history or not
6328 description: list of languages to filter videos down to
6331 noInstanceConfigWarningModal:
6338 $ref: '#/components/schemas/id'
6345 description: Rating of the video
6352 $ref: '#/components/schemas/Video'
6359 description: Rating of the video
6366 description: immutable name of the user, used to find or mention its actor
6368 - $ref: '#/components/schemas/username'
6370 $ref: '#/components/schemas/password'
6374 description: email of the user, used for login or service communications
6377 description: editable name of the user, displayed in its representations
6382 description: channel base information used to create the first channel of the user
6385 $ref: '#/components/schemas/usernameChannel'
6387 $ref: '#/components/schemas/VideoChannel/properties/displayName'
6397 pattern: /^[a-z0-9]$/
6400 example: v1ikx5hnfop4mdpnci8nsqh93c45rldf
6403 pattern: /^[a-zA-Z0-9]$/
6406 example: AjWiOapPltI6EnsWQwlFarRtLh4u8tDt
6407 OAuthToken-password:
6409 - $ref: '#/components/schemas/OAuthClient'
6419 $ref: '#/components/schemas/User/properties/username'
6421 $ref: '#/components/schemas/password'
6428 OAuthToken-refresh_token:
6430 - $ref: '#/components/schemas/OAuthClient'
6441 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
6450 # GET/POST/PUT properties
6453 description: editable name of the channel, displayed in its representations
6454 example: Videos of Framasoft
6459 example: Videos made with <3 by Framasoft
6464 description: text shown by default on all videos of this channel, to tell the audience how to support it
6465 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6468 # GET-only properties
6472 - $ref: '#/components/schemas/id'
6488 $ref: '#/components/schemas/UUIDv4'
6491 - $ref: '#/components/schemas/VideoChannel'
6494 description: username of the channel to create
6496 - $ref: '#/components/schemas/usernameChannel'
6502 - $ref: '#/components/schemas/VideoChannel'
6504 bulkVideosSupportUpdate:
6506 description: Update the support field for all videos of this channel
6516 - $ref: '#/components/schemas/VideoChannel'
6517 - $ref: '#/components/schemas/Actor'
6522 name: 'media:peerLink'
6531 - application/x-bittorrent
6537 name: 'media:content'
6568 VideoCommentsForXML:
6603 description: video watch page URL
6606 description: video canonical URL
6610 description: video publication date
6613 description: video description
6616 description: video description
6619 description: publisher user name
6622 description: video category (MRSS)
6625 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
6640 description: video embed path, relative to the canonical URL domain (MRSS)
6649 description: video watch path, relative to the canonical URL domain (MRSS)
6670 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
6671 'media:description':
6678 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
6681 description: main streamable file for the video
6691 - application/x-bittorrent
6700 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)
6703 - $ref: '#/components/schemas/MRSSPeerLink'
6704 - $ref: '#/components/schemas/MRSSGroupContent'
6705 NotificationSettingValue:
6722 $ref: '#/components/schemas/id'
6726 Notification type, following the `UserNotificationType` enum:
6728 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
6730 - `2` NEW_COMMENT_ON_MY_VIDEO
6732 - `3` NEW_ABUSE_FOR_MODERATORS
6734 - `4` BLACKLIST_ON_MY_VIDEO
6736 - `5` UNBLACKLIST_ON_MY_VIDEO
6738 - `6` MY_VIDEO_PUBLISHED
6740 - `7` MY_VIDEO_IMPORT_SUCCESS
6742 - `8` MY_VIDEO_IMPORT_ERROR
6744 - `9` NEW_USER_REGISTRATION
6748 - `11` COMMENT_MENTION
6750 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
6752 - `13` NEW_INSTANCE_FOLLOWER
6754 - `14` AUTO_INSTANCE_FOLLOWING
6760 - $ref: '#/components/schemas/VideoInfo'
6764 $ref: '#/components/schemas/ActorInfo'
6770 $ref: '#/components/schemas/id'
6773 $ref: '#/components/schemas/VideoInfo'
6778 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
6788 $ref: '#/components/schemas/id'
6792 $ref: '#/components/schemas/VideoInfo'
6794 $ref: '#/components/schemas/ActorInfo'
6800 $ref: '#/components/schemas/id'
6803 - $ref: '#/components/schemas/VideoInfo'
6809 $ref: '#/components/schemas/id'
6812 - $ref: '#/components/schemas/VideoInfo'
6816 - $ref: '#/components/schemas/ActorInfo'
6822 $ref: '#/components/schemas/id'
6824 $ref: '#/components/schemas/ActorInfo'
6852 NotificationListResponse:
6861 $ref: '#/components/schemas/Notification'
6866 example: peertube-plugin-auth-ldap
6894 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
6897 additionalProperties: true
6913 $ref: '#/components/schemas/Plugin'
6920 description: User can stream multiple times in a permanent live
6929 description: RTMP stream key to use to stream into this live video
6933 description: User can stream multiple times in a permanent live
6940 'https://search.example.org/api/v1/search/videos':
6942 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
6945 description: successful operation
6949 $ref: '#/components/schemas/VideoListResponse'