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 Video abuses deal with reports of local or remote videos alike.
80 Operations dealing with listing, uploading, fetching or modifying videos.
83 The search helps to find _videos_ or _channels_ from within the instance and beyond.
84 Videos from other instances federated by the instance (that is, instances
85 followed by the instance) can be found via keywords and other criteria of
88 Administrators can also enable the use of a remote search system, indexing
89 videos and channels not could be not federated by the instance.
90 - name: Video Comments
92 Operations dealing with comments to a video. Comments are organized in
94 - name: Video Playlists
96 Operations dealing with playlists of videos. Playlists are bound to users
98 - name: Video Channels
100 Operations dealing with the creation, modification and listing of videos within a channel.
103 Operations dealing with blocking videos (removing them from view and
104 preventing interactions).
107 Like/dislike a video.
110 Server syndication feeds
127 - Video Ownership Change
139 - name: Instance Configuration
143 - Instance Redundancy
152 summary: Get an account
154 - $ref: '#/components/parameters/name'
157 description: successful operation
161 $ref: '#/components/schemas/Account'
163 description: account not found
164 '/accounts/{name}/videos':
169 summary: 'List videos of an account'
171 - $ref: '#/components/parameters/name'
172 - $ref: '#/components/parameters/categoryOneOf'
173 - $ref: '#/components/parameters/tagsOneOf'
174 - $ref: '#/components/parameters/tagsAllOf'
175 - $ref: '#/components/parameters/licenceOneOf'
176 - $ref: '#/components/parameters/languageOneOf'
177 - $ref: '#/components/parameters/nsfw'
178 - $ref: '#/components/parameters/filter'
179 - $ref: '#/components/parameters/skipCount'
180 - $ref: '#/components/parameters/start'
181 - $ref: '#/components/parameters/count'
182 - $ref: '#/components/parameters/videosSort'
185 description: successful operation
189 $ref: '#/components/schemas/VideoListResponse'
193 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
194 .then(function(response) {
195 return response.json()
196 }).then(function(data) {
202 http -b GET https://peertube2.cpy.re/api/v1/accounts/{name}/videos
208 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
210 http = Net::HTTP.new(uri.host, uri.port)
213 response = http.get(uri.request_uri)
215 puts JSON.parse(response.read_body)
220 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
228 summary: List accounts
230 - $ref: '#/components/parameters/start'
231 - $ref: '#/components/parameters/count'
232 - $ref: '#/components/parameters/sort'
235 description: successful operation
241 $ref: '#/components/schemas/Account'
246 summary: Get instance public configuration
249 description: successful operation
253 $ref: '#/components/schemas/ServerConfig'
256 summary: Get instance "About" information
261 description: successful operation
265 $ref: '#/components/schemas/ServerConfigAbout'
268 summary: Get instance runtime configuration
276 description: successful operation
280 $ref: '#/components/schemas/ServerConfigCustom'
282 summary: Set instance runtime configuration
290 description: successful operation
292 summary: Delete instance runtime configuration
300 description: successful operation
303 summary: List instance jobs
313 description: The state of the job
322 - $ref: '#/components/parameters/start'
323 - $ref: '#/components/parameters/count'
324 - $ref: '#/components/parameters/sort'
327 description: successful operation
333 $ref: '#/components/schemas/Job'
334 '/server/following/{host}':
341 summary: Unfollow a server
346 description: 'The host to unfollow '
351 description: successful operation
356 summary: List instance followers
358 - $ref: '#/components/parameters/start'
359 - $ref: '#/components/parameters/count'
360 - $ref: '#/components/parameters/sort'
363 description: successful operation
369 $ref: '#/components/schemas/Follow'
374 summary: List instances followed by the server
393 - $ref: '#/components/parameters/start'
394 - $ref: '#/components/parameters/count'
395 - $ref: '#/components/parameters/sort'
398 description: successful operation
404 $ref: '#/components/schemas/Follow'
411 summary: Follow a server
414 description: successful operation
416 description: cannot follow a non-HTTPS server
430 summary: Create a user
438 description: successful operation
442 $ref: '#/components/schemas/AddUserResponse'
447 $ref: '#/components/schemas/AddUser'
448 description: User to create
457 - $ref: '#/components/parameters/start'
458 - $ref: '#/components/parameters/count'
459 - $ref: '#/components/parameters/usersSort'
462 description: successful operation
468 $ref: '#/components/schemas/User'
471 summary: Delete a user
478 - $ref: '#/components/parameters/id'
481 description: successful operation
489 - $ref: '#/components/parameters/id'
492 description: successful operation
496 $ref: '#/components/schemas/User'
498 summary: Update a user
504 - $ref: '#/components/parameters/id'
507 description: successful operation
512 $ref: '#/components/schemas/UpdateUser'
516 summary: Register a user
521 description: successful operation
526 $ref: '#/components/schemas/RegisterUser'
530 summary: Get my user information
538 description: successful operation
544 $ref: '#/components/schemas/User'
546 summary: Update my user information
554 description: successful operation
559 $ref: '#/components/schemas/UpdateMe'
561 /users/me/videos/imports:
563 summary: Get video imports of my user
571 - $ref: '#/components/parameters/start'
572 - $ref: '#/components/parameters/count'
573 - $ref: '#/components/parameters/sort'
576 description: successful operation
580 $ref: '#/components/schemas/VideoImport'
581 /users/me/video-quota-used:
583 summary: Get my user used quota
591 description: successful operation
596 '/users/me/videos/{videoId}/rating':
598 summary: Get rate of my user for a video
608 description: 'The video id '
613 description: successful operation
617 $ref: '#/components/schemas/GetMeVideoRating'
620 summary: Get videos of my user
628 - $ref: '#/components/parameters/start'
629 - $ref: '#/components/parameters/count'
630 - $ref: '#/components/parameters/sort'
633 description: successful operation
637 $ref: '#/components/schemas/VideoListResponse'
638 /users/me/subscriptions:
640 summary: Get my user subscriptions
647 - $ref: '#/components/parameters/start'
648 - $ref: '#/components/parameters/count'
649 - $ref: '#/components/parameters/sort'
652 description: successful operation
654 summary: Add subscription to my user
662 description: successful operation
663 /users/me/subscriptions/exist:
665 summary: Get if subscriptions exist for my user
672 - $ref: '#/components/parameters/subscriptionsUris'
675 description: successful operation
680 /users/me/subscriptions/videos:
682 summary: List videos of subscriptions of my user
690 - $ref: '#/components/parameters/categoryOneOf'
691 - $ref: '#/components/parameters/tagsOneOf'
692 - $ref: '#/components/parameters/tagsAllOf'
693 - $ref: '#/components/parameters/licenceOneOf'
694 - $ref: '#/components/parameters/languageOneOf'
695 - $ref: '#/components/parameters/nsfw'
696 - $ref: '#/components/parameters/filter'
697 - $ref: '#/components/parameters/skipCount'
698 - $ref: '#/components/parameters/start'
699 - $ref: '#/components/parameters/count'
700 - $ref: '#/components/parameters/videosSort'
703 description: successful operation
707 $ref: '#/components/schemas/VideoListResponse'
708 '/users/me/subscriptions/{subscriptionHandle}':
710 summary: Get subscription of my user
717 - $ref: '#/components/parameters/subscriptionHandle'
720 description: successful operation
724 $ref: '#/components/schemas/VideoChannel'
726 summary: Delete subscription of my user
733 - $ref: '#/components/parameters/subscriptionHandle'
736 description: successful operation
737 /users/me/notifications:
739 summary: List my notifications
747 description: only list unread notifications
750 - $ref: '#/components/parameters/start'
751 - $ref: '#/components/parameters/count'
752 - $ref: '#/components/parameters/sort'
755 description: successful operation
759 $ref: '#/components/schemas/NotificationListResponse'
760 /users/me/notifications/read:
762 summary: Mark notifications as read by their id
775 description: ids of the notifications to mark as read
782 description: successful operation
783 /users/me/notifications/read-all:
785 summary: Mark all my notification as read
792 description: successful operation
793 /users/me/notification-settings:
795 summary: Update my notification settings
806 newVideoFromSubscription:
807 $ref: '#/components/schemas/NotificationSettingValue'
809 $ref: '#/components/schemas/NotificationSettingValue'
810 videoAbuseAsModerator:
811 $ref: '#/components/schemas/NotificationSettingValue'
812 videoAutoBlacklistAsModerator:
813 $ref: '#/components/schemas/NotificationSettingValue'
815 $ref: '#/components/schemas/NotificationSettingValue'
817 $ref: '#/components/schemas/NotificationSettingValue'
818 myVideoImportFinished:
819 $ref: '#/components/schemas/NotificationSettingValue'
821 $ref: '#/components/schemas/NotificationSettingValue'
823 $ref: '#/components/schemas/NotificationSettingValue'
825 $ref: '#/components/schemas/NotificationSettingValue'
827 $ref: '#/components/schemas/NotificationSettingValue'
828 autoInstanceFollowing:
829 $ref: '#/components/schemas/NotificationSettingValue'
832 description: successful operation
833 /users/me/avatar/pick:
835 summary: Update my user avatar
842 description: successful operation
846 $ref: '#/components/schemas/Avatar'
854 description: The file to upload.
859 contentType: image/png, image/jpeg
862 summary: List video ownership changes
864 - Video Ownership Change
869 description: successful operation
870 '/videos/ownership/{id}/accept':
872 summary: Accept ownership change request
874 - Video Ownership Change
878 - $ref: '#/components/parameters/idOrUUID'
881 description: successful operation
883 description: cannot terminate an ownership change of another user
885 description: video owneship change not found
886 '/videos/ownership/{id}/refuse':
888 summary: Refuse ownership change request
890 - Video Ownership Change
894 - $ref: '#/components/parameters/idOrUUID'
897 description: successful operation
899 description: cannot terminate an ownership change of another user
901 description: video owneship change not found
902 '/videos/{id}/give-ownership':
904 summary: Request ownership change
906 - Video Ownership Change
910 - $ref: '#/components/parameters/idOrUUID'
914 application/x-www-form-urlencoded:
924 description: successful operation
926 description: changing video ownership to a remote account is not supported yet
928 description: video not found
935 - $ref: '#/components/parameters/categoryOneOf'
936 - $ref: '#/components/parameters/tagsOneOf'
937 - $ref: '#/components/parameters/tagsAllOf'
938 - $ref: '#/components/parameters/licenceOneOf'
939 - $ref: '#/components/parameters/languageOneOf'
940 - $ref: '#/components/parameters/nsfw'
941 - $ref: '#/components/parameters/filter'
942 - $ref: '#/components/parameters/skipCount'
943 - $ref: '#/components/parameters/start'
944 - $ref: '#/components/parameters/count'
945 - $ref: '#/components/parameters/videosSort'
948 description: successful operation
952 $ref: '#/components/schemas/VideoListResponse'
955 summary: List available video categories
960 description: successful operation
969 summary: List available video licences
974 description: successful operation
983 summary: List available video languages
988 description: successful operation
997 summary: List available video privacies
1002 description: successful operation
1011 summary: Update a video
1017 - $ref: '#/components/parameters/idOrUUID'
1020 description: successful operation
1023 multipart/form-data:
1028 description: Video thumbnail file
1032 description: Video preview file
1036 description: Video category
1039 description: Video licence
1042 description: Video language
1045 $ref: '#/components/schemas/VideoPrivacySet'
1047 description: Video description
1050 description: Whether or not we wait transcoding before publish the video
1053 description: Text describing how to support the video uploader
1056 description: Whether or not this video contains sensitive content
1059 description: Video name
1062 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1071 description: Enable or disable comments for this video
1073 originallyPublishedAt:
1074 description: Date when the content was originally published
1078 $ref: '#/components/schemas/VideoScheduledUpdate'
1081 contentType: image/jpeg
1083 contentType: image/jpeg
1085 summary: Get a video
1089 - $ref: '#/components/parameters/idOrUUID'
1092 description: successful operation
1096 $ref: '#/components/schemas/VideoDetails'
1098 summary: Delete a video
1104 - $ref: '#/components/parameters/idOrUUID'
1107 description: successful operation
1108 '/videos/{id}/description':
1110 summary: Get complete video description
1114 - $ref: '#/components/parameters/idOrUUID'
1117 description: successful operation
1122 '/videos/{id}/views':
1124 summary: Add a view to a video
1128 - $ref: '#/components/parameters/idOrUUID'
1131 description: successful operation
1132 '/videos/{id}/watching':
1134 summary: Set watching progress of a video
1140 - $ref: '#/components/parameters/idOrUUID'
1145 $ref: '#/components/schemas/UserWatchingVideo'
1149 description: successful operation
1152 summary: Upload a video
1159 description: successful operation
1163 $ref: '#/components/schemas/VideoUploadResponse'
1165 description: 'The user video quota is exceeded with this video.'
1167 description: 'Upload has timed out'
1169 description: 'Invalid input file.'
1172 multipart/form-data:
1177 description: Video file
1181 description: Channel id that will contain this video
1184 description: Video thumbnail file
1188 description: Video preview file
1192 $ref: '#/components/schemas/VideoPrivacySet'
1194 description: Video category
1197 description: Video licence
1200 description: Video language
1203 description: Video description
1206 description: Whether or not we wait transcoding before publish the video
1209 description: Text describing how to support the video uploader
1212 description: Whether or not this video contains sensitive content
1215 description: Video name
1218 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1228 description: Enable or disable comments for this video
1230 originallyPublishedAt:
1231 description: Date when the content was originally published
1235 $ref: '#/components/schemas/VideoScheduledUpdate'
1242 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1244 contentType: image/jpeg
1246 contentType: image/jpeg
1250 ## DEPENDENCIES: httpie, jq
1251 # pip install httpie
1252 USERNAME="<your_username>"
1253 PASSWORD="<your_password>"
1254 FILE_PATH="<your_file_path>"
1255 CHANNEL_ID="<your_channel_id>"
1258 API_PATH="https://peertube2.cpy.re/api/v1"
1260 client_id=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_id")
1261 client_secret=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
1262 token=$(http -b --form POST "$API_PATH/users/token" \
1263 client_id="$client_id" client_secret="$client_secret" grant_type=password response_type=code \
1264 username=$USERNAME \
1265 password=$PASSWORD \
1266 | jq -r ".access_token")
1268 http -b --form POST "$API_PATH/videos/upload" \
1269 videofile@$FILE_PATH \
1270 channelId=$CHANNEL_ID \
1272 "Authorization:Bearer $token"
1275 summary: Import a video
1276 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
1283 multipart/form-data:
1288 description: Torrent File
1292 description: HTTP target URL
1295 description: Magnet URI
1298 description: Channel id that will contain this video
1301 description: Video thumbnail file
1305 description: Video preview file
1309 $ref: '#/components/schemas/VideoPrivacySet'
1311 description: Video category
1314 description: Video licence
1317 description: Video language
1320 description: Video description
1323 description: Whether or not we wait transcoding before publish the video
1326 description: Text describing how to support the video uploader
1329 description: Whether or not this video contains sensitive content
1332 description: Video name
1335 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1344 description: Enable or disable comments for this video
1347 $ref: '#/components/schemas/VideoScheduledUpdate'
1353 contentType: application/x-bittorrent
1355 contentType: image/jpeg
1357 contentType: image/jpeg
1360 description: successful operation
1364 $ref: '#/components/schemas/VideoUploadResponse'
1366 description: HTTP or Torrent/magnetURI import not enabled
1368 description: '`magnetUri` or `targetUrl` or a torrent file missing'
1371 summary: List video abuses
1379 - $ref: '#/components/parameters/start'
1380 - $ref: '#/components/parameters/count'
1381 - $ref: '#/components/parameters/abusesSort'
1384 description: successful operation
1390 $ref: '#/components/schemas/VideoAbuse'
1391 '/videos/{id}/abuse':
1393 summary: Report an abuse
1400 - $ref: '#/components/parameters/idOrUUID'
1409 description: Reason why the user reports this video
1412 description: Reason categories that help triage reports
1427 description: Timestamp in the video that marks the beginning of the report
1430 description: Timestamp in the video that marks the ending of the report
1435 description: successful operation
1436 '/videos/{id}/abuse/{abuseId}':
1438 summary: Update an abuse
1447 description: successful operation
1449 description: video abuse not found
1451 - $ref: '#/components/parameters/idOrUUID'
1452 - $ref: '#/components/parameters/abuseId'
1460 $ref: '#/components/schemas/VideoAbuseStateSet'
1463 description: 'Update the comment of the video abuse for other admin/moderators'
1465 summary: Delete an abuse
1474 description: successful operation
1476 description: block not found
1478 - $ref: '#/components/parameters/idOrUUID'
1479 - $ref: '#/components/parameters/abuseId'
1481 '/videos/{id}/blacklist':
1483 summary: Block a video
1491 - $ref: '#/components/parameters/idOrUUID'
1494 description: successful operation
1496 summary: Unblock a video by its id
1504 - $ref: '#/components/parameters/idOrUUID'
1507 description: successful operation
1509 description: block not found
1514 summary: List video blocks
1520 - $ref: '#/components/parameters/start'
1521 - $ref: '#/components/parameters/count'
1522 - $ref: '#/components/parameters/blacklistsSort'
1525 description: successful operation
1531 $ref: '#/components/schemas/VideoBlacklist'
1532 /videos/{id}/captions:
1534 summary: List captions of a video
1538 - $ref: '#/components/parameters/idOrUUID'
1541 description: successful operation
1552 $ref: '#/components/schemas/VideoCaption'
1553 /videos/{id}/captions/{captionLanguage}:
1555 summary: Add or replace a video caption
1559 - $ref: '#/components/parameters/idOrUUID'
1560 - $ref: '#/components/parameters/captionLanguage'
1563 multipart/form-data:
1568 description: The file to upload.
1573 contentType: text/vtt, application/x-subrip, text/plain
1576 description: successful operation
1578 description: video or language not found
1580 summary: Delete a video caption
1584 - $ref: '#/components/parameters/idOrUUID'
1585 - $ref: '#/components/parameters/captionLanguage'
1588 description: successful operation
1590 description: video or language or caption for that language not found
1593 summary: List video channels
1597 - $ref: '#/components/parameters/start'
1598 - $ref: '#/components/parameters/count'
1599 - $ref: '#/components/parameters/sort'
1602 description: successful operation
1608 $ref: '#/components/schemas/VideoChannel'
1610 summary: Create a video channel
1617 description: successful operation
1622 $ref: '#/components/schemas/VideoChannelCreate'
1623 '/video-channels/{channelHandle}':
1625 summary: Get a video channel
1629 - $ref: '#/components/parameters/channelHandle'
1632 description: successful operation
1636 $ref: '#/components/schemas/VideoChannel'
1638 summary: Update a video channel
1644 - $ref: '#/components/parameters/channelHandle'
1647 description: successful operation
1652 $ref: '#/components/schemas/VideoChannelUpdate'
1654 summary: Delete a video channel
1660 - $ref: '#/components/parameters/channelHandle'
1663 description: successful operation
1664 '/video-channels/{channelHandle}/videos':
1666 summary: List videos of a video channel
1671 - $ref: '#/components/parameters/channelHandle'
1672 - $ref: '#/components/parameters/categoryOneOf'
1673 - $ref: '#/components/parameters/tagsOneOf'
1674 - $ref: '#/components/parameters/tagsAllOf'
1675 - $ref: '#/components/parameters/licenceOneOf'
1676 - $ref: '#/components/parameters/languageOneOf'
1677 - $ref: '#/components/parameters/nsfw'
1678 - $ref: '#/components/parameters/filter'
1679 - $ref: '#/components/parameters/skipCount'
1680 - $ref: '#/components/parameters/start'
1681 - $ref: '#/components/parameters/count'
1682 - $ref: '#/components/parameters/videosSort'
1685 description: successful operation
1689 $ref: '#/components/schemas/VideoListResponse'
1691 /video-playlists/privacies:
1693 summary: List available playlist privacies
1698 description: successful operation
1708 summary: List video playlists
1712 - $ref: '#/components/parameters/start'
1713 - $ref: '#/components/parameters/count'
1714 - $ref: '#/components/parameters/sort'
1717 description: successful operation
1723 $ref: '#/components/schemas/VideoPlaylist'
1725 summary: Create a video playlist
1726 description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
1733 description: successful operation
1748 multipart/form-data:
1753 description: Video playlist display name
1756 description: Video playlist thumbnail file
1760 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1762 description: Video playlist description
1765 description: Video channel in which the playlist will be published
1770 /video-playlists/{id}:
1772 summary: Get a video playlist
1776 - $ref: '#/components/parameters/idOrUUID'
1779 description: successful operation
1783 $ref: '#/components/schemas/VideoPlaylist'
1785 summary: Update a video playlist
1786 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
1793 description: successful operation
1795 - $ref: '#/components/parameters/idOrUUID'
1798 multipart/form-data:
1803 description: Video playlist display name
1806 description: Video playlist thumbnail file
1810 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1812 description: Video playlist description
1815 description: Video channel in which the playlist will be published
1818 summary: Delete a video playlist
1824 - $ref: '#/components/parameters/idOrUUID'
1827 description: successful operation
1829 /video-playlists/{id}/videos:
1831 summary: 'List videos of a playlist'
1836 - $ref: '#/components/parameters/idOrUUID'
1839 description: successful operation
1843 $ref: '#/components/schemas/VideoListResponse'
1845 summary: 'Add a video in a playlist'
1852 - $ref: '#/components/parameters/idOrUUID'
1855 description: successful operation
1861 videoPlaylistElement:
1874 description: 'Video to add in the playlist'
1877 description: 'Start the video at this specific timestamp (in seconds)'
1880 description: 'Stop the video at this specific timestamp (in seconds)'
1884 /video-playlists/{id}/videos/reorder:
1886 summary: 'Reorder a playlist'
1892 - $ref: '#/components/parameters/idOrUUID'
1895 description: successful operation
1904 description: 'Start position of the element to reorder'
1906 insertAfterPosition:
1908 description: 'New position for the block to reorder, to add the block before the first element'
1912 description: 'How many element from `startPosition` to reorder'
1916 - insertAfterPosition
1918 /video-playlists/{id}/videos/{playlistElementId}:
1920 summary: 'Update a playlist element'
1926 - $ref: '#/components/parameters/idOrUUID'
1927 - $ref: '#/components/parameters/playlistElementId'
1930 description: successful operation
1939 description: 'Start the video at this specific timestamp (in seconds)'
1942 description: 'Stop the video at this specific timestamp (in seconds)'
1944 summary: 'Delete an element from a playlist'
1950 - $ref: '#/components/parameters/idOrUUID'
1951 - $ref: '#/components/parameters/playlistElementId'
1954 description: successful operation
1956 '/users/me/video-playlists/videos-exist':
1958 summary: 'Check video exists in my playlists'
1967 description: The video ids to check
1974 description: successful operation
1994 '/accounts/{name}/video-channels':
1996 summary: List video channels of an account
2001 - $ref: '#/components/parameters/name'
2004 description: successful operation
2010 $ref: '#/components/schemas/VideoChannel'
2011 '/accounts/{name}/ratings':
2013 summary: List ratings of an account
2019 - $ref: '#/components/parameters/name'
2020 - $ref: '#/components/parameters/start'
2021 - $ref: '#/components/parameters/count'
2022 - $ref: '#/components/parameters/sort'
2026 description: Optionally filter which ratings to retrieve
2034 description: successful operation
2040 $ref: '#/components/schemas/VideoRating'
2041 '/videos/{id}/comment-threads':
2043 summary: List threads of a video
2047 - $ref: '#/components/parameters/idOrUUID'
2048 - $ref: '#/components/parameters/start'
2049 - $ref: '#/components/parameters/count'
2050 - $ref: '#/components/parameters/commentsSort'
2053 description: successful operation
2057 $ref: '#/components/schemas/CommentThreadResponse'
2059 summary: Create a thread
2065 - $ref: '#/components/parameters/idOrUUID'
2068 description: successful operation
2072 $ref: '#/components/schemas/CommentThreadPostResponse'
2081 description: 'Text comment'
2085 '/videos/{id}/comment-threads/{threadId}':
2087 summary: Get a thread
2091 - $ref: '#/components/parameters/idOrUUID'
2092 - $ref: '#/components/parameters/threadId'
2095 description: successful operation
2099 $ref: '#/components/schemas/VideoCommentThreadTree'
2100 '/videos/{id}/comments/{commentId}':
2102 summary: Reply to a thread of a video
2108 - $ref: '#/components/parameters/idOrUUID'
2109 - $ref: '#/components/parameters/commentId'
2112 description: successful operation
2116 $ref: '#/components/schemas/CommentThreadPostResponse'
2125 description: 'Text comment'
2130 summary: Delete a comment or a reply
2136 - $ref: '#/components/parameters/idOrUUID'
2137 - $ref: '#/components/parameters/commentId'
2140 description: successful operation
2141 '/videos/{id}/rate':
2143 summary: Like/dislike a video
2149 - $ref: '#/components/parameters/idOrUUID'
2152 description: successful operation
2157 summary: Search videos
2159 - $ref: '#/components/parameters/categoryOneOf'
2160 - $ref: '#/components/parameters/tagsOneOf'
2161 - $ref: '#/components/parameters/tagsAllOf'
2162 - $ref: '#/components/parameters/licenceOneOf'
2163 - $ref: '#/components/parameters/languageOneOf'
2164 - $ref: '#/components/parameters/nsfw'
2165 - $ref: '#/components/parameters/filter'
2166 - $ref: '#/components/parameters/skipCount'
2167 - $ref: '#/components/parameters/start'
2168 - $ref: '#/components/parameters/count'
2169 - $ref: '#/components/parameters/searchTarget'
2170 - $ref: '#/components/parameters/videosSearchSort'
2175 String to search. If the user can make a remote URI search, and the string is an URI then the
2176 PeerTube instance will fetch the remote object and add it to its database. Then,
2177 you can use the REST API to fetch the complete video information and interact with it.
2183 description: Get videos that are published after this date
2190 description: Get videos that are published before this date
2194 - name: originallyPublishedStartDate
2197 description: Get videos that are originally published after this date
2201 - name: originallyPublishedEndDate
2204 description: Get videos that are originally published before this date
2211 description: Get videos that have this minimum duration
2217 description: Get videos that have this maximum duration
2222 description: successful operation
2226 $ref: '#/components/schemas/VideoListResponse'
2227 /search/video-channels:
2231 summary: Search channels
2233 - $ref: '#/components/parameters/start'
2234 - $ref: '#/components/parameters/count'
2235 - $ref: '#/components/parameters/searchTarget'
2236 - $ref: '#/components/parameters/sort'
2241 String to search. If the user can make a remote URI search, and the string is an URI then the
2242 PeerTube instance will fetch the remote object and add it to its database. Then,
2243 you can use the REST API to fetch the complete channel information and interact with it.
2248 description: successful operation
2254 $ref: '#/components/schemas/VideoChannel'
2255 /blocklist/accounts:
2259 summary: List account blocks
2264 - $ref: '#/components/parameters/start'
2265 - $ref: '#/components/parameters/count'
2266 - $ref: '#/components/parameters/sort'
2269 description: successful operation
2273 summary: Block an account
2285 description: account to block, in the form `username@domain`
2290 description: successful operation
2292 description: self-blocking forbidden
2293 '/blocklist/accounts/{accountName}':
2297 summary: Unblock an account by its handle
2305 description: account to unblock, in the form `username@domain`
2310 description: successful operation
2312 description: account or account block does not exist
2317 summary: List server blocks
2322 - $ref: '#/components/parameters/start'
2323 - $ref: '#/components/parameters/count'
2324 - $ref: '#/components/parameters/sort'
2327 description: successful operation
2331 summary: Block a server
2343 description: server domain to block
2348 description: successful operation
2350 description: self-blocking forbidden
2351 '/blocklist/servers/{host}':
2355 summary: Unblock a server by its domain
2363 description: server domain to unblock
2368 description: successful operation
2370 description: account block does not exist
2374 - Instance Redundancy
2375 summary: Update a server redundancy policy
2383 description: server domain to mirror
2394 description: allow mirroring of the host's local videos
2399 description: successful operation
2401 description: server is not already known
2406 summary: List videos being mirrored
2414 description: direction of the mirror
2420 - $ref: '#/components/parameters/start'
2421 - $ref: '#/components/parameters/count'
2422 - $ref: '#/components/parameters/videoRedundanciesSort'
2425 description: successful operation
2431 $ref: '#/components/schemas/VideoRedundancy'
2435 summary: Mirror a video
2451 description: successful operation
2453 description: cannot mirror a local video
2455 description: video does not exist
2457 description: video is already mirrored
2458 /redundancy/videos/{redundancyId}:
2462 summary: Delete a mirror done on a video
2467 - name: redundancyId
2470 description: id of an existing redundancy on a video
2475 description: successful operation
2477 description: video redundancy not found
2478 '/feeds/video-comments.{format}':
2482 summary: List comments on videos
2484 - url: 'https://peertube2.cpy.re'
2485 description: Live Test Server (live data - latest nightly version)
2486 - url: 'https://peertube3.cpy.re'
2487 description: Live Test Server (live data - latest RC version)
2488 - url: 'https://peertube.cpy.re'
2489 description: Live Test Server (live data - stable version)
2494 description: 'format expected (we focus on making `rss` the most featureful ; it serves Media RSS)'
2507 description: 'limit listing to a specific video'
2512 description: successful operation
2517 default: 'max-age=900' # 15 min cache
2521 $ref: '#/components/schemas/VideoCommentsForXML'
2522 application/rss+xml:
2524 $ref: '#/components/schemas/VideoCommentsForXML'
2527 $ref: '#/components/schemas/VideoCommentsForXML'
2528 application/atom+xml:
2530 $ref: '#/components/schemas/VideoCommentsForXML'
2535 description: accept header unsupported
2536 '/feeds/videos.{format}':
2540 summary: List videos
2542 - url: 'https://peertube2.cpy.re'
2543 description: Live Test Server (live data - latest nightly version)
2544 - url: 'https://peertube3.cpy.re'
2545 description: Live Test Server (live data - latest RC version)
2546 - url: 'https://peertube.cpy.re'
2547 description: Live Test Server (live data - stable version)
2552 description: 'format expected (we focus on making `rss` the most featureful ; it serves Media RSS)'
2565 description: 'limit listing to a specific account'
2570 description: 'limit listing to a specific account'
2573 - name: videoChannelId
2575 description: 'limit listing to a specific video channel'
2578 - name: videoChannelName
2580 description: 'limit listing to a specific video channel'
2585 description: successful operation
2590 default: 'max-age=900' # 15 min cache
2594 $ref: '#/components/schemas/VideosForXML'
2595 application/rss+xml:
2597 $ref: '#/components/schemas/VideosForXML'
2600 $ref: '#/components/schemas/VideosForXML'
2601 application/atom+xml:
2603 $ref: '#/components/schemas/VideosForXML'
2608 description: accept header unsupported
2610 - url: 'https://peertube2.cpy.re/api/v1'
2611 description: Live Test Server (live data - latest nightly version)
2612 - url: 'https://peertube3.cpy.re/api/v1'
2613 description: Live Test Server (live data - latest RC version)
2614 - url: 'https://peertube.cpy.re/api/v1'
2615 description: Live Test Server (live data - stable version)
2622 description: Offset used to paginate results
2629 description: "Number of items to return"
2638 description: Sort column (`-createdAt` for example)
2646 If the administrator enabled search index support, you can override the default search target.
2649 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
2650 It means the instance may not know the objects you fetched. If you want to load video/channel information:
2651 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
2652 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
2653 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
2654 * If the current user has not the ability to make a remote URI search, then redirect the user on the origin instance or fetch
2655 the data from the origin instance API
2665 description: Sort videos by criteria
2680 description: Sort videos by criteria
2695 description: Sort comments by criteria
2705 description: Sort blacklists by criteria
2721 description: Sort users by criteria
2732 description: Sort abuses by criteria
2739 videoRedundanciesSort:
2743 description: Sort abuses by criteria
2753 The name of the account (`chocobozzz` or `chocobozzz@example.org` for
2761 description: The user id
2768 description: The object id or uuid
2772 name: playlistElementId
2775 description: Playlist element id
2782 description: Video abuse id
2786 name: captionLanguage
2789 description: The caption language
2796 description: "The video channel handle (example: 'my_username@example.com' or 'my_username')"
2800 name: subscriptionHandle
2803 description: "The subscription handle (example: 'my_username@example.com' or 'my_username')"
2810 description: The thread id (root comment id)
2817 description: The comment id
2824 description: category id of the video (see /videos/categories)
2837 description: tag(s) of the video
2850 description: tag(s) of the video, where all should be present in the video
2863 description: language id of the video (see /videos/languages). Use `_unknown` to filter on videos that don't have a video language
2876 description: licence id of the video (see /videos/licences)
2889 description: if you don't need the `total` in the response
2900 description: whether to include nsfw videos, if any
2911 Special filters (local for instance) which might require special rights:
2912 * `local` - only videos local to the instance
2913 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
2923 description: list of uris to check if each is part of the user subscriptions
2931 In the header: *Authorization: Bearer <token\>*
2934 Authenticating via OAuth requires the following steps:
2937 - Have an account with sufficient authorization levels
2939 - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
2942 - Make Authenticated Requests
2946 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
2949 moderator: Moderator scope
2952 VideoConstantNumber:
2958 VideoConstantString:
2965 VideoPlaylistPrivacySet:
2971 description: 'The video playlist privacy (Public = `1`, Unlisted = `2`, Private = `3`)'
2972 VideoPlaylistPrivacyConstant:
2975 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2979 VideoPlaylistTypeSet:
2984 description: 'The video playlist type (Regular = `1`, Watch Later = `2`)'
2985 VideoPlaylistTypeConstant:
2988 $ref: '#/components/schemas/VideoPlaylistTypeSet'
2999 description: 'The video privacy (Public = `1`, Unlisted = `2`, Private = `3`, Internal = `4`)'
3000 VideoPrivacyConstant:
3003 $ref: '#/components/schemas/VideoPrivacySet'
3020 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
3030 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
3040 description: 'The video playlist privacy (Pending = `1`, Rejected = `2`, Accepted = `3`)'
3041 VideoAbuseStateConstant:
3044 $ref: '#/components/schemas/VideoAbuseStateSet'
3047 VideoAbusePredefinedReasons:
3061 VideoResolutionConstant:
3065 description: 'Video resolution (240, 360, 720 ...)'
3068 VideoScheduledUpdate:
3071 $ref: '#/components/schemas/VideoPrivacySet'
3075 description: When to update the video
3093 - $ref: '#/components/schemas/Avatar'
3094 VideoChannelSummary:
3109 - $ref: '#/components/schemas/Avatar'
3121 - $ref: '#/components/schemas/Video'
3127 $ref: '#/components/schemas/VideoResolutionConstant'
3130 description: 'Video file size in bytes'
3143 VideoStreamingPlaylists:
3151 description: 'Playlist type (HLS = `1`)'
3159 $ref: '#/components/schemas/VideoFile'
3187 originallyPublishedAt:
3190 $ref: '#/components/schemas/VideoConstantNumber'
3192 $ref: '#/components/schemas/VideoConstantNumber'
3194 $ref: '#/components/schemas/VideoConstantString'
3196 $ref: '#/components/schemas/VideoPrivacyConstant'
3223 $ref: '#/components/schemas/VideoStateConstant'
3227 - $ref: '#/components/schemas/VideoScheduledUpdate'
3235 $ref: '#/components/schemas/AccountSummary'
3237 $ref: '#/components/schemas/VideoChannelSummary'
3246 - $ref: '#/components/schemas/Video'
3254 $ref: '#/components/schemas/VideoChannel'
3256 $ref: '#/components/schemas/Account'
3264 $ref: '#/components/schemas/VideoFile'
3276 $ref: '#/components/schemas/VideoStreamingPlaylists'
3277 FileRedundancyInformation:
3312 $ref: '#/components/schemas/FileRedundancyInformation'
3316 $ref: '#/components/schemas/FileRedundancyInformation'
3317 VideoImportStateConstant:
3325 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
3342 $ref: '#/components/schemas/VideoImportStateConstant'
3352 $ref: '#/components/schemas/Video'
3360 $ref: '#/components/schemas/VideoAbusePredefinedReasons'
3362 $ref: '#/components/schemas/Account'
3364 $ref: '#/components/schemas/VideoAbuseStateConstant'
3440 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
3442 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
3444 $ref: '#/components/schemas/AccountSummary'
3446 $ref: '#/components/schemas/VideoChannelSummary'
3465 totalRepliesFromVideoAuthor:
3470 $ref: '#/components/schemas/Account'
3471 VideoCommentThreadTree:
3474 $ref: '#/components/schemas/VideoComment'
3478 $ref: '#/components/schemas/VideoCommentThreadTree'
3482 $ref: '#/components/schemas/VideoConstantString'
3528 $ref: '#/components/schemas/Avatar'
3531 - $ref: '#/components/schemas/Actor'
3549 description: 'Theme enabled by this user'
3552 description: 'Has the user confirmed their email address?'
3554 $ref: '#/components/schemas/NSFWPolicy'
3559 description: 'Automatically start playing the video on the watch page'
3561 $ref: '#/components/schemas/UserRole'
3576 videoAbusesAcceptedCount:
3578 videoAbusesCreatedCount:
3582 noInstanceConfigWarningModal:
3593 $ref: '#/components/schemas/Account'
3597 $ref: '#/components/schemas/VideoChannel'
3667 allowedForCurrentIP:
3669 requiresEmailVerification:
3872 requiresEmailVerification:
3896 allowAdditionalExtensions:
3964 $ref: '#/components/schemas/Actor'
3966 $ref: '#/components/schemas/Actor'
3969 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
4009 VideoUploadResponse:
4018 CommentThreadResponse:
4025 $ref: '#/components/schemas/VideoComment'
4026 CommentThreadPostResponse:
4029 $ref: '#/components/schemas/VideoComment'
4037 $ref: '#/components/schemas/Video'
4042 description: 'The user username'
4047 description: 'The user password. If the smtp server is configured, you can leave empty and an email will be sent'
4052 description: 'The user email. MUST be in the format of an email address.'
4055 description: 'The user video quota'
4058 description: 'The user daily video quota'
4060 $ref: '#/components/schemas/UserRole'
4072 description: 'The user id'
4075 description: 'The updated email of the user'
4078 description: 'The updated video quota of the user'
4081 description: 'The updated daily video quota of the user'
4083 $ref: '#/components/schemas/UserRole'
4094 description: 'Your new password'
4097 description: 'Your new email'
4100 description: 'Your new displayNSFW'
4103 description: 'Your new autoPlayVideo'
4113 description: 'Id of the video'
4116 description: 'Rating of the video'
4123 $ref: '#/components/schemas/Video'
4126 description: 'Rating of the video'
4134 description: 'The username of the user'
4137 description: 'The password of the user'
4140 description: 'The email of the user'
4143 description: 'The user display name'
4149 description: 'The name for the default channel'
4152 description: 'The display name for the default channel'
4168 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
4180 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
4181 bulkVideosSupportUpdate:
4183 description: 'Update the support field for all videos of this channel'
4188 name: 'media:peerLink'
4197 - application/x-bittorrent
4203 name: 'media:content'
4233 VideoCommentsForXML:
4266 description: video watch page URL
4269 description: video canonical URL
4273 description: video publication date
4276 description: video description
4279 description: video description
4282 description: publisher user name
4285 description: video category (MRSS)
4288 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
4302 description: video embed path, relative to the canonical URL domain (MRSS)
4310 description: video watch path, relative to the canonical URL domain (MRSS)
4330 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
4331 'media:description':
4338 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
4341 description: main streamable file for the video
4350 - application/x-bittorrent
4359 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)
4362 - $ref: '#/components/schemas/MRSSPeerLink'
4363 - $ref: '#/components/schemas/MRSSGroupContent'
4364 NotificationSettingValue:
4382 Notification type, following the `UserNotificationType` enum:
4383 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
4384 - `2` NEW_COMMENT_ON_MY_VIDEO
4385 - `3` NEW_VIDEO_ABUSE_FOR_MODERATORS
4386 - `4` BLACKLIST_ON_MY_VIDEO
4387 - `5` UNBLACKLIST_ON_MY_VIDEO
4388 - `6` MY_VIDEO_PUBLISHED
4389 - `7` MY_VIDEO_IMPORT_SUCCESS
4390 - `8` MY_VIDEO_IMPORT_ERROR
4391 - `9` NEW_USER_REGISTRATION
4393 - `11` COMMENT_MENTION
4394 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
4395 - `13` NEW_INSTANCE_FOLLOWER
4396 - `14` AUTO_INSTANCE_FOLLOWING
4402 - $ref: '#/components/schemas/VideoInfo'
4406 $ref: '#/components/schemas/ActorInfo'
4415 $ref: '#/components/schemas/VideoInfo'
4434 $ref: '#/components/schemas/VideoInfo'
4436 $ref: '#/components/schemas/ActorInfo'
4445 - $ref: '#/components/schemas/VideoInfo'
4454 - $ref: '#/components/schemas/VideoInfo'
4458 - $ref: '#/components/schemas/ActorInfo'
4466 $ref: '#/components/schemas/ActorInfo'
4493 NotificationListResponse:
4500 $ref: '#/components/schemas/Notification'