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
69 - name: Instance Redundancy
71 Redundancy is part of the inter-server solidarity that PeerTube fosters.
72 Manage the list of instances you wish to help by seeding their videos according
73 to the policy of video selection of your choice. Note that you have a similar functionality
74 to mirror individual videos, see `Video Mirroring`.
77 Managign plugins installed from a local path or from NPM.
80 Video abuses deal with reports of local or remote videos alike.
83 Operations dealing with listing, uploading, fetching or modifying videos.
86 The search helps to find _videos_ or _channels_ from within the instance and beyond.
87 Videos from other instances federated by the instance (that is, instances
88 followed by the instance) can be found via keywords and other criteria of
91 Administrators can also enable the use of a remote search system, indexing
92 videos and channels not could be not federated by the instance.
93 - name: Video Comments
95 Operations dealing with comments to a video. Comments are organized in
97 - name: Video Playlists
99 Operations dealing with playlists of videos. Playlists are bound to users
101 - name: Video Channels
103 Operations dealing with the creation, modification and listing of videos within a channel.
106 Operations dealing with blocking videos (removing them from view and
107 preventing interactions).
110 Like/dislike a video.
113 Server syndication feeds
130 - Video Ownership Change
142 - name: Instance Configuration
146 - Instance Redundancy
156 summary: Get an account
158 - $ref: '#/components/parameters/name'
161 description: successful operation
165 $ref: '#/components/schemas/Account'
167 description: account not found
168 '/accounts/{name}/videos':
173 summary: 'List videos of an account'
175 - $ref: '#/components/parameters/name'
176 - $ref: '#/components/parameters/categoryOneOf'
177 - $ref: '#/components/parameters/tagsOneOf'
178 - $ref: '#/components/parameters/tagsAllOf'
179 - $ref: '#/components/parameters/licenceOneOf'
180 - $ref: '#/components/parameters/languageOneOf'
181 - $ref: '#/components/parameters/nsfw'
182 - $ref: '#/components/parameters/filter'
183 - $ref: '#/components/parameters/skipCount'
184 - $ref: '#/components/parameters/start'
185 - $ref: '#/components/parameters/count'
186 - $ref: '#/components/parameters/videosSort'
189 description: successful operation
193 $ref: '#/components/schemas/VideoListResponse'
197 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
198 .then(function(response) {
199 return response.json()
200 }).then(function(data) {
206 http -b GET https://peertube2.cpy.re/api/v1/accounts/{name}/videos
212 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
214 http = Net::HTTP.new(uri.host, uri.port)
217 response = http.get(uri.request_uri)
219 puts JSON.parse(response.read_body)
224 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
232 summary: List accounts
234 - $ref: '#/components/parameters/start'
235 - $ref: '#/components/parameters/count'
236 - $ref: '#/components/parameters/sort'
239 description: successful operation
245 $ref: '#/components/schemas/Account'
250 summary: Get instance public configuration
253 description: successful operation
257 $ref: '#/components/schemas/ServerConfig'
260 summary: Get instance "About" information
265 description: successful operation
269 $ref: '#/components/schemas/ServerConfigAbout'
272 summary: Get instance runtime configuration
280 description: successful operation
284 $ref: '#/components/schemas/ServerConfigCustom'
286 summary: Set instance runtime configuration
294 description: successful operation
296 summary: Delete instance runtime configuration
304 description: successful operation
307 summary: List instance jobs
317 description: The state of the job
326 - $ref: '#/components/parameters/start'
327 - $ref: '#/components/parameters/count'
328 - $ref: '#/components/parameters/sort'
331 description: successful operation
337 $ref: '#/components/schemas/Job'
338 '/server/following/{host}':
345 summary: Unfollow a server
350 description: 'The host to unfollow '
355 description: successful operation
360 summary: List instance followers
362 - $ref: '#/components/parameters/start'
363 - $ref: '#/components/parameters/count'
364 - $ref: '#/components/parameters/sort'
367 description: successful operation
373 $ref: '#/components/schemas/Follow'
378 summary: List instances followed by the server
397 - $ref: '#/components/parameters/start'
398 - $ref: '#/components/parameters/count'
399 - $ref: '#/components/parameters/sort'
402 description: successful operation
408 $ref: '#/components/schemas/Follow'
415 summary: Follow a server
418 description: successful operation
420 description: cannot follow a non-HTTPS server
434 summary: Create a user
442 description: successful operation
446 $ref: '#/components/schemas/AddUserResponse'
451 $ref: '#/components/schemas/AddUser'
452 description: User to create
461 - $ref: '#/components/parameters/start'
462 - $ref: '#/components/parameters/count'
463 - $ref: '#/components/parameters/usersSort'
466 description: successful operation
472 $ref: '#/components/schemas/User'
475 summary: Delete a user
482 - $ref: '#/components/parameters/id'
485 description: successful operation
493 - $ref: '#/components/parameters/id'
496 description: successful operation
500 $ref: '#/components/schemas/User'
502 summary: Update a user
508 - $ref: '#/components/parameters/id'
511 description: successful operation
516 $ref: '#/components/schemas/UpdateUser'
520 summary: Register a user
525 description: successful operation
530 $ref: '#/components/schemas/RegisterUser'
534 summary: Get my user information
542 description: successful operation
548 $ref: '#/components/schemas/User'
550 summary: Update my user information
558 description: successful operation
563 $ref: '#/components/schemas/UpdateMe'
565 /users/me/videos/imports:
567 summary: Get video imports of my user
575 - $ref: '#/components/parameters/start'
576 - $ref: '#/components/parameters/count'
577 - $ref: '#/components/parameters/sort'
580 description: successful operation
584 $ref: '#/components/schemas/VideoImport'
585 /users/me/video-quota-used:
587 summary: Get my user used quota
595 description: successful operation
600 '/users/me/videos/{videoId}/rating':
602 summary: Get rate of my user for a video
612 description: 'The video id '
617 description: successful operation
621 $ref: '#/components/schemas/GetMeVideoRating'
624 summary: Get videos of my user
632 - $ref: '#/components/parameters/start'
633 - $ref: '#/components/parameters/count'
634 - $ref: '#/components/parameters/sort'
637 description: successful operation
641 $ref: '#/components/schemas/VideoListResponse'
642 /users/me/subscriptions:
644 summary: Get my user subscriptions
651 - $ref: '#/components/parameters/start'
652 - $ref: '#/components/parameters/count'
653 - $ref: '#/components/parameters/sort'
656 description: successful operation
658 summary: Add subscription to my user
666 description: successful operation
667 /users/me/subscriptions/exist:
669 summary: Get if subscriptions exist for my user
676 - $ref: '#/components/parameters/subscriptionsUris'
679 description: successful operation
684 /users/me/subscriptions/videos:
686 summary: List videos of subscriptions of my user
694 - $ref: '#/components/parameters/categoryOneOf'
695 - $ref: '#/components/parameters/tagsOneOf'
696 - $ref: '#/components/parameters/tagsAllOf'
697 - $ref: '#/components/parameters/licenceOneOf'
698 - $ref: '#/components/parameters/languageOneOf'
699 - $ref: '#/components/parameters/nsfw'
700 - $ref: '#/components/parameters/filter'
701 - $ref: '#/components/parameters/skipCount'
702 - $ref: '#/components/parameters/start'
703 - $ref: '#/components/parameters/count'
704 - $ref: '#/components/parameters/videosSort'
707 description: successful operation
711 $ref: '#/components/schemas/VideoListResponse'
712 '/users/me/subscriptions/{subscriptionHandle}':
714 summary: Get subscription of my user
721 - $ref: '#/components/parameters/subscriptionHandle'
724 description: successful operation
728 $ref: '#/components/schemas/VideoChannel'
730 summary: Delete subscription of my user
737 - $ref: '#/components/parameters/subscriptionHandle'
740 description: successful operation
741 /users/me/notifications:
743 summary: List my notifications
751 description: only list unread notifications
754 - $ref: '#/components/parameters/start'
755 - $ref: '#/components/parameters/count'
756 - $ref: '#/components/parameters/sort'
759 description: successful operation
763 $ref: '#/components/schemas/NotificationListResponse'
764 /users/me/notifications/read:
766 summary: Mark notifications as read by their id
779 description: ids of the notifications to mark as read
786 description: successful operation
787 /users/me/notifications/read-all:
789 summary: Mark all my notification as read
796 description: successful operation
797 /users/me/notification-settings:
799 summary: Update my notification settings
810 newVideoFromSubscription:
811 $ref: '#/components/schemas/NotificationSettingValue'
813 $ref: '#/components/schemas/NotificationSettingValue'
814 videoAbuseAsModerator:
815 $ref: '#/components/schemas/NotificationSettingValue'
816 videoAutoBlacklistAsModerator:
817 $ref: '#/components/schemas/NotificationSettingValue'
819 $ref: '#/components/schemas/NotificationSettingValue'
821 $ref: '#/components/schemas/NotificationSettingValue'
822 myVideoImportFinished:
823 $ref: '#/components/schemas/NotificationSettingValue'
825 $ref: '#/components/schemas/NotificationSettingValue'
827 $ref: '#/components/schemas/NotificationSettingValue'
829 $ref: '#/components/schemas/NotificationSettingValue'
831 $ref: '#/components/schemas/NotificationSettingValue'
832 autoInstanceFollowing:
833 $ref: '#/components/schemas/NotificationSettingValue'
836 description: successful operation
837 /users/me/avatar/pick:
839 summary: Update my user avatar
846 description: successful operation
850 $ref: '#/components/schemas/Avatar'
858 description: The file to upload.
863 contentType: image/png, image/jpeg
866 summary: List video ownership changes
868 - Video Ownership Change
873 description: successful operation
874 '/videos/ownership/{id}/accept':
876 summary: Accept ownership change request
878 - Video Ownership Change
882 - $ref: '#/components/parameters/idOrUUID'
885 description: successful operation
887 description: cannot terminate an ownership change of another user
889 description: video owneship change not found
890 '/videos/ownership/{id}/refuse':
892 summary: Refuse ownership change request
894 - Video Ownership Change
898 - $ref: '#/components/parameters/idOrUUID'
901 description: successful operation
903 description: cannot terminate an ownership change of another user
905 description: video owneship change not found
906 '/videos/{id}/give-ownership':
908 summary: Request ownership change
910 - Video Ownership Change
914 - $ref: '#/components/parameters/idOrUUID'
918 application/x-www-form-urlencoded:
928 description: successful operation
930 description: changing video ownership to a remote account is not supported yet
932 description: video not found
939 - $ref: '#/components/parameters/categoryOneOf'
940 - $ref: '#/components/parameters/tagsOneOf'
941 - $ref: '#/components/parameters/tagsAllOf'
942 - $ref: '#/components/parameters/licenceOneOf'
943 - $ref: '#/components/parameters/languageOneOf'
944 - $ref: '#/components/parameters/nsfw'
945 - $ref: '#/components/parameters/filter'
946 - $ref: '#/components/parameters/skipCount'
947 - $ref: '#/components/parameters/start'
948 - $ref: '#/components/parameters/count'
949 - $ref: '#/components/parameters/videosSort'
952 description: successful operation
956 $ref: '#/components/schemas/VideoListResponse'
959 summary: List available video categories
964 description: successful operation
973 summary: List available video licences
978 description: successful operation
987 summary: List available video languages
992 description: successful operation
1001 summary: List available video privacies
1006 description: successful operation
1015 summary: Update a video
1021 - $ref: '#/components/parameters/idOrUUID'
1024 description: successful operation
1027 multipart/form-data:
1032 description: Video thumbnail file
1036 description: Video preview file
1040 description: Video category
1043 description: Video licence
1046 description: Video language
1049 $ref: '#/components/schemas/VideoPrivacySet'
1051 description: Video description
1054 description: Whether or not we wait transcoding before publish the video
1057 description: Text describing how to support the video uploader
1060 description: Whether or not this video contains sensitive content
1063 description: Video name
1066 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1075 description: Enable or disable comments for this video
1077 originallyPublishedAt:
1078 description: Date when the content was originally published
1082 $ref: '#/components/schemas/VideoScheduledUpdate'
1085 contentType: image/jpeg
1087 contentType: image/jpeg
1089 summary: Get a video
1093 - $ref: '#/components/parameters/idOrUUID'
1096 description: successful operation
1100 $ref: '#/components/schemas/VideoDetails'
1102 summary: Delete a video
1108 - $ref: '#/components/parameters/idOrUUID'
1111 description: successful operation
1112 '/videos/{id}/description':
1114 summary: Get complete video description
1118 - $ref: '#/components/parameters/idOrUUID'
1121 description: successful operation
1126 '/videos/{id}/views':
1128 summary: Add a view to a video
1132 - $ref: '#/components/parameters/idOrUUID'
1135 description: successful operation
1136 '/videos/{id}/watching':
1138 summary: Set watching progress of a video
1144 - $ref: '#/components/parameters/idOrUUID'
1149 $ref: '#/components/schemas/UserWatchingVideo'
1153 description: successful operation
1156 summary: Upload a video
1163 description: successful operation
1167 $ref: '#/components/schemas/VideoUploadResponse'
1169 description: 'The user video quota is exceeded with this video.'
1171 description: 'Upload has timed out'
1173 description: 'Invalid input file.'
1176 multipart/form-data:
1181 description: Video file
1185 description: Channel id that will contain this video
1188 description: Video thumbnail file
1192 description: Video preview file
1196 $ref: '#/components/schemas/VideoPrivacySet'
1198 description: Video category
1201 description: Video licence
1204 description: Video language
1207 description: Video description
1210 description: Whether or not we wait transcoding before publish the video
1213 description: Text describing how to support the video uploader
1216 description: Whether or not this video contains sensitive content
1219 description: Video name
1222 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1232 description: Enable or disable comments for this video
1234 originallyPublishedAt:
1235 description: Date when the content was originally published
1239 $ref: '#/components/schemas/VideoScheduledUpdate'
1246 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1248 contentType: image/jpeg
1250 contentType: image/jpeg
1254 ## DEPENDENCIES: httpie, jq
1255 # pip install httpie
1256 USERNAME="<your_username>"
1257 PASSWORD="<your_password>"
1258 FILE_PATH="<your_file_path>"
1259 CHANNEL_ID="<your_channel_id>"
1262 API_PATH="https://peertube2.cpy.re/api/v1"
1264 client_id=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_id")
1265 client_secret=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
1266 token=$(http -b --form POST "$API_PATH/users/token" \
1267 client_id="$client_id" client_secret="$client_secret" grant_type=password response_type=code \
1268 username=$USERNAME \
1269 password=$PASSWORD \
1270 | jq -r ".access_token")
1272 http -b --form POST "$API_PATH/videos/upload" \
1273 videofile@$FILE_PATH \
1274 channelId=$CHANNEL_ID \
1276 "Authorization:Bearer $token"
1279 summary: Import a video
1280 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
1287 multipart/form-data:
1292 description: Torrent File
1296 description: HTTP target URL
1299 description: Magnet URI
1302 description: Channel id that will contain this video
1305 description: Video thumbnail file
1309 description: Video preview file
1313 $ref: '#/components/schemas/VideoPrivacySet'
1315 description: Video category
1318 description: Video licence
1321 description: Video language
1324 description: Video description
1327 description: Whether or not we wait transcoding before publish the video
1330 description: Text describing how to support the video uploader
1333 description: Whether or not this video contains sensitive content
1336 description: Video name
1339 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1348 description: Enable or disable comments for this video
1351 $ref: '#/components/schemas/VideoScheduledUpdate'
1357 contentType: application/x-bittorrent
1359 contentType: image/jpeg
1361 contentType: image/jpeg
1364 description: successful operation
1368 $ref: '#/components/schemas/VideoUploadResponse'
1370 description: HTTP or Torrent/magnetURI import not enabled
1372 description: '`magnetUri` or `targetUrl` or a torrent file missing'
1375 summary: List video abuses
1383 - $ref: '#/components/parameters/start'
1384 - $ref: '#/components/parameters/count'
1385 - $ref: '#/components/parameters/abusesSort'
1388 description: successful operation
1394 $ref: '#/components/schemas/VideoAbuse'
1395 '/videos/{id}/abuse':
1397 summary: Report an abuse
1404 - $ref: '#/components/parameters/idOrUUID'
1413 description: Reason why the user reports this video
1416 description: Reason categories that help triage reports
1431 description: Timestamp in the video that marks the beginning of the report
1434 description: Timestamp in the video that marks the ending of the report
1439 description: successful operation
1440 '/videos/{id}/abuse/{abuseId}':
1442 summary: Update an abuse
1451 description: successful operation
1453 description: video abuse not found
1455 - $ref: '#/components/parameters/idOrUUID'
1456 - $ref: '#/components/parameters/abuseId'
1464 $ref: '#/components/schemas/VideoAbuseStateSet'
1467 description: 'Update the comment of the video abuse for other admin/moderators'
1469 summary: Delete an abuse
1478 description: successful operation
1480 description: block not found
1482 - $ref: '#/components/parameters/idOrUUID'
1483 - $ref: '#/components/parameters/abuseId'
1485 '/videos/{id}/blacklist':
1487 summary: Block a video
1495 - $ref: '#/components/parameters/idOrUUID'
1498 description: successful operation
1500 summary: Unblock a video by its id
1508 - $ref: '#/components/parameters/idOrUUID'
1511 description: successful operation
1513 description: block not found
1518 summary: List video blocks
1524 - $ref: '#/components/parameters/start'
1525 - $ref: '#/components/parameters/count'
1526 - $ref: '#/components/parameters/blacklistsSort'
1529 description: successful operation
1535 $ref: '#/components/schemas/VideoBlacklist'
1536 /videos/{id}/captions:
1538 summary: List captions of a video
1542 - $ref: '#/components/parameters/idOrUUID'
1545 description: successful operation
1556 $ref: '#/components/schemas/VideoCaption'
1557 /videos/{id}/captions/{captionLanguage}:
1559 summary: Add or replace a video caption
1563 - $ref: '#/components/parameters/idOrUUID'
1564 - $ref: '#/components/parameters/captionLanguage'
1567 multipart/form-data:
1572 description: The file to upload.
1577 contentType: text/vtt, application/x-subrip, text/plain
1580 description: successful operation
1582 description: video or language not found
1584 summary: Delete a video caption
1588 - $ref: '#/components/parameters/idOrUUID'
1589 - $ref: '#/components/parameters/captionLanguage'
1592 description: successful operation
1594 description: video or language or caption for that language not found
1597 summary: List video channels
1601 - $ref: '#/components/parameters/start'
1602 - $ref: '#/components/parameters/count'
1603 - $ref: '#/components/parameters/sort'
1606 description: successful operation
1612 $ref: '#/components/schemas/VideoChannel'
1614 summary: Create a video channel
1621 description: successful operation
1626 $ref: '#/components/schemas/VideoChannelCreate'
1627 '/video-channels/{channelHandle}':
1629 summary: Get a video channel
1633 - $ref: '#/components/parameters/channelHandle'
1636 description: successful operation
1640 $ref: '#/components/schemas/VideoChannel'
1642 summary: Update a video channel
1648 - $ref: '#/components/parameters/channelHandle'
1651 description: successful operation
1656 $ref: '#/components/schemas/VideoChannelUpdate'
1658 summary: Delete a video channel
1664 - $ref: '#/components/parameters/channelHandle'
1667 description: successful operation
1668 '/video-channels/{channelHandle}/videos':
1670 summary: List videos of a video channel
1675 - $ref: '#/components/parameters/channelHandle'
1676 - $ref: '#/components/parameters/categoryOneOf'
1677 - $ref: '#/components/parameters/tagsOneOf'
1678 - $ref: '#/components/parameters/tagsAllOf'
1679 - $ref: '#/components/parameters/licenceOneOf'
1680 - $ref: '#/components/parameters/languageOneOf'
1681 - $ref: '#/components/parameters/nsfw'
1682 - $ref: '#/components/parameters/filter'
1683 - $ref: '#/components/parameters/skipCount'
1684 - $ref: '#/components/parameters/start'
1685 - $ref: '#/components/parameters/count'
1686 - $ref: '#/components/parameters/videosSort'
1689 description: successful operation
1693 $ref: '#/components/schemas/VideoListResponse'
1695 /video-playlists/privacies:
1697 summary: List available playlist privacies
1702 description: successful operation
1712 summary: List video playlists
1716 - $ref: '#/components/parameters/start'
1717 - $ref: '#/components/parameters/count'
1718 - $ref: '#/components/parameters/sort'
1721 description: successful operation
1727 $ref: '#/components/schemas/VideoPlaylist'
1729 summary: Create a video playlist
1730 description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
1737 description: successful operation
1752 multipart/form-data:
1757 description: Video playlist display name
1760 description: Video playlist thumbnail file
1764 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1766 description: Video playlist description
1769 description: Video channel in which the playlist will be published
1774 /video-playlists/{id}:
1776 summary: Get a video playlist
1780 - $ref: '#/components/parameters/idOrUUID'
1783 description: successful operation
1787 $ref: '#/components/schemas/VideoPlaylist'
1789 summary: Update a video playlist
1790 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
1797 description: successful operation
1799 - $ref: '#/components/parameters/idOrUUID'
1802 multipart/form-data:
1807 description: Video playlist display name
1810 description: Video playlist thumbnail file
1814 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1816 description: Video playlist description
1819 description: Video channel in which the playlist will be published
1822 summary: Delete a video playlist
1828 - $ref: '#/components/parameters/idOrUUID'
1831 description: successful operation
1833 /video-playlists/{id}/videos:
1835 summary: 'List videos of a playlist'
1840 - $ref: '#/components/parameters/idOrUUID'
1843 description: successful operation
1847 $ref: '#/components/schemas/VideoListResponse'
1849 summary: 'Add a video in a playlist'
1856 - $ref: '#/components/parameters/idOrUUID'
1859 description: successful operation
1865 videoPlaylistElement:
1878 description: 'Video to add in the playlist'
1881 description: 'Start the video at this specific timestamp (in seconds)'
1884 description: 'Stop the video at this specific timestamp (in seconds)'
1888 /video-playlists/{id}/videos/reorder:
1890 summary: 'Reorder a playlist'
1896 - $ref: '#/components/parameters/idOrUUID'
1899 description: successful operation
1908 description: 'Start position of the element to reorder'
1910 insertAfterPosition:
1912 description: 'New position for the block to reorder, to add the block before the first element'
1916 description: 'How many element from `startPosition` to reorder'
1920 - insertAfterPosition
1922 /video-playlists/{id}/videos/{playlistElementId}:
1924 summary: 'Update a playlist element'
1930 - $ref: '#/components/parameters/idOrUUID'
1931 - $ref: '#/components/parameters/playlistElementId'
1934 description: successful operation
1943 description: 'Start the video at this specific timestamp (in seconds)'
1946 description: 'Stop the video at this specific timestamp (in seconds)'
1948 summary: 'Delete an element from a playlist'
1954 - $ref: '#/components/parameters/idOrUUID'
1955 - $ref: '#/components/parameters/playlistElementId'
1958 description: successful operation
1960 '/users/me/video-playlists/videos-exist':
1962 summary: 'Check video exists in my playlists'
1971 description: The video ids to check
1978 description: successful operation
1998 '/accounts/{name}/video-channels':
2000 summary: List video channels of an account
2005 - $ref: '#/components/parameters/name'
2008 description: successful operation
2014 $ref: '#/components/schemas/VideoChannel'
2015 '/accounts/{name}/ratings':
2017 summary: List ratings of an account
2023 - $ref: '#/components/parameters/name'
2024 - $ref: '#/components/parameters/start'
2025 - $ref: '#/components/parameters/count'
2026 - $ref: '#/components/parameters/sort'
2030 description: Optionally filter which ratings to retrieve
2038 description: successful operation
2044 $ref: '#/components/schemas/VideoRating'
2045 '/videos/{id}/comment-threads':
2047 summary: List threads of a video
2051 - $ref: '#/components/parameters/idOrUUID'
2052 - $ref: '#/components/parameters/start'
2053 - $ref: '#/components/parameters/count'
2054 - $ref: '#/components/parameters/commentsSort'
2057 description: successful operation
2061 $ref: '#/components/schemas/CommentThreadResponse'
2063 summary: Create a thread
2069 - $ref: '#/components/parameters/idOrUUID'
2072 description: successful operation
2076 $ref: '#/components/schemas/CommentThreadPostResponse'
2085 description: 'Text comment'
2089 '/videos/{id}/comment-threads/{threadId}':
2091 summary: Get a thread
2095 - $ref: '#/components/parameters/idOrUUID'
2096 - $ref: '#/components/parameters/threadId'
2099 description: successful operation
2103 $ref: '#/components/schemas/VideoCommentThreadTree'
2104 '/videos/{id}/comments/{commentId}':
2106 summary: Reply to a thread of a video
2112 - $ref: '#/components/parameters/idOrUUID'
2113 - $ref: '#/components/parameters/commentId'
2116 description: successful operation
2120 $ref: '#/components/schemas/CommentThreadPostResponse'
2129 description: 'Text comment'
2134 summary: Delete a comment or a reply
2140 - $ref: '#/components/parameters/idOrUUID'
2141 - $ref: '#/components/parameters/commentId'
2144 description: successful operation
2145 '/videos/{id}/rate':
2147 summary: Like/dislike a video
2153 - $ref: '#/components/parameters/idOrUUID'
2156 description: successful operation
2161 summary: Search videos
2163 - $ref: '#/components/parameters/categoryOneOf'
2164 - $ref: '#/components/parameters/tagsOneOf'
2165 - $ref: '#/components/parameters/tagsAllOf'
2166 - $ref: '#/components/parameters/licenceOneOf'
2167 - $ref: '#/components/parameters/languageOneOf'
2168 - $ref: '#/components/parameters/nsfw'
2169 - $ref: '#/components/parameters/filter'
2170 - $ref: '#/components/parameters/skipCount'
2171 - $ref: '#/components/parameters/start'
2172 - $ref: '#/components/parameters/count'
2173 - $ref: '#/components/parameters/searchTarget'
2174 - $ref: '#/components/parameters/videosSearchSort'
2179 String to search. If the user can make a remote URI search, and the string is an URI then the
2180 PeerTube instance will fetch the remote object and add it to its database. Then,
2181 you can use the REST API to fetch the complete video information and interact with it.
2187 description: Get videos that are published after this date
2194 description: Get videos that are published before this date
2198 - name: originallyPublishedStartDate
2201 description: Get videos that are originally published after this date
2205 - name: originallyPublishedEndDate
2208 description: Get videos that are originally published before this date
2215 description: Get videos that have this minimum duration
2221 description: Get videos that have this maximum duration
2226 description: successful operation
2230 $ref: '#/components/schemas/VideoListResponse'
2231 /search/video-channels:
2235 summary: Search channels
2237 - $ref: '#/components/parameters/start'
2238 - $ref: '#/components/parameters/count'
2239 - $ref: '#/components/parameters/searchTarget'
2240 - $ref: '#/components/parameters/sort'
2245 String to search. If the user can make a remote URI search, and the string is an URI then the
2246 PeerTube instance will fetch the remote object and add it to its database. Then,
2247 you can use the REST API to fetch the complete channel information and interact with it.
2252 description: successful operation
2258 $ref: '#/components/schemas/VideoChannel'
2259 /blocklist/accounts:
2263 summary: List account blocks
2268 - $ref: '#/components/parameters/start'
2269 - $ref: '#/components/parameters/count'
2270 - $ref: '#/components/parameters/sort'
2273 description: successful operation
2277 summary: Block an account
2289 description: account to block, in the form `username@domain`
2294 description: successful operation
2296 description: self-blocking forbidden
2297 '/blocklist/accounts/{accountName}':
2301 summary: Unblock an account by its handle
2309 description: account to unblock, in the form `username@domain`
2314 description: successful operation
2316 description: account or account block does not exist
2321 summary: List server blocks
2326 - $ref: '#/components/parameters/start'
2327 - $ref: '#/components/parameters/count'
2328 - $ref: '#/components/parameters/sort'
2331 description: successful operation
2335 summary: Block a server
2347 description: server domain to block
2352 description: successful operation
2354 description: self-blocking forbidden
2355 '/blocklist/servers/{host}':
2359 summary: Unblock a server by its domain
2367 description: server domain to unblock
2372 description: successful operation
2374 description: account block does not exist
2378 - Instance Redundancy
2379 summary: Update a server redundancy policy
2387 description: server domain to mirror
2398 description: allow mirroring of the host's local videos
2403 description: successful operation
2405 description: server is not already known
2410 summary: List videos being mirrored
2418 description: direction of the mirror
2424 - $ref: '#/components/parameters/start'
2425 - $ref: '#/components/parameters/count'
2426 - $ref: '#/components/parameters/videoRedundanciesSort'
2429 description: successful operation
2435 $ref: '#/components/schemas/VideoRedundancy'
2439 summary: Mirror a video
2455 description: successful operation
2457 description: cannot mirror a local video
2459 description: video does not exist
2461 description: video is already mirrored
2462 /redundancy/videos/{redundancyId}:
2466 summary: Delete a mirror done on a video
2471 - name: redundancyId
2474 description: id of an existing redundancy on a video
2479 description: successful operation
2481 description: video redundancy not found
2482 '/feeds/video-comments.{format}':
2486 summary: List comments on videos
2488 - url: 'https://peertube2.cpy.re'
2489 description: Live Test Server (live data - latest nightly version)
2490 - url: 'https://peertube3.cpy.re'
2491 description: Live Test Server (live data - latest RC version)
2492 - url: 'https://peertube.cpy.re'
2493 description: Live Test Server (live data - stable version)
2498 description: 'format expected (we focus on making `rss` the most featureful ; it serves Media RSS)'
2511 description: 'limit listing to a specific video'
2516 description: successful operation
2521 default: 'max-age=900' # 15 min cache
2525 $ref: '#/components/schemas/VideoCommentsForXML'
2526 application/rss+xml:
2528 $ref: '#/components/schemas/VideoCommentsForXML'
2531 $ref: '#/components/schemas/VideoCommentsForXML'
2532 application/atom+xml:
2534 $ref: '#/components/schemas/VideoCommentsForXML'
2539 description: accept header unsupported
2540 '/feeds/videos.{format}':
2544 summary: List videos
2546 - url: 'https://peertube2.cpy.re'
2547 description: Live Test Server (live data - latest nightly version)
2548 - url: 'https://peertube3.cpy.re'
2549 description: Live Test Server (live data - latest RC version)
2550 - url: 'https://peertube.cpy.re'
2551 description: Live Test Server (live data - stable version)
2556 description: 'format expected (we focus on making `rss` the most featureful ; it serves Media RSS)'
2569 description: 'limit listing to a specific account'
2574 description: 'limit listing to a specific account'
2577 - name: videoChannelId
2579 description: 'limit listing to a specific video channel'
2582 - name: videoChannelName
2584 description: 'limit listing to a specific video channel'
2589 description: successful operation
2594 default: 'max-age=900' # 15 min cache
2598 $ref: '#/components/schemas/VideosForXML'
2599 application/rss+xml:
2601 $ref: '#/components/schemas/VideosForXML'
2604 $ref: '#/components/schemas/VideosForXML'
2605 application/atom+xml:
2607 $ref: '#/components/schemas/VideosForXML'
2612 description: accept header unsupported
2617 summary: List plugins
2630 - $ref: '#/components/parameters/start'
2631 - $ref: '#/components/parameters/count'
2632 - $ref: '#/components/parameters/sort'
2635 description: successful operation
2639 $ref: '#/components/schemas/PluginResponse'
2644 summary: List available plugins
2657 - name: currentPeerTubeEngine
2661 - $ref: '#/components/parameters/start'
2662 - $ref: '#/components/parameters/count'
2663 - $ref: '#/components/parameters/sort'
2666 description: successful operation
2670 $ref: '#/components/schemas/PluginResponse'
2672 description: plugin index unavailable
2677 summary: Install a plugin
2692 additionalProperties: false
2699 additionalProperties: false
2702 description: successful operation
2704 description: should have either `npmName` or `path` set
2709 summary: Update a plugin
2724 additionalProperties: false
2731 additionalProperties: false
2734 description: successful operation
2736 description: should have either `npmName` or `path` set
2738 description: existing plugin not found
2743 summary: Uninstall a plugin
2759 description: successful operation
2761 description: existing plugin not found
2766 summary: Get a plugin
2778 description: successful operation
2782 $ref: '#/components/schemas/Plugin'
2784 description: plugin not found
2785 /plugins/{npmName}/settings:
2789 summary: Set a plugin's settings
2807 additionalProperties: true
2810 description: successful operation
2812 description: plugin not found
2813 /plugins/{npmName}/public-settings:
2817 summary: Get a plugin's public settings
2828 description: successful operation
2833 additionalProperties: true
2835 description: plugin not found
2836 /plugins/{npmName}/registered-settings:
2840 summary: Get a plugin's registered settings
2852 description: successful operation
2857 additionalProperties: true
2859 description: plugin not found
2861 - url: 'https://peertube2.cpy.re/api/v1'
2862 description: Live Test Server (live data - latest nightly version)
2863 - url: 'https://peertube3.cpy.re/api/v1'
2864 description: Live Test Server (live data - latest RC version)
2865 - url: 'https://peertube.cpy.re/api/v1'
2866 description: Live Test Server (live data - stable version)
2873 description: Offset used to paginate results
2880 description: "Number of items to return"
2889 description: Sort column (`-createdAt` for example)
2897 If the administrator enabled search index support, you can override the default search target.
2900 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
2901 It means the instance may not know the objects you fetched. If you want to load video/channel information:
2902 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
2903 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
2904 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
2905 * If the current user has not the ability to make a remote URI search, then redirect the user on the origin instance or fetch
2906 the data from the origin instance API
2916 description: Sort videos by criteria
2931 description: Sort videos by criteria
2946 description: Sort comments by criteria
2956 description: Sort blacklists by criteria
2972 description: Sort users by criteria
2983 description: Sort abuses by criteria
2990 videoRedundanciesSort:
2994 description: Sort abuses by criteria
3004 The name of the account (`chocobozzz` or `chocobozzz@example.org` for
3012 description: The user id
3019 description: The object id or uuid
3023 name: playlistElementId
3026 description: Playlist element id
3033 description: Video abuse id
3037 name: captionLanguage
3040 description: The caption language
3047 description: "The video channel handle (example: 'my_username@example.com' or 'my_username')"
3051 name: subscriptionHandle
3054 description: "The subscription handle (example: 'my_username@example.com' or 'my_username')"
3061 description: The thread id (root comment id)
3068 description: The comment id
3075 description: category id of the video (see /videos/categories)
3088 description: tag(s) of the video
3101 description: tag(s) of the video, where all should be present in the video
3114 description: language id of the video (see /videos/languages). Use `_unknown` to filter on videos that don't have a video language
3127 description: licence id of the video (see /videos/licences)
3140 description: if you don't need the `total` in the response
3151 description: whether to include nsfw videos, if any
3162 Special filters (local for instance) which might require special rights:
3163 * `local` - only videos local to the instance
3164 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
3174 description: list of uris to check if each is part of the user subscriptions
3182 In the header: *Authorization: Bearer <token\>*
3185 Authenticating via OAuth requires the following steps:
3188 - Have an account with sufficient authorization levels
3190 - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
3193 - Make Authenticated Requests
3197 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
3200 moderator: Moderator scope
3203 VideoConstantNumber:
3209 VideoConstantString:
3216 VideoPlaylistPrivacySet:
3222 description: 'The video playlist privacy (Public = `1`, Unlisted = `2`, Private = `3`)'
3223 VideoPlaylistPrivacyConstant:
3226 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
3230 VideoPlaylistTypeSet:
3235 description: 'The video playlist type (Regular = `1`, Watch Later = `2`)'
3236 VideoPlaylistTypeConstant:
3239 $ref: '#/components/schemas/VideoPlaylistTypeSet'
3250 description: 'The video privacy (Public = `1`, Unlisted = `2`, Private = `3`, Internal = `4`)'
3251 VideoPrivacyConstant:
3254 $ref: '#/components/schemas/VideoPrivacySet'
3271 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
3281 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
3291 description: 'The video playlist privacy (Pending = `1`, Rejected = `2`, Accepted = `3`)'
3292 VideoAbuseStateConstant:
3295 $ref: '#/components/schemas/VideoAbuseStateSet'
3298 VideoAbusePredefinedReasons:
3312 VideoResolutionConstant:
3316 description: 'Video resolution (240, 360, 720 ...)'
3319 VideoScheduledUpdate:
3322 $ref: '#/components/schemas/VideoPrivacySet'
3326 description: When to update the video
3344 - $ref: '#/components/schemas/Avatar'
3345 VideoChannelSummary:
3360 - $ref: '#/components/schemas/Avatar'
3372 - $ref: '#/components/schemas/Video'
3378 $ref: '#/components/schemas/VideoResolutionConstant'
3381 description: 'Video file size in bytes'
3394 VideoStreamingPlaylists:
3402 description: 'Playlist type (HLS = `1`)'
3410 $ref: '#/components/schemas/VideoFile'
3438 originallyPublishedAt:
3441 $ref: '#/components/schemas/VideoConstantNumber'
3443 $ref: '#/components/schemas/VideoConstantNumber'
3445 $ref: '#/components/schemas/VideoConstantString'
3447 $ref: '#/components/schemas/VideoPrivacyConstant'
3474 $ref: '#/components/schemas/VideoStateConstant'
3478 - $ref: '#/components/schemas/VideoScheduledUpdate'
3486 $ref: '#/components/schemas/AccountSummary'
3488 $ref: '#/components/schemas/VideoChannelSummary'
3497 - $ref: '#/components/schemas/Video'
3505 $ref: '#/components/schemas/VideoChannel'
3507 $ref: '#/components/schemas/Account'
3515 $ref: '#/components/schemas/VideoFile'
3527 $ref: '#/components/schemas/VideoStreamingPlaylists'
3528 FileRedundancyInformation:
3563 $ref: '#/components/schemas/FileRedundancyInformation'
3567 $ref: '#/components/schemas/FileRedundancyInformation'
3568 VideoImportStateConstant:
3576 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
3593 $ref: '#/components/schemas/VideoImportStateConstant'
3603 $ref: '#/components/schemas/Video'
3611 $ref: '#/components/schemas/VideoAbusePredefinedReasons'
3613 $ref: '#/components/schemas/Account'
3615 $ref: '#/components/schemas/VideoAbuseStateConstant'
3691 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
3693 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
3695 $ref: '#/components/schemas/AccountSummary'
3697 $ref: '#/components/schemas/VideoChannelSummary'
3716 totalRepliesFromVideoAuthor:
3721 $ref: '#/components/schemas/Account'
3722 VideoCommentThreadTree:
3725 $ref: '#/components/schemas/VideoComment'
3729 $ref: '#/components/schemas/VideoCommentThreadTree'
3733 $ref: '#/components/schemas/VideoConstantString'
3779 $ref: '#/components/schemas/Avatar'
3782 - $ref: '#/components/schemas/Actor'
3800 description: 'Theme enabled by this user'
3803 description: 'Has the user confirmed their email address?'
3805 $ref: '#/components/schemas/NSFWPolicy'
3810 description: 'Automatically start playing the video on the watch page'
3812 $ref: '#/components/schemas/UserRole'
3827 videoAbusesAcceptedCount:
3829 videoAbusesCreatedCount:
3833 noInstanceConfigWarningModal:
3844 $ref: '#/components/schemas/Account'
3848 $ref: '#/components/schemas/VideoChannel'
3918 allowedForCurrentIP:
3920 requiresEmailVerification:
4123 requiresEmailVerification:
4147 allowAdditionalExtensions:
4215 $ref: '#/components/schemas/Actor'
4217 $ref: '#/components/schemas/Actor'
4220 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
4260 VideoUploadResponse:
4269 CommentThreadResponse:
4276 $ref: '#/components/schemas/VideoComment'
4277 CommentThreadPostResponse:
4280 $ref: '#/components/schemas/VideoComment'
4288 $ref: '#/components/schemas/Video'
4293 description: 'The user username'
4298 description: 'The user password. If the smtp server is configured, you can leave empty and an email will be sent'
4303 description: 'The user email. MUST be in the format of an email address.'
4306 description: 'The user video quota'
4309 description: 'The user daily video quota'
4311 $ref: '#/components/schemas/UserRole'
4323 description: 'The user id'
4326 description: 'The updated email of the user'
4329 description: 'The updated video quota of the user'
4332 description: 'The updated daily video quota of the user'
4334 $ref: '#/components/schemas/UserRole'
4345 description: 'Your new password'
4348 description: 'Your new email'
4351 description: 'Your new displayNSFW'
4354 description: 'Your new autoPlayVideo'
4364 description: 'Id of the video'
4367 description: 'Rating of the video'
4374 $ref: '#/components/schemas/Video'
4377 description: 'Rating of the video'
4385 description: 'The username of the user'
4388 description: 'The password of the user'
4391 description: 'The email of the user'
4394 description: 'The user display name'
4400 description: 'The name for the default channel'
4403 description: 'The display name for the default channel'
4419 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
4431 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
4432 bulkVideosSupportUpdate:
4434 description: 'Update the support field for all videos of this channel'
4439 name: 'media:peerLink'
4448 - application/x-bittorrent
4454 name: 'media:content'
4484 VideoCommentsForXML:
4517 description: video watch page URL
4520 description: video canonical URL
4524 description: video publication date
4527 description: video description
4530 description: video description
4533 description: publisher user name
4536 description: video category (MRSS)
4539 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
4553 description: video embed path, relative to the canonical URL domain (MRSS)
4561 description: video watch path, relative to the canonical URL domain (MRSS)
4581 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
4582 'media:description':
4589 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
4592 description: main streamable file for the video
4601 - application/x-bittorrent
4610 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)
4613 - $ref: '#/components/schemas/MRSSPeerLink'
4614 - $ref: '#/components/schemas/MRSSGroupContent'
4615 NotificationSettingValue:
4633 Notification type, following the `UserNotificationType` enum:
4634 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
4635 - `2` NEW_COMMENT_ON_MY_VIDEO
4636 - `3` NEW_VIDEO_ABUSE_FOR_MODERATORS
4637 - `4` BLACKLIST_ON_MY_VIDEO
4638 - `5` UNBLACKLIST_ON_MY_VIDEO
4639 - `6` MY_VIDEO_PUBLISHED
4640 - `7` MY_VIDEO_IMPORT_SUCCESS
4641 - `8` MY_VIDEO_IMPORT_ERROR
4642 - `9` NEW_USER_REGISTRATION
4644 - `11` COMMENT_MENTION
4645 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
4646 - `13` NEW_INSTANCE_FOLLOWER
4647 - `14` AUTO_INSTANCE_FOLLOWING
4653 - $ref: '#/components/schemas/VideoInfo'
4657 $ref: '#/components/schemas/ActorInfo'
4666 $ref: '#/components/schemas/VideoInfo'
4685 $ref: '#/components/schemas/VideoInfo'
4687 $ref: '#/components/schemas/ActorInfo'
4696 - $ref: '#/components/schemas/VideoInfo'
4705 - $ref: '#/components/schemas/VideoInfo'
4709 - $ref: '#/components/schemas/ActorInfo'
4717 $ref: '#/components/schemas/ActorInfo'
4744 NotificationListResponse:
4751 $ref: '#/components/schemas/Notification'
4777 additionalProperties: true
4791 $ref: '#/components/schemas/Plugin'