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. The spec API is fully compatible with
19 [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO)
20 which generates a client SDK in the language of your choice - we generate some client SDKs automatically:
22 - [Python](https://framagit.org/framasoft/peertube/clients/python)
23 - [Go](https://framagit.org/framasoft/peertube/clients/go)
24 - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin)
26 See the [Quick Start guide](https://docs.joinpeertube.org/#/api-rest-getting-started) so you can play with the PeerTube API.
30 When you sign up for an account, you are given the possibility to generate
31 sessions, and authenticate using this session token. One session token can
32 currently be used at a time.
36 The API uses standard HTTP status codes to indicate the success or failure
37 of the API call. The body of the response will be JSON in the following
42 "code": "unauthorized_request", // example inner error code
43 "error": "Token is invalid." // example exposed error message
47 url: https://docs.joinpeertube.org/api-rest-reference.html
51 Using some features of PeerTube require authentication, for which Accounts
52 provide different levels of permission as well as associated user
53 information. Accounts also encompass remote accounts discovered across the federation.
56 Each server exposes public information regarding supported videos and
60 Jobs are long-running tasks enqueued and processed by the instance
61 itself. No additional worker registration is currently available.
62 - name: Instance Follows
64 Managing servers which the instance interacts with is crucial to the
65 concept of federation in PeerTube and external video indexation. The PeerTube
66 server then deals with inter-server ActivityPub operations and propagates
67 information across its social graph by posting activities to actors' inbox
71 Video abuses deal with reports of local or remote videos alike.
74 Operations dealing with listing, uploading, fetching or modifying videos.
77 The search helps to find _videos_ or _channels_ from within the instance and beyond.
78 Videos from other instances federated by the instance (that is, instances
79 followed by the instance) can be found via keywords and other criteria of
82 Administrators can also enable the use of a remote search system, indexing
83 videos and channels not could be not federated by the instance.
84 - name: Video Comments
86 Operations dealing with comments to a video. Comments are organized in
88 - name: Video Playlists
90 Operations dealing with playlists of videos. Playlists are bound to users
92 - name: Video Channels
94 Operations dealing with creation, modification and video listing of a
98 Operations dealing with blacklisting videos (removing them from view and
99 preventing interactions).
102 Like/dislike a video.
105 Server syndication feeds
122 - Video Ownership Change
133 - name: Instance Configuration
145 summary: Get an account
147 - $ref: '#/components/parameters/name'
150 description: successful operation
154 $ref: '#/components/schemas/Account'
156 description: account not found
157 '/accounts/{name}/videos':
162 summary: 'List videos of an account'
164 - $ref: '#/components/parameters/name'
165 - $ref: '#/components/parameters/categoryOneOf'
166 - $ref: '#/components/parameters/tagsOneOf'
167 - $ref: '#/components/parameters/tagsAllOf'
168 - $ref: '#/components/parameters/licenceOneOf'
169 - $ref: '#/components/parameters/languageOneOf'
170 - $ref: '#/components/parameters/nsfw'
171 - $ref: '#/components/parameters/filter'
172 - $ref: '#/components/parameters/skipCount'
173 - $ref: '#/components/parameters/start'
174 - $ref: '#/components/parameters/count'
175 - $ref: '#/components/parameters/videosSort'
178 description: successful operation
182 $ref: '#/components/schemas/VideoListResponse'
186 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
187 .then(function(response) {
188 return response.json()
189 }).then(function(data) {
195 http -b GET https://peertube2.cpy.re/api/v1/accounts/{name}/videos
201 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
203 http = Net::HTTP.new(uri.host, uri.port)
206 response = http.get(uri.request_uri)
208 puts JSON.parse(response.read_body)
213 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
221 summary: List accounts
223 - $ref: '#/components/parameters/start'
224 - $ref: '#/components/parameters/count'
225 - $ref: '#/components/parameters/sort'
228 description: successful operation
234 $ref: '#/components/schemas/Account'
239 summary: Get instance public configuration
242 description: successful operation
246 $ref: '#/components/schemas/ServerConfig'
249 summary: Get instance "About" information
254 description: successful operation
258 $ref: '#/components/schemas/ServerConfigAbout'
261 summary: Get instance runtime configuration
269 description: successful operation
273 $ref: '#/components/schemas/ServerConfigCustom'
275 summary: Set instance runtime configuration
283 description: successful operation
285 summary: Delete instance runtime configuration
293 description: successful operation
296 summary: List instance jobs
306 description: The state of the job
315 - $ref: '#/components/parameters/start'
316 - $ref: '#/components/parameters/count'
317 - $ref: '#/components/parameters/sort'
320 description: successful operation
326 $ref: '#/components/schemas/Job'
327 '/server/following/{host}':
334 summary: Unfollow a server
339 description: 'The host to unfollow '
344 description: successful operation
349 summary: List instance followers
351 - $ref: '#/components/parameters/start'
352 - $ref: '#/components/parameters/count'
353 - $ref: '#/components/parameters/sort'
356 description: successful operation
362 $ref: '#/components/schemas/Follow'
367 summary: List instance followings
369 - $ref: '#/components/parameters/start'
370 - $ref: '#/components/parameters/count'
371 - $ref: '#/components/parameters/sort'
374 description: successful operation
380 $ref: '#/components/schemas/Follow'
387 summary: Follow a server
390 description: successful operation
395 $ref: '#/components/schemas/Follow'
398 summary: Create a user
406 description: successful operation
410 $ref: '#/components/schemas/AddUserResponse'
415 $ref: '#/components/schemas/AddUser'
416 description: User to create
425 - $ref: '#/components/parameters/start'
426 - $ref: '#/components/parameters/count'
427 - $ref: '#/components/parameters/usersSort'
430 description: successful operation
436 $ref: '#/components/schemas/User'
439 summary: Delete a user
446 - $ref: '#/components/parameters/id'
449 description: successful operation
457 - $ref: '#/components/parameters/id'
460 description: successful operation
464 $ref: '#/components/schemas/User'
466 summary: Update a user
472 - $ref: '#/components/parameters/id'
475 description: successful operation
480 $ref: '#/components/schemas/UpdateUser'
484 summary: Register a user
489 description: successful operation
494 $ref: '#/components/schemas/RegisterUser'
498 summary: Get my user information
506 description: successful operation
512 $ref: '#/components/schemas/User'
514 summary: Update my user information
522 description: successful operation
527 $ref: '#/components/schemas/UpdateMe'
529 /users/me/videos/imports:
531 summary: Get video imports of my user
539 - $ref: '#/components/parameters/start'
540 - $ref: '#/components/parameters/count'
541 - $ref: '#/components/parameters/sort'
544 description: successful operation
548 $ref: '#/components/schemas/VideoImport'
549 /users/me/video-quota-used:
551 summary: Get my user used quota
559 description: successful operation
564 '/users/me/videos/{videoId}/rating':
566 summary: Get rate of my user for a video
576 description: 'The video id '
581 description: successful operation
585 $ref: '#/components/schemas/GetMeVideoRating'
588 summary: Get videos of my user
596 - $ref: '#/components/parameters/start'
597 - $ref: '#/components/parameters/count'
598 - $ref: '#/components/parameters/sort'
601 description: successful operation
605 $ref: '#/components/schemas/VideoListResponse'
606 /users/me/subscriptions:
608 summary: Get my user subscriptions
615 - $ref: '#/components/parameters/start'
616 - $ref: '#/components/parameters/count'
617 - $ref: '#/components/parameters/sort'
620 description: successful operation
622 summary: Add subscription to my user
630 description: successful operation
631 /users/me/subscriptions/exist:
633 summary: Get if subscriptions exist for my user
640 - $ref: '#/components/parameters/subscriptionsUris'
643 description: successful operation
648 /users/me/subscriptions/videos:
650 summary: List videos of subscriptions of my user
658 - $ref: '#/components/parameters/categoryOneOf'
659 - $ref: '#/components/parameters/tagsOneOf'
660 - $ref: '#/components/parameters/tagsAllOf'
661 - $ref: '#/components/parameters/licenceOneOf'
662 - $ref: '#/components/parameters/languageOneOf'
663 - $ref: '#/components/parameters/nsfw'
664 - $ref: '#/components/parameters/filter'
665 - $ref: '#/components/parameters/skipCount'
666 - $ref: '#/components/parameters/start'
667 - $ref: '#/components/parameters/count'
668 - $ref: '#/components/parameters/videosSort'
671 description: successful operation
675 $ref: '#/components/schemas/VideoListResponse'
676 '/users/me/subscriptions/{subscriptionHandle}':
678 summary: Get subscription of my user
685 - $ref: '#/components/parameters/subscriptionHandle'
688 description: successful operation
692 $ref: '#/components/schemas/VideoChannel'
694 summary: Delete subscription of my user
701 - $ref: '#/components/parameters/subscriptionHandle'
704 description: successful operation
705 /users/me/avatar/pick:
707 summary: Update my user avatar
714 description: successful operation
718 $ref: '#/components/schemas/Avatar'
726 description: The file to upload.
731 contentType: image/png, image/jpeg
734 summary: List video ownership changes
736 - Video Ownership Change
741 description: successful operation
742 '/videos/ownership/{id}/accept':
744 summary: Accept ownership change request
746 - Video Ownership Change
750 - $ref: '#/components/parameters/idOrUUID'
753 description: successful operation
755 description: cannot terminate an ownership change of another user
757 description: video owneship change not found
758 '/videos/ownership/{id}/refuse':
760 summary: Refuse ownership change request
762 - Video Ownership Change
766 - $ref: '#/components/parameters/idOrUUID'
769 description: successful operation
771 description: cannot terminate an ownership change of another user
773 description: video owneship change not found
774 '/videos/{id}/give-ownership':
776 summary: Request ownership change
778 - Video Ownership Change
782 - $ref: '#/components/parameters/idOrUUID'
786 application/x-www-form-urlencoded:
796 description: successful operation
798 description: changing video ownership to a remote account is not supported yet
800 description: video not found
807 - $ref: '#/components/parameters/categoryOneOf'
808 - $ref: '#/components/parameters/tagsOneOf'
809 - $ref: '#/components/parameters/tagsAllOf'
810 - $ref: '#/components/parameters/licenceOneOf'
811 - $ref: '#/components/parameters/languageOneOf'
812 - $ref: '#/components/parameters/nsfw'
813 - $ref: '#/components/parameters/filter'
814 - $ref: '#/components/parameters/skipCount'
815 - $ref: '#/components/parameters/start'
816 - $ref: '#/components/parameters/count'
817 - $ref: '#/components/parameters/videosSort'
820 description: successful operation
824 $ref: '#/components/schemas/VideoListResponse'
827 summary: List available video categories
832 description: successful operation
841 summary: List available video licences
846 description: successful operation
855 summary: List available video languages
860 description: successful operation
869 summary: List available video privacies
874 description: successful operation
883 summary: Update a video
889 - $ref: '#/components/parameters/idOrUUID'
892 description: successful operation
900 description: Video thumbnail file
904 description: Video preview file
908 description: Video category
911 description: Video licence
914 description: Video language
917 $ref: '#/components/schemas/VideoPrivacySet'
919 description: Video description
922 description: Whether or not we wait transcoding before publish the video
925 description: Text describing how to support the video uploader
928 description: Whether or not this video contains sensitive content
931 description: Video name
934 description: Video tags (maximum 5 tags each between 2 and 30 characters)
943 description: Enable or disable comments for this video
945 originallyPublishedAt:
946 description: Date when the content was originally published
950 $ref: '#/components/schemas/VideoScheduledUpdate'
953 contentType: image/jpeg
955 contentType: image/jpeg
961 - $ref: '#/components/parameters/idOrUUID'
964 description: successful operation
968 $ref: '#/components/schemas/VideoDetails'
970 summary: Delete a video
976 - $ref: '#/components/parameters/idOrUUID'
979 description: successful operation
980 '/videos/{id}/description':
982 summary: Get complete video description
986 - $ref: '#/components/parameters/idOrUUID'
989 description: successful operation
994 '/videos/{id}/views':
996 summary: Add a view to a video
1000 - $ref: '#/components/parameters/idOrUUID'
1003 description: successful operation
1004 '/videos/{id}/watching':
1006 summary: Set watching progress of a video
1012 - $ref: '#/components/parameters/idOrUUID'
1017 $ref: '#/components/schemas/UserWatchingVideo'
1021 description: successful operation
1024 summary: Upload a video
1031 description: successful operation
1035 $ref: '#/components/schemas/VideoUploadResponse'
1037 description: 'The user video quota is exceeded with this video.'
1039 description: 'Upload has timed out'
1041 description: 'Invalid input file.'
1044 multipart/form-data:
1049 description: Video file
1053 description: Channel id that will contain this video
1056 description: Video thumbnail file
1060 description: Video preview file
1064 $ref: '#/components/schemas/VideoPrivacySet'
1066 description: Video category
1069 description: Video licence
1072 description: Video language
1075 description: Video description
1078 description: Whether or not we wait transcoding before publish the video
1081 description: Text describing how to support the video uploader
1084 description: Whether or not this video contains sensitive content
1087 description: Video name
1090 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1100 description: Enable or disable comments for this video
1102 originallyPublishedAt:
1103 description: Date when the content was originally published
1107 $ref: '#/components/schemas/VideoScheduledUpdate'
1114 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1116 contentType: image/jpeg
1118 contentType: image/jpeg
1122 ## DEPENDENCIES: httpie, jq
1123 # pip install httpie
1124 USERNAME="<your_username>"
1125 PASSWORD="<your_password>"
1126 FILE_PATH="<your_file_path>"
1127 CHANNEL_ID="<your_channel_id>"
1130 API_PATH="https://peertube2.cpy.re/api/v1"
1132 client_id=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_id")
1133 client_secret=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
1134 token=$(http -b --form POST "$API_PATH/users/token" \
1135 client_id="$client_id" client_secret="$client_secret" grant_type=password response_type=code \
1136 username=$USERNAME \
1137 password=$PASSWORD \
1138 | jq -r ".access_token")
1140 http -b --form POST "$API_PATH/videos/upload" \
1141 videofile@$FILE_PATH \
1142 channelId=$CHANNEL_ID \
1144 "Authorization:Bearer $token"
1147 summary: Import a video
1148 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
1155 multipart/form-data:
1160 description: Torrent File
1164 description: HTTP target URL
1167 description: Magnet URI
1170 description: Channel id that will contain this video
1173 description: Video thumbnail file
1177 description: Video preview file
1181 $ref: '#/components/schemas/VideoPrivacySet'
1183 description: Video category
1186 description: Video licence
1189 description: Video language
1192 description: Video description
1195 description: Whether or not we wait transcoding before publish the video
1198 description: Text describing how to support the video uploader
1201 description: Whether or not this video contains sensitive content
1204 description: Video name
1207 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1216 description: Enable or disable comments for this video
1219 $ref: '#/components/schemas/VideoScheduledUpdate'
1225 contentType: application/x-bittorrent
1227 contentType: image/jpeg
1229 contentType: image/jpeg
1232 description: successful operation
1236 $ref: '#/components/schemas/VideoUploadResponse'
1238 description: HTTP or Torrent/magnetURI import not enabled
1240 description: '`magnetUri` or `targetUrl` or a torrent file missing'
1243 summary: List video abuses
1251 - $ref: '#/components/parameters/start'
1252 - $ref: '#/components/parameters/count'
1253 - $ref: '#/components/parameters/abusesSort'
1256 description: successful operation
1262 $ref: '#/components/schemas/VideoAbuse'
1263 '/videos/{id}/abuse':
1265 summary: Report an abuse
1272 - $ref: '#/components/parameters/idOrUUID'
1281 description: Reason why the user reports this video
1284 description: Reason categories that help triage reports
1299 description: Timestamp in the video that marks the beginning of the report
1302 description: Timestamp in the video that marks the ending of the report
1307 description: successful operation
1308 '/videos/{id}/abuse/{abuseId}':
1310 summary: Update an abuse
1319 description: successful operation
1321 description: video abuse not found
1323 - $ref: '#/components/parameters/idOrUUID'
1324 - $ref: '#/components/parameters/abuseId'
1332 $ref: '#/components/schemas/VideoAbuseStateSet'
1335 description: 'Update the comment of the video abuse for other admin/moderators'
1337 summary: Delete an abuse
1346 description: successful operation
1348 description: block not found
1350 - $ref: '#/components/parameters/idOrUUID'
1351 - $ref: '#/components/parameters/abuseId'
1353 '/videos/{id}/blacklist':
1355 summary: Block a video
1363 - $ref: '#/components/parameters/idOrUUID'
1366 description: successful operation
1368 summary: Unblock a video by its id
1376 - $ref: '#/components/parameters/idOrUUID'
1379 description: successful operation
1381 description: block not found
1386 summary: List blocked videos
1392 - $ref: '#/components/parameters/start'
1393 - $ref: '#/components/parameters/count'
1394 - $ref: '#/components/parameters/blacklistsSort'
1397 description: successful operation
1403 $ref: '#/components/schemas/VideoBlacklist'
1404 /videos/{id}/captions:
1406 summary: List captions of a video
1410 - $ref: '#/components/parameters/idOrUUID'
1413 description: successful operation
1424 $ref: '#/components/schemas/VideoCaption'
1425 /videos/{id}/captions/{captionLanguage}:
1427 summary: Add or replace a video caption
1431 - $ref: '#/components/parameters/idOrUUID'
1432 - $ref: '#/components/parameters/captionLanguage'
1435 multipart/form-data:
1440 description: The file to upload.
1445 contentType: text/vtt, application/x-subrip, text/plain
1448 description: successful operation
1450 description: video or language not found
1452 summary: Delete a video caption
1456 - $ref: '#/components/parameters/idOrUUID'
1457 - $ref: '#/components/parameters/captionLanguage'
1460 description: successful operation
1462 description: video or language or caption for that language not found
1465 summary: List video channels
1469 - $ref: '#/components/parameters/start'
1470 - $ref: '#/components/parameters/count'
1471 - $ref: '#/components/parameters/sort'
1474 description: successful operation
1480 $ref: '#/components/schemas/VideoChannel'
1482 summary: Create a video channel
1489 description: successful operation
1494 $ref: '#/components/schemas/VideoChannelCreate'
1495 '/video-channels/{channelHandle}':
1497 summary: Get a video channel
1501 - $ref: '#/components/parameters/channelHandle'
1504 description: successful operation
1508 $ref: '#/components/schemas/VideoChannel'
1510 summary: Update a video channel
1516 - $ref: '#/components/parameters/channelHandle'
1519 description: successful operation
1524 $ref: '#/components/schemas/VideoChannelUpdate'
1526 summary: Delete a video channel
1532 - $ref: '#/components/parameters/channelHandle'
1535 description: successful operation
1536 '/video-channels/{channelHandle}/videos':
1538 summary: List videos of a video channel
1543 - $ref: '#/components/parameters/channelHandle'
1544 - $ref: '#/components/parameters/categoryOneOf'
1545 - $ref: '#/components/parameters/tagsOneOf'
1546 - $ref: '#/components/parameters/tagsAllOf'
1547 - $ref: '#/components/parameters/licenceOneOf'
1548 - $ref: '#/components/parameters/languageOneOf'
1549 - $ref: '#/components/parameters/nsfw'
1550 - $ref: '#/components/parameters/filter'
1551 - $ref: '#/components/parameters/skipCount'
1552 - $ref: '#/components/parameters/start'
1553 - $ref: '#/components/parameters/count'
1554 - $ref: '#/components/parameters/videosSort'
1557 description: successful operation
1561 $ref: '#/components/schemas/VideoListResponse'
1563 /video-playlists/privacies:
1565 summary: List available playlist privacies
1570 description: successful operation
1580 summary: List video playlists
1584 - $ref: '#/components/parameters/start'
1585 - $ref: '#/components/parameters/count'
1586 - $ref: '#/components/parameters/sort'
1589 description: successful operation
1595 $ref: '#/components/schemas/VideoPlaylist'
1597 summary: Create a video playlist
1598 description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
1605 description: successful operation
1620 multipart/form-data:
1625 description: Video playlist display name
1628 description: Video playlist thumbnail file
1632 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1634 description: Video playlist description
1637 description: Video channel in which the playlist will be published
1642 /video-playlists/{id}:
1644 summary: Get a video playlist
1648 - $ref: '#/components/parameters/idOrUUID'
1651 description: successful operation
1655 $ref: '#/components/schemas/VideoPlaylist'
1657 summary: Update a video playlist
1658 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
1665 description: successful operation
1667 - $ref: '#/components/parameters/idOrUUID'
1670 multipart/form-data:
1675 description: Video playlist display name
1678 description: Video playlist thumbnail file
1682 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1684 description: Video playlist description
1687 description: Video channel in which the playlist will be published
1690 summary: Delete a video playlist
1696 - $ref: '#/components/parameters/idOrUUID'
1699 description: successful operation
1701 /video-playlists/{id}/videos:
1703 summary: 'List videos of a playlist'
1708 - $ref: '#/components/parameters/idOrUUID'
1711 description: successful operation
1715 $ref: '#/components/schemas/VideoListResponse'
1717 summary: 'Add a video in a playlist'
1724 - $ref: '#/components/parameters/idOrUUID'
1727 description: successful operation
1733 videoPlaylistElement:
1746 description: 'Video to add in the playlist'
1749 description: 'Start the video at this specific timestamp (in seconds)'
1752 description: 'Stop the video at this specific timestamp (in seconds)'
1756 /video-playlists/{id}/videos/reorder:
1758 summary: 'Reorder a playlist'
1764 - $ref: '#/components/parameters/idOrUUID'
1767 description: successful operation
1776 description: 'Start position of the element to reorder'
1778 insertAfterPosition:
1780 description: 'New position for the block to reorder, to add the block before the first element'
1784 description: 'How many element from `startPosition` to reorder'
1788 - insertAfterPosition
1790 /video-playlists/{id}/videos/{playlistElementId}:
1792 summary: 'Update a playlist element'
1798 - $ref: '#/components/parameters/idOrUUID'
1799 - $ref: '#/components/parameters/playlistElementId'
1802 description: successful operation
1811 description: 'Start the video at this specific timestamp (in seconds)'
1814 description: 'Stop the video at this specific timestamp (in seconds)'
1816 summary: 'Delete an element from a playlist'
1822 - $ref: '#/components/parameters/idOrUUID'
1823 - $ref: '#/components/parameters/playlistElementId'
1826 description: successful operation
1828 '/users/me/video-playlists/videos-exist':
1830 summary: 'Check video exists in my playlists'
1839 description: The video ids to check
1846 description: successful operation
1866 '/accounts/{name}/video-channels':
1868 summary: List video channels of an account
1873 - $ref: '#/components/parameters/name'
1876 description: successful operation
1882 $ref: '#/components/schemas/VideoChannel'
1883 '/accounts/{name}/ratings':
1885 summary: List ratings of an account
1891 - $ref: '#/components/parameters/name'
1892 - $ref: '#/components/parameters/start'
1893 - $ref: '#/components/parameters/count'
1894 - $ref: '#/components/parameters/sort'
1898 description: Optionally filter which ratings to retrieve
1906 description: successful operation
1912 $ref: '#/components/schemas/VideoRating'
1913 '/videos/{id}/comment-threads':
1915 summary: List threads of a video
1919 - $ref: '#/components/parameters/idOrUUID'
1920 - $ref: '#/components/parameters/start'
1921 - $ref: '#/components/parameters/count'
1922 - $ref: '#/components/parameters/commentsSort'
1925 description: successful operation
1929 $ref: '#/components/schemas/CommentThreadResponse'
1931 summary: Create a thread
1937 - $ref: '#/components/parameters/idOrUUID'
1940 description: successful operation
1944 $ref: '#/components/schemas/CommentThreadPostResponse'
1953 description: 'Text comment'
1957 '/videos/{id}/comment-threads/{threadId}':
1959 summary: Get a thread
1963 - $ref: '#/components/parameters/idOrUUID'
1964 - $ref: '#/components/parameters/threadId'
1967 description: successful operation
1971 $ref: '#/components/schemas/VideoCommentThreadTree'
1972 '/videos/{id}/comments/{commentId}':
1974 summary: Reply to a thread of a video
1980 - $ref: '#/components/parameters/idOrUUID'
1981 - $ref: '#/components/parameters/commentId'
1984 description: successful operation
1988 $ref: '#/components/schemas/CommentThreadPostResponse'
1997 description: 'Text comment'
2002 summary: Delete a comment or a reply
2008 - $ref: '#/components/parameters/idOrUUID'
2009 - $ref: '#/components/parameters/commentId'
2012 description: successful operation
2013 '/videos/{id}/rate':
2015 summary: Like/dislike a video
2021 - $ref: '#/components/parameters/idOrUUID'
2024 description: successful operation
2029 summary: Search videos
2031 - $ref: '#/components/parameters/categoryOneOf'
2032 - $ref: '#/components/parameters/tagsOneOf'
2033 - $ref: '#/components/parameters/tagsAllOf'
2034 - $ref: '#/components/parameters/licenceOneOf'
2035 - $ref: '#/components/parameters/languageOneOf'
2036 - $ref: '#/components/parameters/nsfw'
2037 - $ref: '#/components/parameters/filter'
2038 - $ref: '#/components/parameters/skipCount'
2039 - $ref: '#/components/parameters/start'
2040 - $ref: '#/components/parameters/count'
2041 - $ref: '#/components/parameters/searchTarget'
2042 - $ref: '#/components/parameters/videosSearchSort'
2047 String to search. If the user can make a remote URI search, and the string is an URI then the
2048 PeerTube instance will fetch the remote object and add it to its database. Then,
2049 you can use the REST API to fetch the complete video information and interact with it.
2055 description: Get videos that are published after this date
2062 description: Get videos that are published before this date
2066 - name: originallyPublishedStartDate
2069 description: Get videos that are originally published after this date
2073 - name: originallyPublishedEndDate
2076 description: Get videos that are originally published before this date
2083 description: Get videos that have this minimum duration
2089 description: Get videos that have this maximum duration
2094 description: successful operation
2098 $ref: '#/components/schemas/VideoListResponse'
2099 /search/video-channels:
2103 summary: Search channels
2105 - $ref: '#/components/parameters/start'
2106 - $ref: '#/components/parameters/count'
2107 - $ref: '#/components/parameters/searchTarget'
2108 - $ref: '#/components/parameters/sort'
2113 String to search. If the user can make a remote URI search, and the string is an URI then the
2114 PeerTube instance will fetch the remote object and add it to its database. Then,
2115 you can use the REST API to fetch the complete channel information and interact with it.
2120 description: successful operation
2126 $ref: '#/components/schemas/VideoChannel'
2127 /blocklist/accounts:
2131 summary: List account blocks
2136 - $ref: '#/components/parameters/start'
2137 - $ref: '#/components/parameters/count'
2138 - $ref: '#/components/parameters/sort'
2141 description: successful operation
2145 summary: Block an account
2157 description: account to block, in the form `username@domain`
2162 description: successful operation
2164 description: self-blocking forbidden
2165 '/blocklist/accounts/{accountName}':
2169 summary: Unblock an account by its handle
2177 description: account to unblock, in the form `username@domain`
2182 description: successful operation
2184 description: account or account block does not exist
2189 summary: List server blocks
2194 - $ref: '#/components/parameters/start'
2195 - $ref: '#/components/parameters/count'
2196 - $ref: '#/components/parameters/sort'
2199 description: successful operation
2203 summary: Block a server
2215 description: server domain to block
2220 description: successful operation
2222 description: self-blocking forbidden
2223 '/blocklist/servers/{host}':
2227 summary: Unblock a server by its domain
2235 description: server domain to unblock
2240 description: successful operation
2242 description: account block does not exist
2243 '/feeds/video-comments.{format}':
2247 summary: List comments on videos
2252 description: 'format expected (we focus on making `rss` the most featureful ; it serves Media RSS)'
2265 description: 'limit listing to a specific video'
2270 description: successful operation
2275 default: 'max-age=900' # 15 min cache
2279 $ref: '#/components/schemas/VideoCommentsForXML'
2280 application/rss+xml:
2282 $ref: '#/components/schemas/VideoCommentsForXML'
2285 $ref: '#/components/schemas/VideoCommentsForXML'
2286 application/atom+xml:
2288 $ref: '#/components/schemas/VideoCommentsForXML'
2293 description: accept header unsupported
2294 '/feeds/videos.{format}':
2298 summary: List videos
2303 description: 'format expected (we focus on making `rss` the most featureful ; it serves Media RSS)'
2316 description: 'limit listing to a specific account'
2321 description: 'limit listing to a specific account'
2324 - name: videoChannelId
2326 description: 'limit listing to a specific video channel'
2329 - name: videoChannelName
2331 description: 'limit listing to a specific video channel'
2336 description: successful operation
2341 default: 'max-age=900' # 15 min cache
2345 $ref: '#/components/schemas/VideosForXML'
2346 application/rss+xml:
2348 $ref: '#/components/schemas/VideosForXML'
2351 $ref: '#/components/schemas/VideosForXML'
2352 application/atom+xml:
2354 $ref: '#/components/schemas/VideosForXML'
2359 description: accept header unsupported
2361 - url: 'https://peertube.cpy.re/api/v1'
2362 description: Live Test Server (live data - stable version)
2363 - url: 'https://peertube2.cpy.re/api/v1'
2364 description: Live Test Server (live data - latest nighlty version)
2365 - url: 'https://peertube3.cpy.re/api/v1'
2366 description: Live Test Server (live data - latest RC version)
2373 description: Offset used to paginate results
2380 description: "Number of items to return"
2389 description: Sort column (`-createdAt` for example)
2397 If the administrator enabled search index support, you can override the default search target.
2400 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
2401 It means the instance may not know the objects you fetched. If you want to load video/channel information:
2402 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
2403 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
2404 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
2405 * If the current user has not the ability to make a remote URI search, then redirect the user on the origin instance or fetch
2406 the data from the origin instance API
2416 description: Sort videos by criteria
2431 description: Sort videos by criteria
2446 description: Sort comments by criteria
2456 description: Sort blacklists by criteria
2472 description: Sort users by criteria
2483 description: Sort abuses by criteria
2495 The name of the account (`chocobozzz` or `chocobozzz@example.org` for
2503 description: The user id
2510 description: The object id or uuid
2514 name: playlistElementId
2517 description: Playlist element id
2524 description: Video abuse id
2528 name: captionLanguage
2531 description: The caption language
2538 description: "The video channel handle (example: 'my_username@example.com' or 'my_username')"
2542 name: subscriptionHandle
2545 description: "The subscription handle (example: 'my_username@example.com' or 'my_username')"
2552 description: The thread id (root comment id)
2559 description: The comment id
2566 description: category id of the video (see /videos/categories)
2579 description: tag(s) of the video
2592 description: tag(s) of the video, where all should be present in the video
2605 description: language id of the video (see /videos/languages). Use `_unknown` to filter on videos that don't have a video language
2618 description: licence id of the video (see /videos/licences)
2631 description: if you don't need the `total` in the response
2642 description: whether to include nsfw videos, if any
2653 Special filters (local for instance) which might require special rights:
2654 * `local` - only videos local to the instance
2655 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
2665 description: list of uris to check if each is part of the user subscriptions
2673 In the header: *Authorization: Bearer <token\>*
2676 Authenticating via OAuth requires the following steps:
2679 - Have an account with sufficient authorization levels
2681 - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
2684 - Make Authenticated Requests
2688 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
2691 moderator: Moderator scope
2694 VideoConstantNumber:
2700 VideoConstantString:
2707 VideoPlaylistPrivacySet:
2713 description: 'The video playlist privacy (Public = `1`, Unlisted = `2`, Private = `3`)'
2714 VideoPlaylistPrivacyConstant:
2717 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2721 VideoPlaylistTypeSet:
2726 description: 'The video playlist type (Regular = `1`, Watch Later = `2`)'
2727 VideoPlaylistTypeConstant:
2730 $ref: '#/components/schemas/VideoPlaylistTypeSet'
2741 description: 'The video privacy (Public = `1`, Unlisted = `2`, Private = `3`, Internal = `4`)'
2742 VideoPrivacyConstant:
2745 $ref: '#/components/schemas/VideoPrivacySet'
2762 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
2772 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
2782 description: 'The video playlist privacy (Pending = `1`, Rejected = `2`, Accepted = `3`)'
2783 VideoAbuseStateConstant:
2786 $ref: '#/components/schemas/VideoAbuseStateSet'
2789 VideoAbusePredefinedReasons:
2803 VideoResolutionConstant:
2807 description: 'Video resolution (240, 360, 720 ...)'
2810 VideoScheduledUpdate:
2813 $ref: '#/components/schemas/VideoPrivacySet'
2817 description: When to update the video
2835 - $ref: '#/components/schemas/Avatar'
2836 VideoChannelSummary:
2851 - $ref: '#/components/schemas/Avatar'
2863 - $ref: '#/components/schemas/Video'
2869 $ref: '#/components/schemas/VideoResolutionConstant'
2872 description: 'Video file size in bytes'
2885 VideoStreamingPlaylists:
2893 description: 'Playlist type (HLS = `1`)'
2901 $ref: '#/components/schemas/VideoFile'
2921 originallyPublishedAt:
2924 $ref: '#/components/schemas/VideoConstantNumber'
2926 $ref: '#/components/schemas/VideoConstantNumber'
2928 $ref: '#/components/schemas/VideoConstantString'
2930 $ref: '#/components/schemas/VideoPrivacyConstant'
2957 $ref: '#/components/schemas/VideoStateConstant'
2961 - $ref: '#/components/schemas/VideoScheduledUpdate'
2969 $ref: '#/components/schemas/AccountSummary'
2971 $ref: '#/components/schemas/VideoChannelSummary'
2980 - $ref: '#/components/schemas/Video'
2988 $ref: '#/components/schemas/VideoChannel'
2990 $ref: '#/components/schemas/Account'
2998 $ref: '#/components/schemas/VideoFile'
3010 $ref: '#/components/schemas/VideoStreamingPlaylists'
3011 VideoImportStateConstant:
3019 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
3036 $ref: '#/components/schemas/VideoImportStateConstant'
3046 $ref: '#/components/schemas/Video'
3054 $ref: '#/components/schemas/VideoAbusePredefinedReasons'
3056 $ref: '#/components/schemas/Account'
3058 $ref: '#/components/schemas/VideoAbuseStateConstant'
3134 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
3136 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
3138 $ref: '#/components/schemas/AccountSummary'
3140 $ref: '#/components/schemas/VideoChannelSummary'
3159 totalRepliesFromVideoAuthor:
3164 $ref: '#/components/schemas/Account'
3165 VideoCommentThreadTree:
3168 $ref: '#/components/schemas/VideoComment'
3172 $ref: '#/components/schemas/VideoCommentThreadTree'
3176 $ref: '#/components/schemas/VideoConstantString'
3206 $ref: '#/components/schemas/Avatar'
3209 - $ref: '#/components/schemas/Actor'
3227 description: 'Theme enabled by this user'
3230 description: 'Has the user confirmed their email address?'
3232 $ref: '#/components/schemas/NSFWPolicy'
3237 description: 'Automatically start playing the video on the watch page'
3239 $ref: '#/components/schemas/UserRole'
3254 videoAbusesAcceptedCount:
3256 videoAbusesCreatedCount:
3260 noInstanceConfigWarningModal:
3271 $ref: '#/components/schemas/Account'
3275 $ref: '#/components/schemas/VideoChannel'
3345 allowedForCurrentIP:
3347 requiresEmailVerification:
3550 requiresEmailVerification:
3574 allowAdditionalExtensions:
3642 $ref: '#/components/schemas/Actor'
3644 $ref: '#/components/schemas/Actor'
3686 VideoUploadResponse:
3695 CommentThreadResponse:
3702 $ref: '#/components/schemas/VideoComment'
3703 CommentThreadPostResponse:
3706 $ref: '#/components/schemas/VideoComment'
3714 $ref: '#/components/schemas/Video'
3719 description: 'The user username'
3724 description: 'The user password. If the smtp server is configured, you can leave empty and an email will be sent'
3729 description: 'The user email. MUST be in the format of an email address.'
3732 description: 'The user video quota'
3735 description: 'The user daily video quota'
3737 $ref: '#/components/schemas/UserRole'
3749 description: 'The user id'
3752 description: 'The updated email of the user'
3755 description: 'The updated video quota of the user'
3758 description: 'The updated daily video quota of the user'
3760 $ref: '#/components/schemas/UserRole'
3771 description: 'Your new password'
3774 description: 'Your new email'
3777 description: 'Your new displayNSFW'
3780 description: 'Your new autoPlayVideo'
3790 description: 'Id of the video'
3793 description: 'Rating of the video'
3800 $ref: '#/components/schemas/Video'
3803 description: 'Rating of the video'
3811 description: 'The username of the user'
3814 description: 'The password of the user'
3817 description: 'The email of the user'
3820 description: 'The user display name'
3826 description: 'The name for the default channel'
3829 description: 'The display name for the default channel'
3845 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
3857 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
3858 bulkVideosSupportUpdate:
3860 description: 'Update the support field for all videos of this channel'
3865 name: 'media:peerLink'
3874 - application/x-bittorrent
3880 name: 'media:content'
3910 VideoCommentsForXML:
3943 description: video watch page URL
3946 description: video canonical URL
3950 description: video publication date
3953 description: video description
3956 description: video description
3959 description: publisher user name
3962 description: video category (MRSS)
3965 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
3979 description: video embed path, relative to the canonical URL domain (MRSS)
3987 description: video watch path, relative to the canonical URL domain (MRSS)
4007 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
4008 'media:description':
4015 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
4018 description: main streamable file for the video
4027 - application/x-bittorrent
4036 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)
4039 - $ref: '#/components/schemas/MRSSPeerLink'
4040 - $ref: '#/components/schemas/MRSSGroupContent'