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'
1255 description: Reason why the user reports this video
1258 description: Reason categories that help triage reports
1273 description: Timestamp in the video that marks the beginning of the report
1276 description: Timestamp in the video that marks the ending of the report
1281 description: successful operation
1282 '/videos/{id}/abuse/{abuseId}':
1284 summary: Update an abuse
1293 description: successful operation
1295 - $ref: '#/components/parameters/idOrUUID'
1296 - $ref: '#/components/parameters/abuseId'
1304 $ref: '#/components/schemas/VideoAbuseStateSet'
1307 description: 'Update the comment of the video abuse for other admin/moderators'
1309 summary: Delete an abuse
1318 description: successful operation
1320 - $ref: '#/components/parameters/idOrUUID'
1321 - $ref: '#/components/parameters/abuseId'
1323 '/videos/{id}/blacklist':
1325 summary: Blacklist a video
1333 - $ref: '#/components/parameters/idOrUUID'
1336 description: successful operation
1338 summary: Delete an entry of the blacklist of a video by its id
1346 - $ref: '#/components/parameters/idOrUUID'
1349 description: successful operation
1352 summary: List blacklisted videos
1360 - $ref: '#/components/parameters/start'
1361 - $ref: '#/components/parameters/count'
1362 - $ref: '#/components/parameters/blacklistsSort'
1365 description: successful operation
1371 $ref: '#/components/schemas/VideoBlacklist'
1372 /videos/{id}/captions:
1374 summary: List captions of a video
1378 - $ref: '#/components/parameters/idOrUUID'
1381 description: successful operation
1392 $ref: '#/components/schemas/VideoCaption'
1393 /videos/{id}/captions/{captionLanguage}:
1395 summary: Add or replace a video caption
1399 - $ref: '#/components/parameters/idOrUUID'
1400 - $ref: '#/components/parameters/captionLanguage'
1403 multipart/form-data:
1408 description: The file to upload.
1413 contentType: text/vtt, application/x-subrip, text/plain
1416 description: successful operation
1418 summary: Delete a video caption
1422 - $ref: '#/components/parameters/idOrUUID'
1423 - $ref: '#/components/parameters/captionLanguage'
1426 description: successful operation
1429 summary: List video channels
1433 - $ref: '#/components/parameters/start'
1434 - $ref: '#/components/parameters/count'
1435 - $ref: '#/components/parameters/sort'
1438 description: successful operation
1444 $ref: '#/components/schemas/VideoChannel'
1446 summary: Create a video channel
1453 description: successful operation
1458 $ref: '#/components/schemas/VideoChannelCreate'
1459 '/video-channels/{channelHandle}':
1461 summary: Get a video channel
1465 - $ref: '#/components/parameters/channelHandle'
1468 description: successful operation
1472 $ref: '#/components/schemas/VideoChannel'
1474 summary: Update a video channel
1480 - $ref: '#/components/parameters/channelHandle'
1483 description: successful operation
1488 $ref: '#/components/schemas/VideoChannelUpdate'
1490 summary: Delete a video channel
1496 - $ref: '#/components/parameters/channelHandle'
1499 description: successful operation
1500 '/video-channels/{channelHandle}/videos':
1502 summary: List videos of a video channel
1507 - $ref: '#/components/parameters/channelHandle'
1508 - $ref: '#/components/parameters/categoryOneOf'
1509 - $ref: '#/components/parameters/tagsOneOf'
1510 - $ref: '#/components/parameters/tagsAllOf'
1511 - $ref: '#/components/parameters/licenceOneOf'
1512 - $ref: '#/components/parameters/languageOneOf'
1513 - $ref: '#/components/parameters/nsfw'
1514 - $ref: '#/components/parameters/filter'
1515 - $ref: '#/components/parameters/skipCount'
1516 - $ref: '#/components/parameters/start'
1517 - $ref: '#/components/parameters/count'
1518 - $ref: '#/components/parameters/videosSort'
1521 description: successful operation
1525 $ref: '#/components/schemas/VideoListResponse'
1527 /video-playlists/privacies:
1529 summary: List available playlist privacies
1534 description: successful operation
1544 summary: List video playlists
1548 - $ref: '#/components/parameters/start'
1549 - $ref: '#/components/parameters/count'
1550 - $ref: '#/components/parameters/sort'
1553 description: successful operation
1559 $ref: '#/components/schemas/VideoPlaylist'
1561 summary: Create a video playlist
1562 description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
1569 description: successful operation
1584 multipart/form-data:
1589 description: Video playlist display name
1592 description: Video playlist thumbnail file
1596 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1598 description: Video playlist description
1601 description: Video channel in which the playlist will be published
1606 /video-playlists/{id}:
1608 summary: Get a video playlist
1612 - $ref: '#/components/parameters/idOrUUID'
1615 description: successful operation
1619 $ref: '#/components/schemas/VideoPlaylist'
1621 summary: Update a video playlist
1622 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
1629 description: successful operation
1631 - $ref: '#/components/parameters/idOrUUID'
1634 multipart/form-data:
1639 description: Video playlist display name
1642 description: Video playlist thumbnail file
1646 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1648 description: Video playlist description
1651 description: Video channel in which the playlist will be published
1654 summary: Delete a video playlist
1660 - $ref: '#/components/parameters/idOrUUID'
1663 description: successful operation
1665 /video-playlists/{id}/videos:
1667 summary: 'List videos of a playlist'
1672 - $ref: '#/components/parameters/idOrUUID'
1675 description: successful operation
1679 $ref: '#/components/schemas/VideoListResponse'
1681 summary: 'Add a video in a playlist'
1688 - $ref: '#/components/parameters/idOrUUID'
1691 description: successful operation
1697 videoPlaylistElement:
1710 description: 'Video to add in the playlist'
1713 description: 'Start the video at this specific timestamp (in seconds)'
1716 description: 'Stop the video at this specific timestamp (in seconds)'
1720 /video-playlists/{id}/videos/reorder:
1722 summary: 'Reorder a playlist'
1728 - $ref: '#/components/parameters/idOrUUID'
1731 description: successful operation
1740 description: 'Start position of the element to reorder (starts from 1)'
1741 insertAfterPosition:
1743 description: 'New position for the block to reorder (starts from 0, to add the block before the first element)'
1746 description: 'How many element from startPosition to reorder (minimum length is 1)'
1749 - insertAfterPosition
1751 /video-playlists/{id}/videos/{playlistElementId}:
1753 summary: 'Update a playlist element'
1759 - $ref: '#/components/parameters/idOrUUID'
1760 - $ref: '#/components/parameters/playlistElementId'
1763 description: successful operation
1772 description: 'Start the video at this specific timestamp (in seconds)'
1775 description: 'Stop the video at this specific timestamp (in seconds)'
1777 summary: 'Delete an element from a playlist'
1783 - $ref: '#/components/parameters/idOrUUID'
1784 - $ref: '#/components/parameters/playlistElementId'
1787 description: successful operation
1789 '/users/me/video-playlists/videos-exist':
1791 summary: 'Check video exists in my playlists'
1800 description: The video ids to check
1807 description: successful operation
1827 '/accounts/{name}/video-channels':
1829 summary: List video channels of an account
1834 - $ref: '#/components/parameters/name'
1837 description: successful operation
1843 $ref: '#/components/schemas/VideoChannel'
1844 '/accounts/{name}/ratings':
1846 summary: List ratings of an account
1852 - $ref: '#/components/parameters/name'
1853 - $ref: '#/components/parameters/start'
1854 - $ref: '#/components/parameters/count'
1855 - $ref: '#/components/parameters/sort'
1859 description: Optionally filter which ratings to retrieve
1867 description: successful operation
1873 $ref: '#/components/schemas/VideoRating'
1874 '/videos/{id}/comment-threads':
1876 summary: List threads of a video
1880 - $ref: '#/components/parameters/idOrUUID'
1881 - $ref: '#/components/parameters/start'
1882 - $ref: '#/components/parameters/count'
1883 - $ref: '#/components/parameters/commentsSort'
1886 description: successful operation
1890 $ref: '#/components/schemas/CommentThreadResponse'
1892 summary: Create a thread
1898 - $ref: '#/components/parameters/idOrUUID'
1901 description: successful operation
1905 $ref: '#/components/schemas/CommentThreadPostResponse'
1914 description: 'Text comment'
1918 '/videos/{id}/comment-threads/{threadId}':
1920 summary: Get a thread
1924 - $ref: '#/components/parameters/idOrUUID'
1925 - $ref: '#/components/parameters/threadId'
1928 description: successful operation
1932 $ref: '#/components/schemas/VideoCommentThreadTree'
1933 '/videos/{id}/comments/{commentId}':
1935 summary: Reply to a thread of a video
1941 - $ref: '#/components/parameters/idOrUUID'
1942 - $ref: '#/components/parameters/commentId'
1945 description: successful operation
1949 $ref: '#/components/schemas/CommentThreadPostResponse'
1958 description: 'Text comment'
1963 summary: Delete a comment or a reply
1969 - $ref: '#/components/parameters/idOrUUID'
1970 - $ref: '#/components/parameters/commentId'
1973 description: successful operation
1974 '/videos/{id}/rate':
1976 summary: Like/dislike a video
1982 - $ref: '#/components/parameters/idOrUUID'
1985 description: successful operation
1990 summary: Search videos
1992 - $ref: '#/components/parameters/categoryOneOf'
1993 - $ref: '#/components/parameters/tagsOneOf'
1994 - $ref: '#/components/parameters/tagsAllOf'
1995 - $ref: '#/components/parameters/licenceOneOf'
1996 - $ref: '#/components/parameters/languageOneOf'
1997 - $ref: '#/components/parameters/nsfw'
1998 - $ref: '#/components/parameters/filter'
1999 - $ref: '#/components/parameters/skipCount'
2000 - $ref: '#/components/parameters/start'
2001 - $ref: '#/components/parameters/count'
2002 - $ref: '#/components/parameters/searchTarget'
2003 - $ref: '#/components/parameters/videosSearchSort'
2008 String to search. If the user can make a remote URI search, and the string is an URI then the
2009 PeerTube instance will fetch the remote object and add it to its database. Then,
2010 you can use the REST API to fetch the complete video information and interact with it.
2016 description: Get videos that are published after this date
2023 description: Get videos that are published before this date
2027 - name: originallyPublishedStartDate
2030 description: Get videos that are originally published after this date
2034 - name: originallyPublishedEndDate
2037 description: Get videos that are originally published before this date
2044 description: Get videos that have this minimum duration
2050 description: Get videos that have this maximum duration
2055 description: successful operation
2059 $ref: '#/components/schemas/VideoListResponse'
2060 /search/video-channels:
2064 summary: Search channels
2066 - $ref: '#/components/parameters/start'
2067 - $ref: '#/components/parameters/count'
2068 - $ref: '#/components/parameters/searchTarget'
2069 - $ref: '#/components/parameters/sort'
2074 String to search. If the user can make a remote URI search, and the string is an URI then the
2075 PeerTube instance will fetch the remote object and add it to its database. Then,
2076 you can use the REST API to fetch the complete channel information and interact with it.
2081 description: successful operation
2087 $ref: '#/components/schemas/VideoChannel'
2089 - url: 'https://peertube.cpy.re/api/v1'
2090 description: Live Test Server (live data - stable version)
2091 - url: 'https://peertube2.cpy.re/api/v1'
2092 description: Live Test Server (live data - latest nighlty version)
2093 - url: 'https://peertube3.cpy.re/api/v1'
2094 description: Live Test Server (live data - latest RC version)
2108 description: "Number of items (max: 100)"
2115 description: Sort column (-createdAt for example)
2123 If the administrator enabled search index support, you can override the default search target.
2126 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
2127 It means the instance may not know the objects you fetched. If you want to load video/channel information:
2128 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
2129 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
2130 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
2131 * If the current user has not the ability to make a remote URI search, then redirect the user on the origin instance or fetch
2132 the data from the origin instance API
2142 description: Sort videos by criteria
2157 description: Sort videos by criteria
2172 description: Sort comments by criteria
2182 description: Sort blacklists by criteria
2198 description: Sort users by criteria
2209 description: Sort abuses by criteria
2221 The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for
2229 description: The user id
2236 description: The object id or uuid
2240 name: playlistElementId
2243 description: Playlist element id
2250 description: Video abuse id
2254 name: captionLanguage
2257 description: The caption language
2264 description: "The video channel handle (example: 'my_username@example.com' or 'my_username')"
2268 name: subscriptionHandle
2271 description: "The subscription handle (example: 'my_username@example.com' or 'my_username')"
2278 description: The thread id (root comment id)
2285 description: The comment id
2292 description: category id of the video (see /videos/categories)
2305 description: tag(s) of the video
2318 description: tag(s) of the video, where all should be present in the video
2331 description: language id of the video (see /videos/languages). Use _unknown to filter on videos that don't have a video language
2344 description: licence id of the video (see /videos/licences)
2357 description: if you don't need the `total` in the response
2367 description: whether to include nsfw videos, if any
2378 Special filters (local for instance) which might require special rights:
2379 * `local` - only videos local to the instance
2380 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
2390 description: list of uris to check if each is part of the user subscriptions
2398 In the header: *Authorization: Bearer <token\>*
2401 Authenticating via OAuth requires the following steps:
2404 - Have an account with sufficient authorization levels
2406 - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
2409 - Make Authenticated Requests
2413 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
2416 moderator: Moderator scope
2419 VideoConstantNumber:
2425 VideoConstantString:
2432 VideoPlaylistPrivacySet:
2438 description: 'The video playlist privacy (Public = 1, Unlisted = 2, Private = 3)'
2439 VideoPlaylistPrivacyConstant:
2442 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2446 VideoPlaylistTypeSet:
2451 description: 'The video playlist type (Regular = 1, Watch Later = 2)'
2452 VideoPlaylistTypeConstant:
2455 $ref: '#/components/schemas/VideoPlaylistTypeSet'
2466 description: 'The video privacy (Public = 1, Unlisted = 2, Private = 3, Internal = 4)'
2467 VideoPrivacyConstant:
2470 $ref: '#/components/schemas/VideoPrivacySet'
2487 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
2497 description: 'The video state (Published = 1, to transcode = 2, to import = 3)'
2507 description: 'The video playlist privacy (Pending = 1, Rejected = 2, Accepted = 3)'
2508 VideoAbuseStateConstant:
2511 $ref: '#/components/schemas/VideoAbuseStateSet'
2514 VideoAbusePredefinedReasons:
2528 VideoResolutionConstant:
2532 description: 'Video resolution (240, 360, 720 ...)'
2535 VideoScheduledUpdate:
2538 $ref: '#/components/schemas/VideoPrivacySet'
2542 description: When to update the video
2560 - $ref: '#/components/schemas/Avatar'
2561 VideoChannelSummary:
2576 - $ref: '#/components/schemas/Avatar'
2588 - $ref: '#/components/schemas/Video'
2594 $ref: '#/components/schemas/VideoResolutionConstant'
2597 description: 'Video file size in bytes'
2610 VideoStreamingPlaylists:
2618 description: 'Playlist type (HLS = 1)'
2626 $ref: '#/components/schemas/VideoFile'
2646 originallyPublishedAt:
2649 $ref: '#/components/schemas/VideoConstantNumber'
2651 $ref: '#/components/schemas/VideoConstantNumber'
2653 $ref: '#/components/schemas/VideoConstantString'
2655 $ref: '#/components/schemas/VideoPrivacyConstant'
2682 $ref: '#/components/schemas/VideoStateConstant'
2686 - $ref: '#/components/schemas/VideoScheduledUpdate'
2694 $ref: '#/components/schemas/AccountSummary'
2696 $ref: '#/components/schemas/VideoChannelSummary'
2705 - $ref: '#/components/schemas/Video'
2713 $ref: '#/components/schemas/VideoChannel'
2715 $ref: '#/components/schemas/Account'
2723 $ref: '#/components/schemas/VideoFile'
2735 $ref: '#/components/schemas/VideoStreamingPlaylists'
2736 VideoImportStateConstant:
2744 description: 'The video import state (Pending = 1, Success = 2, Failed = 3)'
2761 $ref: '#/components/schemas/VideoImportStateConstant'
2771 $ref: '#/components/schemas/Video'
2779 $ref: '#/components/schemas/VideoAbusePredefinedReasons'
2781 $ref: '#/components/schemas/Account'
2783 $ref: '#/components/schemas/VideoAbuseStateConstant'
2859 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
2861 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
2863 $ref: '#/components/schemas/AccountSummary'
2865 $ref: '#/components/schemas/VideoChannelSummary'
2884 totalRepliesFromVideoAuthor:
2889 $ref: '#/components/schemas/Account'
2890 VideoCommentThreadTree:
2893 $ref: '#/components/schemas/VideoComment'
2897 $ref: '#/components/schemas/VideoCommentThreadTree'
2901 $ref: '#/components/schemas/VideoConstantString'
2931 $ref: '#/components/schemas/Avatar'
2934 - $ref: '#/components/schemas/Actor'
2952 description: 'Theme enabled by this user'
2955 description: 'Is email verified?'
2957 $ref: '#/components/schemas/NSFWPolicy'
2963 $ref: '#/components/schemas/UserRole'
2978 videoAbusesAcceptedCount:
2980 videoAbusesCreatedCount:
2984 noInstanceConfigWarningModal:
2995 $ref: '#/components/schemas/Account'
2999 $ref: '#/components/schemas/VideoChannel'
3069 allowedForCurrentIP:
3071 requiresEmailVerification:
3274 requiresEmailVerification:
3298 allowAdditionalExtensions:
3366 $ref: '#/components/schemas/Actor'
3368 $ref: '#/components/schemas/Actor'
3410 VideoUploadResponse:
3419 CommentThreadResponse:
3426 $ref: '#/components/schemas/VideoComment'
3427 CommentThreadPostResponse:
3430 $ref: '#/components/schemas/VideoComment'
3438 $ref: '#/components/schemas/Video'
3443 description: 'The user username '
3446 description: 'The user password. If the smtp server is configured, you can leave empty and an email will be sent '
3449 description: 'The user email '
3452 description: 'The user videoQuota '
3455 description: 'The user daily video quota '
3457 $ref: '#/components/schemas/UserRole'
3469 description: 'The user id '
3472 description: 'The updated email of the user '
3475 description: 'The updated videoQuota of the user '
3478 description: 'The updated daily video quota of the user '
3480 $ref: '#/components/schemas/UserRole'
3491 description: 'Your new password '
3494 description: 'Your new email '
3497 description: 'Your new displayNSFW '
3500 description: 'Your new autoPlayVideo '
3510 description: 'Id of the video '
3513 description: 'Rating of the video '
3520 $ref: '#/components/schemas/Video'
3523 description: 'Rating of the video'
3531 description: 'The username of the user '
3534 description: 'The password of the user '
3537 description: 'The email of the user '
3540 description: 'The user display name'
3546 description: 'The default channel name'
3549 description: 'The default channel display name'
3576 bulkVideosSupportUpdate:
3578 description: 'Update all videos support field of this channel'