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
17 The PeerTube API is built on HTTP(S) and is RESTful. You can use your favorite
18 HTTP/REST library for your programming language to use PeerTube. No official
19 SDK is currently provided, but the spec API is fully compatible with
20 [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO)
21 which generates a client SDK in the language of your choice.
23 See the [Quick Start guide](https://docs.joinpeertube.org/#/api-rest-getting-started) so you can play with the PeerTube API.
27 When you sign up for an account, you are given the possibility to generate
28 sessions, and authenticate using this session token. One session token can
29 currently be used at a time.
33 The API uses standard HTTP status codes to indicate the success or failure
34 of the API call. The body of the response will be JSON in the following
39 "code": "unauthorized_request", // example inner error code
40 "error": "Token is invalid." // example exposed error message
44 url: https://docs.joinpeertube.org/api-rest-reference.html
48 Using some features of PeerTube require authentication, for which Accounts
49 provide different levels of permission as well as associated user
50 information. Accounts also encompass remote accounts discovered across the federation.
53 Each server exposes public information regarding supported videos and
57 Jobs are long-running tasks enqueued and processed by the instance
58 itself. No additional worker registration is currently available.
59 - name: Instance Follows
61 Managing servers which the instance interacts with is crucial to the
62 concept of federation in PeerTube and external video indexation. The PeerTube
63 server then deals with inter-server ActivityPub operations and propagates
64 information across its social graph by posting activities to actors' inbox
68 Video abuses deal with reports of local or remote videos alike.
71 Operations dealing with listing, uploading, fetching or modifying videos.
74 The search helps to find _videos_ or _channels_ from within the instance and beyond.
75 Videos from other instances federated by the instance (that is, instances
76 followed by the instance) can be found via keywords and other criteria of
79 Administrators can also enable the use of a remote search system, indexing
80 videos and channels not could be not federated by the instance.
81 - name: Video Comments
83 Operations dealing with comments to a video. Comments are organized in
85 - name: Video Playlists
87 Operations dealing with playlists of videos. Playlists are bound to users
89 - name: Video Channels
91 Operations dealing with creation, modification and video listing of a
93 - name: Video Blacklist
95 Operations dealing with blacklisting videos (removing them from view and
96 preventing interactions).
116 - Video Ownership Change
124 - name: Instance Configuration
136 summary: Get an account
138 - $ref: '#/components/parameters/name'
141 description: successful operation
145 $ref: '#/components/schemas/Account'
146 '/accounts/{name}/videos':
151 summary: 'List videos of an account'
153 - $ref: '#/components/parameters/name'
154 - $ref: '#/components/parameters/categoryOneOf'
155 - $ref: '#/components/parameters/tagsOneOf'
156 - $ref: '#/components/parameters/tagsAllOf'
157 - $ref: '#/components/parameters/licenceOneOf'
158 - $ref: '#/components/parameters/languageOneOf'
159 - $ref: '#/components/parameters/nsfw'
160 - $ref: '#/components/parameters/filter'
161 - $ref: '#/components/parameters/skipCount'
162 - $ref: '#/components/parameters/start'
163 - $ref: '#/components/parameters/count'
164 - $ref: '#/components/parameters/videosSort'
167 description: successful operation
171 $ref: '#/components/schemas/VideoListResponse'
175 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
176 .then(function(response) {
177 return response.json()
178 }).then(function(data) {
184 http -b GET https://peertube2.cpy.re/api/v1/accounts/{name}/videos
190 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
192 http = Net::HTTP.new(uri.host, uri.port)
195 response = http.get(uri.request_uri)
197 puts JSON.parse(response.read_body)
202 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
210 summary: List accounts
212 - $ref: '#/components/parameters/start'
213 - $ref: '#/components/parameters/count'
214 - $ref: '#/components/parameters/sort'
217 description: successful operation
223 $ref: '#/components/schemas/Account'
228 summary: Get instance public configuration
231 description: successful operation
235 $ref: '#/components/schemas/ServerConfig'
238 summary: Get instance "About" information
243 description: successful operation
247 $ref: '#/components/schemas/ServerConfigAbout'
250 summary: Get instance runtime configuration
258 description: successful operation
262 $ref: '#/components/schemas/ServerConfigCustom'
264 summary: Set instance runtime configuration
272 description: successful operation
274 summary: Delete instance runtime configuration
282 description: successful operation
285 summary: List instance jobs
295 description: The state of the job
304 - $ref: '#/components/parameters/start'
305 - $ref: '#/components/parameters/count'
306 - $ref: '#/components/parameters/sort'
309 description: successful operation
315 $ref: '#/components/schemas/Job'
316 '/server/following/{host}':
323 summary: Unfollow a server
328 description: 'The host to unfollow '
333 description: successful operation
338 summary: List instance followers
340 - $ref: '#/components/parameters/start'
341 - $ref: '#/components/parameters/count'
342 - $ref: '#/components/parameters/sort'
345 description: successful operation
351 $ref: '#/components/schemas/Follow'
356 summary: List instance followings
358 - $ref: '#/components/parameters/start'
359 - $ref: '#/components/parameters/count'
360 - $ref: '#/components/parameters/sort'
363 description: successful operation
369 $ref: '#/components/schemas/Follow'
376 summary: Follow a server
379 description: successful operation
384 $ref: '#/components/schemas/Follow'
387 summary: Create a user
395 description: successful operation
399 $ref: '#/components/schemas/AddUserResponse'
404 $ref: '#/components/schemas/AddUser'
405 description: User to create
414 - $ref: '#/components/parameters/start'
415 - $ref: '#/components/parameters/count'
416 - $ref: '#/components/parameters/usersSort'
419 description: successful operation
425 $ref: '#/components/schemas/User'
428 summary: Delete a user
435 - $ref: '#/components/parameters/id'
438 description: successful operation
446 - $ref: '#/components/parameters/id'
449 description: successful operation
453 $ref: '#/components/schemas/User'
455 summary: Update a user
461 - $ref: '#/components/parameters/id'
464 description: successful operation
469 $ref: '#/components/schemas/UpdateUser'
473 summary: Register a user
478 description: successful operation
483 $ref: '#/components/schemas/RegisterUser'
487 summary: Get my user information
495 description: successful operation
501 $ref: '#/components/schemas/User'
503 summary: Update my user information
511 description: successful operation
516 $ref: '#/components/schemas/UpdateMe'
518 /users/me/videos/imports:
520 summary: Get video imports of my user
528 - $ref: '#/components/parameters/start'
529 - $ref: '#/components/parameters/count'
530 - $ref: '#/components/parameters/sort'
533 description: successful operation
537 $ref: '#/components/schemas/VideoImport'
538 /users/me/video-quota-used:
540 summary: Get my user used quota
548 description: successful operation
553 '/users/me/videos/{videoId}/rating':
555 summary: Get rate of my user for a video
565 description: 'The video id '
570 description: successful operation
574 $ref: '#/components/schemas/GetMeVideoRating'
577 summary: Get videos of my user
585 - $ref: '#/components/parameters/start'
586 - $ref: '#/components/parameters/count'
587 - $ref: '#/components/parameters/sort'
590 description: successful operation
594 $ref: '#/components/schemas/VideoListResponse'
595 /users/me/subscriptions:
597 summary: Get my user subscriptions
604 - $ref: '#/components/parameters/start'
605 - $ref: '#/components/parameters/count'
606 - $ref: '#/components/parameters/sort'
609 description: successful operation
611 summary: Add subscription to my user
619 description: successful operation
620 /users/me/subscriptions/exist:
622 summary: Get if subscriptions exist for my user
629 - $ref: '#/components/parameters/subscriptionsUris'
632 description: successful operation
637 /users/me/subscriptions/videos:
639 summary: List videos of subscriptions of my user
647 - $ref: '#/components/parameters/categoryOneOf'
648 - $ref: '#/components/parameters/tagsOneOf'
649 - $ref: '#/components/parameters/tagsAllOf'
650 - $ref: '#/components/parameters/licenceOneOf'
651 - $ref: '#/components/parameters/languageOneOf'
652 - $ref: '#/components/parameters/nsfw'
653 - $ref: '#/components/parameters/filter'
654 - $ref: '#/components/parameters/skipCount'
655 - $ref: '#/components/parameters/start'
656 - $ref: '#/components/parameters/count'
657 - $ref: '#/components/parameters/videosSort'
660 description: successful operation
664 $ref: '#/components/schemas/VideoListResponse'
665 '/users/me/subscriptions/{subscriptionHandle}':
667 summary: Get subscription of my user
674 - $ref: '#/components/parameters/subscriptionHandle'
677 description: successful operation
681 $ref: '#/components/schemas/VideoChannel'
683 summary: Delete subscription of my user
690 - $ref: '#/components/parameters/subscriptionHandle'
693 description: successful operation
694 /users/me/avatar/pick:
696 summary: Update my user avatar
703 description: successful operation
707 $ref: '#/components/schemas/Avatar'
715 description: The file to upload.
720 contentType: image/png, image/jpeg
723 summary: List video ownership changes
725 - Video Ownership Change
730 description: successful operation
731 '/videos/ownership/{id}/accept':
733 summary: Accept ownership change request
735 - Video Ownership Change
739 - $ref: '#/components/parameters/idOrUUID'
742 description: successful operation
743 '/videos/ownership/{id}/refuse':
745 summary: Refuse ownership change request
747 - Video Ownership Change
751 - $ref: '#/components/parameters/idOrUUID'
754 description: successful operation
755 '/videos/{id}/give-ownership':
757 summary: Request ownership change
759 - Video Ownership Change
763 - $ref: '#/components/parameters/idOrUUID'
767 application/x-www-form-urlencoded:
777 description: successful operation
779 description: 'Changing video ownership to a remote account is not supported yet'
786 - $ref: '#/components/parameters/categoryOneOf'
787 - $ref: '#/components/parameters/tagsOneOf'
788 - $ref: '#/components/parameters/tagsAllOf'
789 - $ref: '#/components/parameters/licenceOneOf'
790 - $ref: '#/components/parameters/languageOneOf'
791 - $ref: '#/components/parameters/nsfw'
792 - $ref: '#/components/parameters/filter'
793 - $ref: '#/components/parameters/skipCount'
794 - $ref: '#/components/parameters/start'
795 - $ref: '#/components/parameters/count'
796 - $ref: '#/components/parameters/videosSort'
799 description: successful operation
803 $ref: '#/components/schemas/VideoListResponse'
806 summary: List available video categories
811 description: successful operation
820 summary: List available video licences
825 description: successful operation
834 summary: List available video languages
839 description: successful operation
848 summary: List available video privacies
853 description: successful operation
862 summary: Update a video
868 - $ref: '#/components/parameters/idOrUUID'
871 description: successful operation
879 description: Video thumbnail file
883 description: Video preview file
887 description: Video category
890 description: Video licence
893 description: Video language
896 $ref: '#/components/schemas/VideoPrivacySet'
898 description: Video description
901 description: Whether or not we wait transcoding before publish the video
904 description: Text describing how to support the video uploader
907 description: Whether or not this video contains sensitive content
910 description: Video name
913 description: Video tags (maximum 5 tags each between 2 and 30 characters)
922 description: Enable or disable comments for this video
924 originallyPublishedAt:
925 description: Date when the content was originally published
929 $ref: '#/components/schemas/VideoScheduledUpdate'
932 contentType: image/jpeg
934 contentType: image/jpeg
940 - $ref: '#/components/parameters/idOrUUID'
943 description: successful operation
947 $ref: '#/components/schemas/VideoDetails'
949 summary: Delete a video
955 - $ref: '#/components/parameters/idOrUUID'
958 description: successful operation
959 '/videos/{id}/description':
961 summary: Get complete video description
965 - $ref: '#/components/parameters/idOrUUID'
968 description: successful operation
973 '/videos/{id}/views':
975 summary: Add a view to a video
979 - $ref: '#/components/parameters/idOrUUID'
982 description: successful operation
983 '/videos/{id}/watching':
985 summary: Set watching progress of a video
991 - $ref: '#/components/parameters/idOrUUID'
996 $ref: '#/components/schemas/UserWatchingVideo'
1000 description: successful operation
1003 summary: Upload a video
1010 description: successful operation
1014 $ref: '#/components/schemas/VideoUploadResponse'
1016 description: 'The user video quota is exceeded with this video.'
1018 description: 'Upload has timed out'
1020 description: 'Invalid input file.'
1023 multipart/form-data:
1028 description: Video file
1032 description: Channel id that will contain this video
1035 description: Video thumbnail file
1039 description: Video preview file
1043 $ref: '#/components/schemas/VideoPrivacySet'
1045 description: Video category
1048 description: Video licence
1051 description: Video language
1054 description: Video description
1057 description: Whether or not we wait transcoding before publish the video
1060 description: Text describing how to support the video uploader
1063 description: Whether or not this video contains sensitive content
1066 description: Video name
1069 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1078 description: Enable or disable comments for this video
1080 originallyPublishedAt:
1081 description: Date when the content was originally published
1085 $ref: '#/components/schemas/VideoScheduledUpdate'
1092 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1094 contentType: image/jpeg
1096 contentType: image/jpeg
1100 ## DEPENDENCIES: httpie, jq
1101 # pip install httpie
1102 USERNAME="<your_username>"
1103 PASSWORD="<your_password>"
1104 FILE_PATH="<your_file_path>"
1105 CHANNEL_ID="<your_channel_id>"
1108 API_PATH="https://peertube2.cpy.re/api/v1"
1110 client_id=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_id")
1111 client_secret=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
1112 token=$(http -b --form POST "$API_PATH/users/token" \
1113 client_id="$client_id" client_secret="$client_secret" grant_type=password response_type=code \
1114 username=$USERNAME \
1115 password=$PASSWORD \
1116 | jq -r ".access_token")
1118 http -b --form POST "$API_PATH/videos/upload" \
1119 videofile@$FILE_PATH \
1120 channelId=$CHANNEL_ID \
1122 "Authorization:Bearer $token"
1125 summary: Import a video
1126 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
1133 description: successful operation
1137 $ref: '#/components/schemas/VideoUploadResponse'
1140 multipart/form-data:
1145 description: Torrent File
1149 description: HTTP target URL
1152 description: Magnet URI
1155 description: Channel id that will contain this video
1158 description: Video thumbnail file
1162 description: Video preview file
1166 $ref: '#/components/schemas/VideoPrivacySet'
1168 description: Video category
1171 description: Video licence
1174 description: Video language
1177 description: Video description
1180 description: Whether or not we wait transcoding before publish the video
1183 description: Text describing how to support the video uploader
1186 description: Whether or not this video contains sensitive content
1189 description: Video name
1192 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1201 description: Enable or disable comments for this video
1204 $ref: '#/components/schemas/VideoScheduledUpdate'
1210 contentType: application/x-bittorrent
1212 contentType: image/jpeg
1214 contentType: image/jpeg
1217 summary: List video abuses
1225 - $ref: '#/components/parameters/start'
1226 - $ref: '#/components/parameters/count'
1227 - $ref: '#/components/parameters/abusesSort'
1230 description: successful operation
1236 $ref: '#/components/schemas/VideoAbuse'
1237 '/videos/{id}/abuse':
1239 summary: Report an abuse
1246 - $ref: '#/components/parameters/idOrUUID'
1254 description: Reason why the user reports this video
1258 description: successful operation
1259 '/videos/{id}/abuse/{abuseId}':
1261 summary: Update an abuse
1270 description: successful operation
1272 - $ref: '#/components/parameters/idOrUUID'
1273 - $ref: '#/components/parameters/abuseId'
1281 $ref: '#/components/schemas/VideoAbuseStateSet'
1284 description: 'Update the comment of the video abuse for other admin/moderators'
1286 summary: Delete an abuse
1295 description: successful operation
1297 - $ref: '#/components/parameters/idOrUUID'
1298 - $ref: '#/components/parameters/abuseId'
1300 '/videos/{id}/blacklist':
1302 summary: Blacklist a video
1310 - $ref: '#/components/parameters/idOrUUID'
1313 description: successful operation
1315 summary: Delete an entry of the blacklist of a video by its id
1323 - $ref: '#/components/parameters/idOrUUID'
1326 description: successful operation
1329 summary: List blacklisted videos
1337 - $ref: '#/components/parameters/start'
1338 - $ref: '#/components/parameters/count'
1339 - $ref: '#/components/parameters/blacklistsSort'
1342 description: successful operation
1348 $ref: '#/components/schemas/VideoBlacklist'
1349 /videos/{id}/captions:
1351 summary: List captions of a video
1355 - $ref: '#/components/parameters/idOrUUID'
1358 description: successful operation
1369 $ref: '#/components/schemas/VideoCaption'
1370 /videos/{id}/captions/{captionLanguage}:
1372 summary: Add or replace a video caption
1376 - $ref: '#/components/parameters/idOrUUID'
1377 - $ref: '#/components/parameters/captionLanguage'
1380 multipart/form-data:
1385 description: The file to upload.
1390 contentType: text/vtt, application/x-subrip, text/plain
1393 description: successful operation
1395 summary: Delete a video caption
1399 - $ref: '#/components/parameters/idOrUUID'
1400 - $ref: '#/components/parameters/captionLanguage'
1403 description: successful operation
1406 summary: List video channels
1410 - $ref: '#/components/parameters/start'
1411 - $ref: '#/components/parameters/count'
1412 - $ref: '#/components/parameters/sort'
1415 description: successful operation
1421 $ref: '#/components/schemas/VideoChannel'
1423 summary: Create a video channel
1430 description: successful operation
1435 $ref: '#/components/schemas/VideoChannelCreate'
1436 '/video-channels/{channelHandle}':
1438 summary: Get a video channel
1442 - $ref: '#/components/parameters/channelHandle'
1445 description: successful operation
1449 $ref: '#/components/schemas/VideoChannel'
1451 summary: Update a video channel
1457 - $ref: '#/components/parameters/channelHandle'
1460 description: successful operation
1465 $ref: '#/components/schemas/VideoChannelUpdate'
1467 summary: Delete a video channel
1473 - $ref: '#/components/parameters/channelHandle'
1476 description: successful operation
1477 '/video-channels/{channelHandle}/videos':
1479 summary: List videos of a video channel
1484 - $ref: '#/components/parameters/channelHandle'
1485 - $ref: '#/components/parameters/categoryOneOf'
1486 - $ref: '#/components/parameters/tagsOneOf'
1487 - $ref: '#/components/parameters/tagsAllOf'
1488 - $ref: '#/components/parameters/licenceOneOf'
1489 - $ref: '#/components/parameters/languageOneOf'
1490 - $ref: '#/components/parameters/nsfw'
1491 - $ref: '#/components/parameters/filter'
1492 - $ref: '#/components/parameters/skipCount'
1493 - $ref: '#/components/parameters/start'
1494 - $ref: '#/components/parameters/count'
1495 - $ref: '#/components/parameters/videosSort'
1498 description: successful operation
1502 $ref: '#/components/schemas/VideoListResponse'
1504 /video-playlists/privacies:
1506 summary: List available playlist privacies
1511 description: successful operation
1521 summary: List video playlists
1525 - $ref: '#/components/parameters/start'
1526 - $ref: '#/components/parameters/count'
1527 - $ref: '#/components/parameters/sort'
1530 description: successful operation
1536 $ref: '#/components/schemas/VideoPlaylist'
1538 summary: Create a video playlist
1539 description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
1546 description: successful operation
1561 multipart/form-data:
1566 description: Video playlist display name
1569 description: Video playlist thumbnail file
1573 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1575 description: Video playlist description
1578 description: Video channel in which the playlist will be published
1583 /video-playlists/{id}:
1585 summary: Get a video playlist
1589 - $ref: '#/components/parameters/idOrUUID'
1592 description: successful operation
1596 $ref: '#/components/schemas/VideoPlaylist'
1598 summary: Update a video playlist
1599 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
1606 description: successful operation
1608 - $ref: '#/components/parameters/idOrUUID'
1611 multipart/form-data:
1616 description: Video playlist display name
1619 description: Video playlist thumbnail file
1623 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1625 description: Video playlist description
1628 description: Video channel in which the playlist will be published
1631 summary: Delete a video playlist
1637 - $ref: '#/components/parameters/idOrUUID'
1640 description: successful operation
1642 /video-playlists/{id}/videos:
1644 summary: 'List videos of a playlist'
1649 - $ref: '#/components/parameters/idOrUUID'
1652 description: successful operation
1656 $ref: '#/components/schemas/VideoListResponse'
1658 summary: 'Add a video in a playlist'
1665 - $ref: '#/components/parameters/idOrUUID'
1668 description: successful operation
1674 videoPlaylistElement:
1687 description: 'Video to add in the playlist'
1690 description: 'Start the video at this specific timestamp (in seconds)'
1693 description: 'Stop the video at this specific timestamp (in seconds)'
1697 /video-playlists/{id}/videos/reorder:
1699 summary: 'Reorder a playlist'
1705 - $ref: '#/components/parameters/idOrUUID'
1708 description: successful operation
1717 description: 'Start position of the element to reorder (starts from 1)'
1718 insertAfterPosition:
1720 description: 'New position for the block to reorder (starts from 0, to add the block before the first element)'
1723 description: 'How many element from startPosition to reorder (minimum length is 1)'
1726 - insertAfterPosition
1728 /video-playlists/{id}/videos/{playlistElementId}:
1730 summary: 'Update a playlist element'
1736 - $ref: '#/components/parameters/idOrUUID'
1737 - $ref: '#/components/parameters/playlistElementId'
1740 description: successful operation
1749 description: 'Start the video at this specific timestamp (in seconds)'
1752 description: 'Stop the video at this specific timestamp (in seconds)'
1754 summary: 'Delete an element from a playlist'
1760 - $ref: '#/components/parameters/idOrUUID'
1761 - $ref: '#/components/parameters/playlistElementId'
1764 description: successful operation
1766 '/users/me/video-playlists/videos-exist':
1768 summary: 'Check video exists in my playlists'
1777 description: The video ids to check
1784 description: successful operation
1804 '/accounts/{name}/video-channels':
1806 summary: List video channels of an account
1811 - $ref: '#/components/parameters/name'
1814 description: successful operation
1820 $ref: '#/components/schemas/VideoChannel'
1821 '/accounts/{name}/ratings':
1823 summary: List ratings of an account
1829 - $ref: '#/components/parameters/name'
1830 - $ref: '#/components/parameters/start'
1831 - $ref: '#/components/parameters/count'
1832 - $ref: '#/components/parameters/sort'
1836 description: Optionally filter which ratings to retrieve
1844 description: successful operation
1850 $ref: '#/components/schemas/VideoRating'
1851 '/videos/{id}/comment-threads':
1853 summary: List threads of a video
1857 - $ref: '#/components/parameters/idOrUUID'
1858 - $ref: '#/components/parameters/start'
1859 - $ref: '#/components/parameters/count'
1860 - $ref: '#/components/parameters/commentsSort'
1863 description: successful operation
1867 $ref: '#/components/schemas/CommentThreadResponse'
1869 summary: Create a thread
1875 - $ref: '#/components/parameters/idOrUUID'
1878 description: successful operation
1882 $ref: '#/components/schemas/CommentThreadPostResponse'
1891 description: 'Text comment'
1895 '/videos/{id}/comment-threads/{threadId}':
1897 summary: Get a thread
1901 - $ref: '#/components/parameters/idOrUUID'
1902 - $ref: '#/components/parameters/threadId'
1905 description: successful operation
1909 $ref: '#/components/schemas/VideoCommentThreadTree'
1910 '/videos/{id}/comments/{commentId}':
1912 summary: Reply to a thread of a video
1918 - $ref: '#/components/parameters/idOrUUID'
1919 - $ref: '#/components/parameters/commentId'
1922 description: successful operation
1926 $ref: '#/components/schemas/CommentThreadPostResponse'
1935 description: 'Text comment'
1940 summary: Delete a comment or a reply
1946 - $ref: '#/components/parameters/idOrUUID'
1947 - $ref: '#/components/parameters/commentId'
1950 description: successful operation
1951 '/videos/{id}/rate':
1953 summary: Like/dislike a video
1959 - $ref: '#/components/parameters/idOrUUID'
1962 description: successful operation
1967 summary: Search videos
1969 - $ref: '#/components/parameters/categoryOneOf'
1970 - $ref: '#/components/parameters/tagsOneOf'
1971 - $ref: '#/components/parameters/tagsAllOf'
1972 - $ref: '#/components/parameters/licenceOneOf'
1973 - $ref: '#/components/parameters/languageOneOf'
1974 - $ref: '#/components/parameters/nsfw'
1975 - $ref: '#/components/parameters/filter'
1976 - $ref: '#/components/parameters/skipCount'
1977 - $ref: '#/components/parameters/start'
1978 - $ref: '#/components/parameters/count'
1979 - $ref: '#/components/parameters/searchTarget'
1980 - $ref: '#/components/parameters/videosSearchSort'
1985 String to search. If the user can make a remote URI search, and the string is an URI then the
1986 PeerTube instance will fetch the remote object and add it to its database. Then,
1987 you can use the REST API to fetch the complete video information and interact with it.
1993 description: Get videos that are published after this date
2000 description: Get videos that are published before this date
2004 - name: originallyPublishedStartDate
2007 description: Get videos that are originally published after this date
2011 - name: originallyPublishedEndDate
2014 description: Get videos that are originally published before this date
2021 description: Get videos that have this minimum duration
2027 description: Get videos that have this maximum duration
2032 description: successful operation
2036 $ref: '#/components/schemas/VideoListResponse'
2037 /search/video-channels:
2041 summary: Search channels
2043 - $ref: '#/components/parameters/start'
2044 - $ref: '#/components/parameters/count'
2045 - $ref: '#/components/parameters/searchTarget'
2046 - $ref: '#/components/parameters/sort'
2051 String to search. If the user can make a remote URI search, and the string is an URI then the
2052 PeerTube instance will fetch the remote object and add it to its database. Then,
2053 you can use the REST API to fetch the complete channel information and interact with it.
2058 description: successful operation
2064 $ref: '#/components/schemas/VideoChannel'
2066 - url: 'https://peertube.cpy.re/api/v1'
2067 description: Live Test Server (live data - stable version)
2068 - url: 'https://peertube2.cpy.re/api/v1'
2069 description: Live Test Server (live data - latest nighlty version)
2070 - url: 'https://peertube3.cpy.re/api/v1'
2071 description: Live Test Server (live data - latest RC version)
2085 description: "Number of items (max: 100)"
2092 description: Sort column (-createdAt for example)
2100 If the administrator enabled search index support, you can override the default search target.
2103 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
2104 It means the instance may not know the objects you fetched. If you want to load video/channel information:
2105 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
2106 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
2107 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
2108 * If the current user has not the ability to make a remote URI search, then redirect the user on the origin instance or fetch
2109 the data from the origin instance API
2119 description: Sort videos by criteria
2134 description: Sort videos by criteria
2149 description: Sort comments by criteria
2159 description: Sort blacklists by criteria
2175 description: Sort users by criteria
2186 description: Sort abuses by criteria
2198 The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for
2206 description: The user id
2213 description: The object id or uuid
2217 name: playlistElementId
2220 description: Playlist element id
2227 description: Video abuse id
2231 name: captionLanguage
2234 description: The caption language
2241 description: "The video channel handle (example: 'my_username@example.com' or 'my_username')"
2245 name: subscriptionHandle
2248 description: "The subscription handle (example: 'my_username@example.com' or 'my_username')"
2255 description: The thread id (root comment id)
2262 description: The comment id
2269 description: category id of the video (see /videos/categories)
2282 description: tag(s) of the video
2295 description: tag(s) of the video, where all should be present in the video
2308 description: language id of the video (see /videos/languages). Use _unknown to filter on videos that don't have a video language
2321 description: licence id of the video (see /videos/licences)
2334 description: if you don't need the `total` in the response
2344 description: whether to include nsfw videos, if any
2355 Special filters (local for instance) which might require special rights:
2356 * `local` - only videos local to the instance
2357 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
2367 description: list of uris to check if each is part of the user subscriptions
2375 In the header: *Authorization: Bearer <token\>*
2378 Authenticating via OAuth requires the following steps:
2381 - Have an account with sufficient authorization levels
2383 - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
2386 - Make Authenticated Requests
2390 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
2393 moderator: Moderator scope
2396 VideoConstantNumber:
2402 VideoConstantString:
2409 VideoPlaylistPrivacySet:
2415 description: 'The video playlist privacy (Public = 1, Unlisted = 2, Private = 3)'
2416 VideoPlaylistPrivacyConstant:
2419 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2423 VideoPlaylistTypeSet:
2428 description: 'The video playlist type (Regular = 1, Watch Later = 2)'
2429 VideoPlaylistTypeConstant:
2432 $ref: '#/components/schemas/VideoPlaylistTypeSet'
2443 description: 'The video privacy (Public = 1, Unlisted = 2, Private = 3, Internal = 4)'
2444 VideoPrivacyConstant:
2447 $ref: '#/components/schemas/VideoPrivacySet'
2464 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
2474 description: 'The video state (Published = 1, to transcode = 2, to import = 3)'
2484 description: 'The video playlist privacy (Pending = 1, Rejected = 2, Accepted = 3)'
2485 VideoAbuseStateConstant:
2488 $ref: '#/components/schemas/VideoAbuseStateSet'
2492 VideoResolutionConstant:
2496 description: 'Video resolution (240, 360, 720 ...)'
2499 VideoScheduledUpdate:
2502 $ref: '#/components/schemas/VideoPrivacySet'
2506 description: When to update the video
2524 - $ref: '#/components/schemas/Avatar'
2525 VideoChannelSummary:
2540 - $ref: '#/components/schemas/Avatar'
2552 - $ref: '#/components/schemas/Video'
2558 $ref: '#/components/schemas/VideoResolutionConstant'
2561 description: 'Video file size in bytes'
2574 VideoStreamingPlaylists:
2582 description: 'Playlist type (HLS = 1)'
2590 $ref: '#/components/schemas/VideoFile'
2610 originallyPublishedAt:
2613 $ref: '#/components/schemas/VideoConstantNumber'
2615 $ref: '#/components/schemas/VideoConstantNumber'
2617 $ref: '#/components/schemas/VideoConstantString'
2619 $ref: '#/components/schemas/VideoPrivacyConstant'
2646 $ref: '#/components/schemas/VideoStateConstant'
2650 - $ref: '#/components/schemas/VideoScheduledUpdate'
2658 $ref: '#/components/schemas/AccountSummary'
2660 $ref: '#/components/schemas/VideoChannelSummary'
2669 - $ref: '#/components/schemas/Video'
2677 $ref: '#/components/schemas/VideoChannel'
2679 $ref: '#/components/schemas/Account'
2687 $ref: '#/components/schemas/VideoFile'
2699 $ref: '#/components/schemas/VideoStreamingPlaylists'
2700 VideoImportStateConstant:
2708 description: 'The video import state (Pending = 1, Success = 2, Failed = 3)'
2725 $ref: '#/components/schemas/VideoImportStateConstant'
2735 $ref: '#/components/schemas/Video'
2743 $ref: '#/components/schemas/Account'
2745 $ref: '#/components/schemas/VideoAbuseStateConstant'
2821 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
2823 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
2825 $ref: '#/components/schemas/AccountSummary'
2827 $ref: '#/components/schemas/VideoChannelSummary'
2846 totalRepliesFromVideoAuthor:
2851 $ref: '#/components/schemas/Account'
2852 VideoCommentThreadTree:
2855 $ref: '#/components/schemas/VideoComment'
2859 $ref: '#/components/schemas/VideoCommentThreadTree'
2863 $ref: '#/components/schemas/VideoConstantString'
2893 $ref: '#/components/schemas/Avatar'
2896 - $ref: '#/components/schemas/Actor'
2914 description: 'Theme enabled by this user'
2917 description: 'Is email verified?'
2919 $ref: '#/components/schemas/NSFWPolicy'
2925 $ref: '#/components/schemas/UserRole'
2940 videoAbusesAcceptedCount:
2942 videoAbusesCreatedCount:
2946 noInstanceConfigWarningModal:
2957 $ref: '#/components/schemas/Account'
2961 $ref: '#/components/schemas/VideoChannel'
3031 allowedForCurrentIP:
3033 requiresEmailVerification:
3236 requiresEmailVerification:
3260 allowAdditionalExtensions:
3328 $ref: '#/components/schemas/Actor'
3330 $ref: '#/components/schemas/Actor'
3372 VideoUploadResponse:
3381 CommentThreadResponse:
3388 $ref: '#/components/schemas/VideoComment'
3389 CommentThreadPostResponse:
3392 $ref: '#/components/schemas/VideoComment'
3400 $ref: '#/components/schemas/Video'
3405 description: 'The user username '
3408 description: 'The user password. If the smtp server is configured, you can leave empty and an email will be sent '
3411 description: 'The user email '
3414 description: 'The user videoQuota '
3417 description: 'The user daily video quota '
3419 $ref: '#/components/schemas/UserRole'
3431 description: 'The user id '
3434 description: 'The updated email of the user '
3437 description: 'The updated videoQuota of the user '
3440 description: 'The updated daily video quota of the user '
3442 $ref: '#/components/schemas/UserRole'
3453 description: 'Your new password '
3456 description: 'Your new email '
3459 description: 'Your new displayNSFW '
3462 description: 'Your new autoPlayVideo '
3472 description: 'Id of the video '
3475 description: 'Rating of the video '
3482 $ref: '#/components/schemas/Video'
3485 description: 'Rating of the video'
3493 description: 'The username of the user '
3496 description: 'The password of the user '
3499 description: 'The email of the user '
3502 description: 'The user display name'
3508 description: 'The default channel name'
3511 description: 'The default channel display name'
3538 bulkVideosSupportUpdate:
3540 description: 'Update all videos support field of this channel'