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
15 The PeerTube API is built on HTTP(S) and is RESTful. You can use your favorite
16 HTTP/REST library for your programming language to use PeerTube. The spec API is fully compatible with
17 [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO)
18 which generates a client SDK in the language of your choice - we generate some client SDKs automatically:
20 - [Python](https://framagit.org/framasoft/peertube/clients/python)
21 - [Go](https://framagit.org/framasoft/peertube/clients/go)
22 - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin)
24 See the [REST API quick start](https://docs.joinpeertube.org/api-rest-getting-started) for a few
25 examples of using with the PeerTube API.
29 When you sign up for an account on a PeerTube instance, you are given the possibility
30 to generate sessions on it, and authenticate there using a session token. Only __one
31 session token can currently be used at a time__.
35 Accounts are given permissions based on their role. There are three roles on
36 PeerTube: Administrator, Moderator, and User. See the [roles guide](https://docs.joinpeertube.org/admin-managing-users?id=roles) for a detail of their permissions.
40 The API uses standard HTTP status codes to indicate the success or failure
41 of the API call. The body of the response will be JSON in the following
46 "code": "unauthorized_request", // example inner error code
47 "error": "Token is invalid." // example exposed error message
53 We are rate-limiting all endpoints of PeerTube's API. Custom values can be configured
56 | Endpoint | Calls | Time frame |
57 |-------------------------|------------------|---------------------------|
58 | `/*` | 50 | 10 seconds |
59 | `POST /users/token` | 15 | 5 minutes |
60 | `POST /users/register` | 2¹ | 5 minutes |
61 | `POST /users/ask-send-verify-email` | 3 | 5 minutes |
63 Depending on the endpoint, ¹failed requests are not taken into account. A service
64 limit is announced by a `429 Too Many Requests` status code.
66 You can get details about the current state of your rate limit by reading the
69 | Header | Description |
70 |-------------------------|------------------------------------------------------------|
71 | X-RateLimit-Limit | Number of max requests allowed in the current time period |
72 | X-RateLimit-Remaining | Number of remaining requests in the current time period |
73 | X-RateLimit-Reset | Timestamp of end of current time period as UNIX timestamp |
74 | Retry-After | Seconds to delay after the first `429` is received |
76 url: https://docs.joinpeertube.org/api-rest-reference.html
80 Accounts encompass remote accounts discovered across the federation,
81 and correspond to the main Actor, along with video channels a user can create, which
84 When a comment is posted, it is done with your Account's Actor.
87 Using some features of PeerTube require authentication, for which User
88 provide different levels of permission as well as associated user
89 information. Each user has a corresponding local Account for federation.
92 Operations related to your own User, when logged-in.
93 - name: My Subscriptions
95 Operations related to your subscriptions to video channels, their
96 new videos, and how to keep up to date with their latest publications!
99 Operations related to your watch history.
100 - name: My Notifications
102 Notifications following new videos, follows or reports. They allow you
103 to keep track of the interactions and overall important information that
104 concerns you. You MAY set per-notification type delivery preference, to
105 receive the info either by mail, by in-browser notification or both.
108 Each server exposes public information regarding supported videos and
112 Jobs are long-running tasks enqueued and processed by the instance
113 itself. No additional worker registration is currently available.
114 - name: Instance Follows
116 Managing servers which the instance interacts with is crucial to the
117 concept of federation in PeerTube and external video indexation. The PeerTube
118 server then deals with inter-server ActivityPub operations and propagates
119 information across its social graph by posting activities to actors' inbox
122 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-follows
123 - name: Instance Redundancy
125 Redundancy is part of the inter-server solidarity that PeerTube fosters.
126 Manage the list of instances you wish to help by seeding their videos according
127 to the policy of video selection of your choice. Note that you have a similar functionality
128 to mirror individual videos, see [video mirroring](#tag/Video-Mirroring).
130 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-redundancy
133 Managing plugins installed from a local path or from NPM, or search for new ones.
135 url: https://docs.joinpeertube.org/api-plugins
138 Abuses deal with reports of local or remote videos/comments/accounts alike.
141 Operations dealing with listing, uploading, fetching or modifying videos.
144 Operations dealing with adding video or audio. PeerTube supports two upload modes, and three import modes.
148 - [_legacy_](#tag/Video-Upload/paths/~1videos~1upload/post), where the video file is sent in a single request
149 - [_resumable_](#tag/Video-Upload/paths/~1videos~1upload-resumable/post), where the video file is sent in chunks
151 You can upload videos more reliably by using the resumable variant. Its protocol lets
152 you resume an upload operation after a network interruption or other transmission failure,
153 saving time and bandwidth in the event of network failures.
155 Favor using resumable uploads in any of the following cases:
156 - You are transferring large files
157 - The likelihood of a network interruption is high
158 - Uploads are originating from a device with a low-bandwidth or unstable Internet connection,
159 such as a mobile device
163 - _URL_-based: where the URL points to any service supported by [youtube-dl](https://ytdl-org.github.io/youtube-dl/)
164 - _magnet_-based: where the URI resolves to a BitTorrent ressource containing a single supported video file
165 - _torrent_-based: where the metainfo file resolves to a BitTorrent ressource containing a single supported video file
167 The import function is practical when the desired video/audio is available online. It makes PeerTube
168 download it for you, saving you as much bandwidth and avoiding any instability or limitation your network might have.
169 - name: Video Captions
170 description: Operations dealing with listing, adding and removing closed captions of a video.
171 - name: Video Channels
172 description: Operations dealing with the creation, modification and listing of videos within a channel.
173 - name: Video Comments
175 Operations dealing with comments to a video. Comments are organized in threads: adding a
176 comment in response to the video starts a thread, adding a reply to a comment adds it to
177 its root comment thread.
179 description: Operations dealing with blocking videos (removing them from view and preventing interactions).
181 description: Like/dislike a video.
182 - name: Video Playlists
183 description: Operations dealing with playlists of videos. Playlists are bound to users and/or channels.
185 description: Server syndication feeds
188 The search helps to find _videos_ or _channels_ from within the instance and beyond.
189 Videos from other instances federated by the instance (that is, instances
190 followed by the instance) can be found via keywords and other criteria of
193 Administrators can also enable the use of a remote search system, indexing
194 videos and channels not could be not federated by the instance.
195 - name: Video Mirroring
197 PeerTube instances can mirror videos from one another, and help distribute some videos.
199 For importing videos as your own, refer to [video imports](#tag/Video-Upload/paths/~1videos~1imports/post).
218 - Video Ownership Change
231 - name: Instance Configuration
235 - Instance Redundancy
245 summary: Get an account
247 - $ref: '#/components/parameters/name'
250 description: successful operation
254 $ref: '#/components/schemas/Account'
256 description: account not found
257 '/accounts/{name}/videos':
262 summary: 'List videos of an account'
264 - $ref: '#/components/parameters/name'
265 - $ref: '#/components/parameters/categoryOneOf'
266 - $ref: '#/components/parameters/isLive'
267 - $ref: '#/components/parameters/tagsOneOf'
268 - $ref: '#/components/parameters/tagsAllOf'
269 - $ref: '#/components/parameters/licenceOneOf'
270 - $ref: '#/components/parameters/languageOneOf'
271 - $ref: '#/components/parameters/nsfw'
272 - $ref: '#/components/parameters/filter'
273 - $ref: '#/components/parameters/skipCount'
274 - $ref: '#/components/parameters/start'
275 - $ref: '#/components/parameters/count'
276 - $ref: '#/components/parameters/videosSort'
279 description: successful operation
283 $ref: '#/components/schemas/VideoListResponse'
287 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
288 .then(function(response) {
289 return response.json()
290 }).then(function(data) {
296 curl -s https://peertube2.cpy.re/api/v1/accounts/{name}/videos | jq
302 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
304 http = Net::HTTP.new(uri.host, uri.port)
307 response = http.get(uri.request_uri)
309 puts JSON.parse(response.read_body)
314 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
322 summary: List accounts
324 - $ref: '#/components/parameters/start'
325 - $ref: '#/components/parameters/count'
326 - $ref: '#/components/parameters/sort'
329 description: successful operation
335 $ref: '#/components/schemas/Account'
340 summary: Get instance public configuration
343 description: successful operation
347 $ref: '#/components/schemas/ServerConfig'
350 summary: Get instance "About" information
355 description: successful operation
359 $ref: '#/components/schemas/ServerConfigAbout'
362 summary: Get instance runtime configuration
370 description: successful operation
374 $ref: '#/components/schemas/ServerConfigCustom'
376 summary: Set instance runtime configuration
384 description: successful operation
386 x-summary: field inconsistencies
389 - the emailer is disabled and the instance is open to registrations
390 - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
392 summary: Delete instance runtime configuration
400 description: successful operation
403 summary: List instance jobs
413 description: The state of the job ('' for for no filter)
423 - $ref: '#/components/parameters/jobType'
424 - $ref: '#/components/parameters/start'
425 - $ref: '#/components/parameters/count'
426 - $ref: '#/components/parameters/sort'
429 description: successful operation
442 $ref: '#/components/schemas/Job'
443 '/server/following/{host}':
450 summary: Unfollow a server
455 description: 'The host to unfollow '
461 description: successful operation
466 summary: List instance followers
468 - $ref: '#/components/parameters/start'
469 - $ref: '#/components/parameters/count'
470 - $ref: '#/components/parameters/sort'
473 description: successful operation
479 $ref: '#/components/schemas/Follow'
484 summary: List instances followed by the server
503 - $ref: '#/components/parameters/start'
504 - $ref: '#/components/parameters/count'
505 - $ref: '#/components/parameters/sort'
508 description: successful operation
514 $ref: '#/components/schemas/Follow'
521 summary: Follow a server
524 description: successful operation
526 description: cannot follow a non-HTTPS server
541 summary: Create a user
549 description: user created
553 $ref: '#/components/schemas/AddUserResponse'
557 operationId: getUserId
559 id: '$response.body#/user/id'
562 operationId: putUserId
564 id: '$response.body#/user/id'
567 operationId: delUserId
569 id: '$response.body#/user/id'
571 description: insufficient authority to create an admin or moderator
576 $ref: '#/components/schemas/AddUser'
577 description: User to create
587 - $ref: '#/components/parameters/usersSearch'
588 - $ref: '#/components/parameters/usersBlocked'
589 - $ref: '#/components/parameters/start'
590 - $ref: '#/components/parameters/count'
591 - $ref: '#/components/parameters/usersSort'
594 description: successful operation
600 $ref: '#/components/schemas/User'
603 - $ref: '#/components/parameters/id'
605 summary: Delete a user
611 operationId: delUserId
614 description: successful operation
621 operationId: getUserId
624 description: successful operation
628 $ref: '#/components/schemas/User'
630 summary: Update a user
635 operationId: putUserId
638 description: successful operation
643 $ref: '#/components/schemas/UpdateUser'
647 summary: Register a user
652 description: successful operation
657 $ref: '#/components/schemas/RegisterUser'
661 summary: Get my user information
669 description: successful operation
675 $ref: '#/components/schemas/User'
677 summary: Update my user information
685 description: successful operation
690 $ref: '#/components/schemas/UpdateMe'
692 /users/me/videos/imports:
694 summary: Get video imports of my user
702 - $ref: '#/components/parameters/start'
703 - $ref: '#/components/parameters/count'
704 - $ref: '#/components/parameters/sort'
707 description: successful operation
711 $ref: '#/components/schemas/VideoImport'
712 /users/me/video-quota-used:
714 summary: Get my user used quota
722 description: successful operation
727 '/users/me/videos/{videoId}/rating':
729 summary: Get rate of my user for a video
739 description: 'The video id '
744 description: successful operation
748 $ref: '#/components/schemas/GetMeVideoRating'
751 summary: Get videos of my user
759 - $ref: '#/components/parameters/start'
760 - $ref: '#/components/parameters/count'
761 - $ref: '#/components/parameters/sort'
764 description: successful operation
768 $ref: '#/components/schemas/VideoListResponse'
769 /users/me/subscriptions:
771 summary: Get my user subscriptions
778 - $ref: '#/components/parameters/start'
779 - $ref: '#/components/parameters/count'
780 - $ref: '#/components/parameters/sort'
783 description: successful operation
787 summary: Add subscription to my user
800 description: uri of the video channels to subscribe to
806 uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr
809 description: successful operation
810 /users/me/subscriptions/exist:
812 summary: Get if subscriptions exist for my user
819 - $ref: '#/components/parameters/subscriptionsUris'
822 description: successful operation
827 /users/me/subscriptions/videos:
829 summary: List videos of subscriptions of my user
837 - $ref: '#/components/parameters/categoryOneOf'
838 - $ref: '#/components/parameters/isLive'
839 - $ref: '#/components/parameters/tagsOneOf'
840 - $ref: '#/components/parameters/tagsAllOf'
841 - $ref: '#/components/parameters/licenceOneOf'
842 - $ref: '#/components/parameters/languageOneOf'
843 - $ref: '#/components/parameters/nsfw'
844 - $ref: '#/components/parameters/filter'
845 - $ref: '#/components/parameters/skipCount'
846 - $ref: '#/components/parameters/start'
847 - $ref: '#/components/parameters/count'
848 - $ref: '#/components/parameters/videosSort'
851 description: successful operation
855 $ref: '#/components/schemas/VideoListResponse'
856 '/users/me/subscriptions/{subscriptionHandle}':
858 summary: Get subscription of my user
865 - $ref: '#/components/parameters/subscriptionHandle'
868 description: successful operation
872 $ref: '#/components/schemas/VideoChannel'
874 summary: Delete subscription of my user
881 - $ref: '#/components/parameters/subscriptionHandle'
884 description: successful operation
885 /users/me/notifications:
887 summary: List my notifications
895 description: only list unread notifications
898 - $ref: '#/components/parameters/start'
899 - $ref: '#/components/parameters/count'
900 - $ref: '#/components/parameters/sort'
903 description: successful operation
907 $ref: '#/components/schemas/NotificationListResponse'
908 /users/me/notifications/read:
910 summary: Mark notifications as read by their id
923 description: ids of the notifications to mark as read
930 description: successful operation
931 /users/me/notifications/read-all:
933 summary: Mark all my notification as read
940 description: successful operation
941 /users/me/notification-settings:
943 summary: Update my notification settings
954 newVideoFromSubscription:
955 $ref: '#/components/schemas/NotificationSettingValue'
957 $ref: '#/components/schemas/NotificationSettingValue'
959 $ref: '#/components/schemas/NotificationSettingValue'
960 videoAutoBlacklistAsModerator:
961 $ref: '#/components/schemas/NotificationSettingValue'
963 $ref: '#/components/schemas/NotificationSettingValue'
965 $ref: '#/components/schemas/NotificationSettingValue'
966 myVideoImportFinished:
967 $ref: '#/components/schemas/NotificationSettingValue'
969 $ref: '#/components/schemas/NotificationSettingValue'
971 $ref: '#/components/schemas/NotificationSettingValue'
973 $ref: '#/components/schemas/NotificationSettingValue'
975 $ref: '#/components/schemas/NotificationSettingValue'
976 autoInstanceFollowing:
977 $ref: '#/components/schemas/NotificationSettingValue'
980 description: successful operation
981 /users/me/history/videos:
983 summary: List watched videos history
989 - $ref: '#/components/parameters/start'
990 - $ref: '#/components/parameters/count'
991 - $ref: '#/components/parameters/search'
994 description: successful operation
998 $ref: '#/components/schemas/VideoListResponse'
999 /users/me/history/videos/remove:
1001 summary: Clear video history
1008 multipart/form-data:
1013 description: history before this date will be deleted
1018 description: successful operation
1019 /users/me/avatar/pick:
1021 summary: Update my user avatar
1028 description: successful operation
1035 $ref: '#/components/schemas/ActorImage'
1037 description: image file too large
1039 X-File-Maximum-Size:
1043 description: Maximum file size for the avatar
1046 multipart/form-data:
1051 description: The file to upload.
1056 contentType: image/png, image/jpeg
1059 summary: Delete my avatar
1066 description: successful operation
1070 summary: List video ownership changes
1072 - Video Ownership Change
1077 description: successful operation
1078 '/videos/ownership/{id}/accept':
1080 summary: Accept ownership change request
1082 - Video Ownership Change
1086 - $ref: '#/components/parameters/idOrUUID'
1089 description: successful operation
1091 description: cannot terminate an ownership change of another user
1093 description: video owneship change not found
1094 '/videos/ownership/{id}/refuse':
1096 summary: Refuse ownership change request
1098 - Video Ownership Change
1102 - $ref: '#/components/parameters/idOrUUID'
1105 description: successful operation
1107 description: cannot terminate an ownership change of another user
1109 description: video owneship change not found
1110 '/videos/{id}/give-ownership':
1112 summary: Request ownership change
1114 - Video Ownership Change
1118 - $ref: '#/components/parameters/idOrUUID'
1122 application/x-www-form-urlencoded:
1132 description: successful operation
1134 description: changing video ownership to a remote account is not supported yet
1136 description: video not found
1139 summary: List videos
1143 - $ref: '#/components/parameters/categoryOneOf'
1144 - $ref: '#/components/parameters/isLive'
1145 - $ref: '#/components/parameters/tagsOneOf'
1146 - $ref: '#/components/parameters/tagsAllOf'
1147 - $ref: '#/components/parameters/licenceOneOf'
1148 - $ref: '#/components/parameters/languageOneOf'
1149 - $ref: '#/components/parameters/nsfw'
1150 - $ref: '#/components/parameters/filter'
1151 - $ref: '#/components/parameters/skipCount'
1152 - $ref: '#/components/parameters/start'
1153 - $ref: '#/components/parameters/count'
1154 - $ref: '#/components/parameters/videosSort'
1157 description: successful operation
1161 $ref: '#/components/schemas/VideoListResponse'
1164 summary: List available video categories
1169 description: successful operation
1178 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
1181 summary: List available video licences
1186 description: successful operation
1195 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
1198 summary: List available video languages
1203 description: successful operation
1212 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
1215 summary: List available video privacies
1220 description: successful operation
1229 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
1232 summary: Update a video
1238 - $ref: '#/components/parameters/idOrUUID'
1241 description: successful operation
1244 multipart/form-data:
1249 description: Video thumbnail file
1253 description: Video preview file
1257 description: Video category
1261 description: Video licence
1265 description: Video language
1268 $ref: '#/components/schemas/VideoPrivacySet'
1270 description: Video description
1273 description: Whether or not we wait transcoding before publish the video
1276 description: A text tell the audience how to support the video creator
1277 example: Please support my work on <insert crowdfunding plateform>! <3
1280 description: Whether or not this video contains sensitive content
1283 description: Video name
1288 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1297 description: Enable or disable comments for this video
1299 originallyPublishedAt:
1300 description: Date when the content was originally published
1304 $ref: '#/components/schemas/VideoScheduledUpdate'
1307 contentType: image/jpeg
1309 contentType: image/jpeg
1311 summary: Get a video
1315 - $ref: '#/components/parameters/idOrUUID'
1318 description: successful operation
1322 $ref: '#/components/schemas/VideoDetails'
1324 summary: Delete a video
1330 - $ref: '#/components/parameters/idOrUUID'
1333 description: successful operation
1334 '/videos/{id}/description':
1336 summary: Get complete video description
1340 - $ref: '#/components/parameters/idOrUUID'
1343 description: successful operation
1348 '/videos/{id}/views':
1350 summary: Add a view to a video
1354 - $ref: '#/components/parameters/idOrUUID'
1357 description: successful operation
1358 '/videos/{id}/watching':
1360 summary: Set watching progress of a video
1366 - $ref: '#/components/parameters/idOrUUID'
1371 $ref: '#/components/schemas/UserWatchingVideo'
1375 description: successful operation
1378 summary: Upload a video
1379 description: Uses a single request to upload a video.
1387 description: successful operation
1391 $ref: '#/components/schemas/VideoUploadResponse'
1393 description: invalid file field, schedule date or parameter
1395 description: video didn't pass upload filter
1397 description: upload has timed out
1399 description: video file too large, due to quota or max body size limit set by the reverse-proxy
1401 X-File-Maximum-Size:
1405 description: Maximum file size for the video
1407 description: video type unsupported
1409 description: video unreadable
1412 multipart/form-data:
1414 $ref: '#/components/schemas/VideoUploadRequestLegacy'
1417 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1419 contentType: image/jpeg
1421 contentType: image/jpeg
1426 USERNAME="<your_username>"
1427 PASSWORD="<your_password>"
1428 FILE_PATH="<your_file_path>"
1429 CHANNEL_ID="<your_channel_id>"
1432 API_PATH="https://peertube2.cpy.re/api/v1"
1434 client_id=$(curl -s "$API_PATH/oauth-clients/local" | jq -r ".client_id")
1435 client_secret=$(curl -s "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
1436 token=$(curl -s "$API_PATH/users/token" \
1437 --data client_id="$client_id" \
1438 --data client_secret="$client_secret" \
1439 --data grant_type=password \
1440 --data response_type=code \
1441 --data username="$USERNAME" \
1442 --data password="$PASSWORD" \
1443 | jq -r ".access_token")
1445 curl -s "$API_PATH/videos/upload" \
1446 -H "Authorization: Bearer $token" \
1448 --form videofile=@"$FILE_PATH" \
1449 --form channelId=$CHANNEL_ID \
1451 /videos/upload-resumable:
1453 summary: Initialize the resumable upload of a video
1454 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video
1461 - name: X-Upload-Content-Length
1467 description: Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading.
1468 - name: X-Upload-Content-Type
1475 description: MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.
1480 $ref: '#/components/schemas/VideoUploadRequestResumable'
1483 description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead
1485 description: created
1491 example: /api/v1/videos/upload-resumable?upload_id=471e97554f21dec3b8bb5d4602939c51
1497 description: invalid file field, schedule date or parameter
1499 description: video file too large, due to quota, absolute max file size or concurrent partial upload limit
1501 description: video type unsupported
1503 summary: Send chunk for the resumable upload of a video
1504 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the upload of a video
1515 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
1516 not valid anymore and you need to initialize a new upload.
1519 - name: Content-Range
1523 example: bytes 0-262143/2469036
1526 Specifies the bytes in the file that the request is uploading.
1528 For example, a value of `bytes 0-262143/1000000` shows that the request is sending the first
1529 262144 bytes (256 x 1024) in a 2,469,036 byte file.
1530 - name: Content-Length
1537 Size of the chunk that the request is sending.
1539 The chunk size __must be a multiple of 256 KB__, and unlike [Google Resumable](https://developers.google.com/youtube/v3/guides/using_resumable_upload_protocol)
1540 doesn't mandate for chunks to have the same size throughout the upload sequence.
1542 Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from
1543 1048576 bytes (~1MB) and increases or reduces size depending on connection health.
1546 application/octet-stream:
1552 description: last chunk received
1560 $ref: '#/components/schemas/VideoUploadResponse'
1562 description: resume incomplete
1567 example: bytes=0-262143
1573 description: video didn't pass upload filter
1575 description: video file too large, due to quota or max body size limit set by the reverse-proxy
1577 description: video unreadable
1579 summary: Cancel the resumable upload of a video, deleting any data uploaded so far
1580 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video
1591 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
1592 not valid anymore and the upload session has already been deleted with its data ;-)
1595 - name: Content-Length
1603 description: upload cancelled
1611 summary: Import a video
1612 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
1620 multipart/form-data:
1625 description: Torrent File
1629 description: HTTP target URL
1632 description: Magnet URI
1635 description: Channel id that will contain this video
1638 description: Video thumbnail file
1642 description: Video preview file
1646 $ref: '#/components/schemas/VideoPrivacySet'
1648 description: Video category
1652 description: Video licence
1656 description: Video language
1659 description: Video description
1662 description: Whether or not we wait transcoding before publish the video
1665 description: A text tell the audience how to support the video creator
1666 example: Please support my work on <insert crowdfunding plateform>! <3
1669 description: Whether or not this video contains sensitive content
1672 description: Video name
1677 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1686 description: Enable or disable comments for this video
1689 description: Enable or disable downloading for this video
1692 $ref: '#/components/schemas/VideoScheduledUpdate'
1698 contentType: application/x-bittorrent
1700 contentType: image/jpeg
1702 contentType: image/jpeg
1705 description: successful operation
1709 $ref: '#/components/schemas/VideoUploadResponse'
1711 description: '`magnetUri` or `targetUrl` or a torrent file missing'
1713 description: video didn't pass pre-import filter
1715 description: HTTP or Torrent/magnetURI import not enabled
1719 summary: Create a live
1727 description: successful operation
1731 $ref: '#/components/schemas/VideoUploadResponse'
1733 description: Live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
1736 multipart/form-data:
1741 description: Channel id that will contain this live video
1746 description: User can stream multiple times in a permanent live
1749 description: Live video/replay thumbnail file
1753 description: Live video/replay preview file
1757 $ref: '#/components/schemas/VideoPrivacySet'
1759 description: Live video/replay category
1762 description: Live video/replay licence
1765 description: Live video/replay language
1768 description: Live video/replay description
1771 description: A text tell the audience how to support the creator
1772 example: Please support my work on <insert crowdfunding plateform>! <3
1775 description: Whether or not this live video/replay contains sensitive content
1778 description: Live video/replay name
1783 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
1792 description: Enable or disable comments for this live video/replay
1795 description: Enable or disable downloading for the replay of this live
1802 contentType: image/jpeg
1804 contentType: image/jpeg
1808 summary: Get information about a live
1815 - $ref: '#/components/parameters/idOrUUID'
1818 description: successful operation
1822 $ref: '#/components/schemas/LiveVideoResponse'
1824 summary: Update information about a live
1831 - $ref: '#/components/parameters/idOrUUID'
1836 $ref: '#/components/schemas/LiveVideoUpdate'
1839 description: Successful operation
1841 description: Bad parameters or trying to update a live that has already started
1843 description: Trying to save replay of the live but saving replay is not enabled on the instance
1847 summary: List my abuses
1856 description: only list the report with this id
1862 $ref: '#/components/schemas/AbuseStateSet'
1863 - $ref: '#/components/parameters/start'
1864 - $ref: '#/components/parameters/count'
1865 - $ref: '#/components/parameters/abusesSort'
1868 description: successful operation
1874 $ref: '#/components/schemas/Abuse'
1878 summary: List abuses
1888 description: only list the report with this id
1891 - name: predefinedReason
1893 description: predefined reason the listed reports should contain
1895 $ref: '#/components/schemas/PredefinedAbuseReasons'
1898 description: plain search that will match with video titles, reporter names and more
1904 $ref: '#/components/schemas/AbuseStateSet'
1905 - name: searchReporter
1907 description: only list reports of a specific reporter
1910 - name: searchReportee
1911 description: only list reports of a specific reportee
1917 description: only list reports of a specific video
1920 - name: searchVideoChannel
1922 description: only list reports of a specific video channel
1927 description: only list blacklisted or deleted videos
1935 description: only list account, comment or video reports
1942 - $ref: '#/components/parameters/start'
1943 - $ref: '#/components/parameters/count'
1944 - $ref: '#/components/parameters/abusesSort'
1947 description: successful operation
1953 $ref: '#/components/schemas/Abuse'
1956 summary: Report an abuse
1969 description: Reason why the user reports this video
1974 $ref: '#/components/schemas/PredefinedAbuseReasons'
1979 description: Video id to report
1983 description: Timestamp in the video that marks the beginning of the report
1987 description: Timestamp in the video that marks the ending of the report
1993 description: Comment id to report
1999 description: Account id to report
2005 description: successful operation
2007 description: incorrect request parameters
2008 '/abuses/{abuseId}':
2010 summary: Update an abuse
2018 - $ref: '#/components/parameters/abuseId'
2026 $ref: '#/components/schemas/AbuseStateSet'
2029 description: Update the report comment visible only to the moderation team
2034 description: successful operation
2036 description: abuse not found
2040 summary: Delete an abuse
2046 - $ref: '#/components/parameters/abuseId'
2049 description: successful operation
2051 description: block not found
2052 '/abuses/{abuseId}/messages':
2054 summary: List messages of an abuse
2060 - $ref: '#/components/parameters/abuseId'
2063 description: successful operation
2069 $ref: '#/components/schemas/AbuseMessage'
2072 summary: Add message to an abuse
2078 - $ref: '#/components/parameters/abuseId'
2087 description: Message to send
2095 description: successful operation
2097 description: incorrect request parameters
2098 '/abuses/{abuseId}/messages/{abuseMessageId}':
2100 summary: Delete an abuse message
2106 - $ref: '#/components/parameters/abuseId'
2107 - $ref: '#/components/parameters/abuseMessageId'
2110 description: successful operation
2112 '/videos/{id}/blacklist':
2114 summary: Block a video
2122 - $ref: '#/components/parameters/idOrUUID'
2125 description: successful operation
2127 summary: Unblock a video by its id
2135 - $ref: '#/components/parameters/idOrUUID'
2138 description: successful operation
2140 description: block not found
2145 summary: List video blocks
2154 list only blocks that match this type:
2158 - `2`: automatic block that needs review
2166 description: plain search that will match with video titles, and more
2169 - $ref: '#/components/parameters/start'
2170 - $ref: '#/components/parameters/count'
2171 - $ref: '#/components/parameters/blacklistsSort'
2174 description: successful operation
2186 $ref: '#/components/schemas/VideoBlacklist'
2187 /videos/{id}/captions:
2189 summary: List captions of a video
2193 - $ref: '#/components/parameters/idOrUUID'
2196 description: successful operation
2208 $ref: '#/components/schemas/VideoCaption'
2209 /videos/{id}/captions/{captionLanguage}:
2211 summary: Add or replace a video caption
2218 - $ref: '#/components/parameters/idOrUUID'
2219 - $ref: '#/components/parameters/captionLanguage'
2222 multipart/form-data:
2227 description: The file to upload.
2232 contentType: text/vtt, application/x-subrip, text/plain
2235 description: successful operation
2237 description: video or language not found
2239 summary: Delete a video caption
2246 - $ref: '#/components/parameters/idOrUUID'
2247 - $ref: '#/components/parameters/captionLanguage'
2250 description: successful operation
2252 description: video or language or caption for that language not found
2255 summary: List video channels
2259 - $ref: '#/components/parameters/start'
2260 - $ref: '#/components/parameters/count'
2261 - $ref: '#/components/parameters/sort'
2264 description: successful operation
2276 $ref: '#/components/schemas/VideoChannel'
2278 summary: Create a video channel
2285 description: successful operation
2290 $ref: '#/components/schemas/VideoChannelCreate'
2291 '/video-channels/{channelHandle}':
2293 summary: Get a video channel
2297 - $ref: '#/components/parameters/channelHandle'
2300 description: successful operation
2304 $ref: '#/components/schemas/VideoChannel'
2306 summary: Update a video channel
2312 - $ref: '#/components/parameters/channelHandle'
2315 description: successful operation
2320 $ref: '#/components/schemas/VideoChannelUpdate'
2322 summary: Delete a video channel
2328 - $ref: '#/components/parameters/channelHandle'
2331 description: successful operation
2332 '/video-channels/{channelHandle}/videos':
2334 summary: List videos of a video channel
2339 - $ref: '#/components/parameters/channelHandle'
2340 - $ref: '#/components/parameters/categoryOneOf'
2341 - $ref: '#/components/parameters/isLive'
2342 - $ref: '#/components/parameters/tagsOneOf'
2343 - $ref: '#/components/parameters/tagsAllOf'
2344 - $ref: '#/components/parameters/licenceOneOf'
2345 - $ref: '#/components/parameters/languageOneOf'
2346 - $ref: '#/components/parameters/nsfw'
2347 - $ref: '#/components/parameters/filter'
2348 - $ref: '#/components/parameters/skipCount'
2349 - $ref: '#/components/parameters/start'
2350 - $ref: '#/components/parameters/count'
2351 - $ref: '#/components/parameters/videosSort'
2354 description: successful operation
2358 $ref: '#/components/schemas/VideoListResponse'
2359 '/video-channels/{channelHandle}/avatar/pick':
2361 summary: Update channel avatar
2367 - $ref: '#/components/parameters/channelHandle'
2370 description: successful operation
2377 $ref: '#/components/schemas/ActorImage'
2379 description: image file too large
2381 X-File-Maximum-Size:
2385 description: Maximum file size for the avatar
2388 multipart/form-data:
2393 description: The file to upload.
2398 contentType: image/png, image/jpeg
2399 '/video-channels/{channelHandle}/avatar':
2401 summary: Delete channel avatar
2407 - $ref: '#/components/parameters/channelHandle'
2410 description: successful operation
2413 '/video-channels/{channelHandle}/banner/pick':
2415 summary: Update channel banner
2421 - $ref: '#/components/parameters/channelHandle'
2424 description: successful operation
2431 $ref: '#/components/schemas/ActorImage'
2433 description: image file too large
2435 X-File-Maximum-Size:
2439 description: Maximum file size for the banner
2442 multipart/form-data:
2447 description: The file to upload.
2452 contentType: image/png, image/jpeg
2453 '/video-channels/{channelHandle}/banner':
2455 summary: Delete channel banner
2461 - $ref: '#/components/parameters/channelHandle'
2464 description: successful operation
2466 /video-playlists/privacies:
2468 summary: List available playlist privacies
2473 description: successful operation
2482 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
2486 summary: List video playlists
2490 - $ref: '#/components/parameters/start'
2491 - $ref: '#/components/parameters/count'
2492 - $ref: '#/components/parameters/sort'
2495 description: successful operation
2507 $ref: '#/components/schemas/VideoPlaylist'
2509 summary: Create a video playlist
2510 description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
2517 description: successful operation
2529 $ref: '#/components/schemas/UUIDv4'
2532 multipart/form-data:
2537 description: Video playlist display name
2542 description: Video playlist thumbnail file
2546 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2548 description: Video playlist description
2551 description: Video channel in which the playlist will be published
2557 contentType: image/jpeg
2559 /video-playlists/{id}:
2561 summary: Get a video playlist
2565 - $ref: '#/components/parameters/idOrUUID'
2568 description: successful operation
2572 $ref: '#/components/schemas/VideoPlaylist'
2574 summary: Update a video playlist
2575 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
2582 description: successful operation
2584 - $ref: '#/components/parameters/idOrUUID'
2587 multipart/form-data:
2592 description: Video playlist display name
2597 description: Video playlist thumbnail file
2601 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2603 description: Video playlist description
2606 description: Video channel in which the playlist will be published
2610 contentType: image/jpeg
2612 summary: Delete a video playlist
2618 - $ref: '#/components/parameters/idOrUUID'
2621 description: successful operation
2623 /video-playlists/{id}/videos:
2625 summary: 'List videos of a playlist'
2630 - $ref: '#/components/parameters/idOrUUID'
2633 description: successful operation
2637 $ref: '#/components/schemas/VideoListResponse'
2639 summary: 'Add a video in a playlist'
2646 - $ref: '#/components/parameters/idOrUUID'
2649 description: successful operation
2655 videoPlaylistElement:
2668 description: 'Video to add in the playlist'
2671 description: 'Start the video at this specific timestamp (in seconds)'
2674 description: 'Stop the video at this specific timestamp (in seconds)'
2678 /video-playlists/{id}/videos/reorder:
2680 summary: 'Reorder a playlist'
2686 - $ref: '#/components/parameters/idOrUUID'
2689 description: successful operation
2698 description: 'Start position of the element to reorder'
2700 insertAfterPosition:
2702 description: 'New position for the block to reorder, to add the block before the first element'
2706 description: 'How many element from `startPosition` to reorder'
2710 - insertAfterPosition
2712 /video-playlists/{id}/videos/{playlistElementId}:
2714 summary: 'Update a playlist element'
2720 - $ref: '#/components/parameters/idOrUUID'
2721 - $ref: '#/components/parameters/playlistElementId'
2724 description: successful operation
2733 description: 'Start the video at this specific timestamp (in seconds)'
2736 description: 'Stop the video at this specific timestamp (in seconds)'
2738 summary: 'Delete an element from a playlist'
2744 - $ref: '#/components/parameters/idOrUUID'
2745 - $ref: '#/components/parameters/playlistElementId'
2748 description: successful operation
2750 '/users/me/video-playlists/videos-exist':
2752 summary: 'Check video exists in my playlists'
2761 description: The video ids to check
2768 description: successful operation
2788 '/accounts/{name}/video-channels':
2790 summary: List video channels of an account
2795 - $ref: '#/components/parameters/name'
2798 description: include view statistics for the last 30 days (only if authentified as the account user)
2801 - $ref: '#/components/parameters/start'
2802 - $ref: '#/components/parameters/count'
2803 - $ref: '#/components/parameters/sort'
2806 description: successful operation
2817 $ref: '#/components/schemas/VideoChannel'
2818 '/accounts/{name}/ratings':
2820 summary: List ratings of an account
2826 - $ref: '#/components/parameters/name'
2827 - $ref: '#/components/parameters/start'
2828 - $ref: '#/components/parameters/count'
2829 - $ref: '#/components/parameters/sort'
2833 description: Optionally filter which ratings to retrieve
2841 description: successful operation
2847 $ref: '#/components/schemas/VideoRating'
2848 '/videos/{id}/comment-threads':
2850 summary: List threads of a video
2854 - $ref: '#/components/parameters/idOrUUID'
2855 - $ref: '#/components/parameters/start'
2856 - $ref: '#/components/parameters/count'
2857 - $ref: '#/components/parameters/commentsSort'
2860 description: successful operation
2864 $ref: '#/components/schemas/CommentThreadResponse'
2866 summary: Create a thread
2872 - $ref: '#/components/parameters/idOrUUID'
2875 description: successful operation
2879 $ref: '#/components/schemas/CommentThreadPostResponse'
2881 description: video does not exist
2890 description: 'Text comment'
2894 '/videos/{id}/comment-threads/{threadId}':
2896 summary: Get a thread
2900 - $ref: '#/components/parameters/idOrUUID'
2901 - $ref: '#/components/parameters/threadId'
2904 description: successful operation
2908 $ref: '#/components/schemas/VideoCommentThreadTree'
2909 '/videos/{id}/comments/{commentId}':
2911 summary: Reply to a thread of a video
2917 - $ref: '#/components/parameters/idOrUUID'
2918 - $ref: '#/components/parameters/commentId'
2921 description: successful operation
2925 $ref: '#/components/schemas/CommentThreadPostResponse'
2927 description: thread or video does not exist
2936 description: 'Text comment'
2941 summary: Delete a comment or a reply
2947 - $ref: '#/components/parameters/idOrUUID'
2948 - $ref: '#/components/parameters/commentId'
2951 description: successful operation
2953 description: cannot remove comment of another user
2955 description: comment or video does not exist
2957 description: comment is already deleted
2958 '/videos/{id}/rate':
2960 summary: Like/dislike a video
2966 - $ref: '#/components/parameters/idOrUUID'
2969 description: successful operation
2971 description: video does not exist
2976 summary: Search videos
2981 allowEmptyValue: false
2983 String to search. If the user can make a remote URI search, and the string is an URI then the
2984 PeerTube instance will fetch the remote object and add it to its database. Then,
2985 you can use the REST API to fetch the complete video information and interact with it.
2988 - $ref: '#/components/parameters/categoryOneOf'
2989 - $ref: '#/components/parameters/isLive'
2990 - $ref: '#/components/parameters/tagsOneOf'
2991 - $ref: '#/components/parameters/tagsAllOf'
2992 - $ref: '#/components/parameters/licenceOneOf'
2993 - $ref: '#/components/parameters/languageOneOf'
2994 - $ref: '#/components/parameters/nsfw'
2995 - $ref: '#/components/parameters/filter'
2996 - $ref: '#/components/parameters/skipCount'
2997 - $ref: '#/components/parameters/start'
2998 - $ref: '#/components/parameters/count'
2999 - $ref: '#/components/parameters/searchTarget'
3000 - $ref: '#/components/parameters/videosSearchSort'
3003 description: Get videos that are published after this date
3009 description: Get videos that are published before this date
3013 - name: originallyPublishedStartDate
3015 description: Get videos that are originally published after this date
3019 - name: originallyPublishedEndDate
3021 description: Get videos that are originally published before this date
3027 description: Get videos that have this minimum duration
3032 description: Get videos that have this maximum duration
3036 'searchTarget === search-index':
3037 $ref: '#/components/callbacks/searchIndex'
3040 description: successful operation
3044 $ref: '#/components/schemas/VideoListResponse'
3046 description: search index unavailable
3047 /search/video-channels:
3051 summary: Search channels
3057 String to search. If the user can make a remote URI search, and the string is an URI then the
3058 PeerTube instance will fetch the remote object and add it to its database. Then,
3059 you can use the REST API to fetch the complete channel information and interact with it.
3062 - $ref: '#/components/parameters/start'
3063 - $ref: '#/components/parameters/count'
3064 - $ref: '#/components/parameters/searchTarget'
3065 - $ref: '#/components/parameters/sort'
3067 'searchTarget === search-index':
3068 $ref: '#/components/callbacks/searchIndex'
3071 description: successful operation
3077 $ref: '#/components/schemas/VideoChannel'
3079 description: search index unavailable
3080 /blocklist/accounts:
3084 summary: List account blocks
3089 - $ref: '#/components/parameters/start'
3090 - $ref: '#/components/parameters/count'
3091 - $ref: '#/components/parameters/sort'
3094 description: successful operation
3098 summary: Block an account
3110 example: chocobozzz@example.org
3111 description: account to block, in the form `username@domain`
3116 description: successful operation
3118 description: self-blocking forbidden
3119 '/blocklist/accounts/{accountName}':
3123 summary: Unblock an account by its handle
3131 description: account to unblock, in the form `username@domain`
3136 description: successful operation
3138 description: account or account block does not exist
3143 summary: List server blocks
3148 - $ref: '#/components/parameters/start'
3149 - $ref: '#/components/parameters/count'
3150 - $ref: '#/components/parameters/sort'
3153 description: successful operation
3157 summary: Block a server
3170 description: server domain to block
3175 description: successful operation
3177 description: self-blocking forbidden
3178 '/blocklist/servers/{host}':
3182 summary: Unblock a server by its domain
3190 description: server domain to unblock
3196 description: successful operation
3198 description: account block does not exist
3202 - Instance Redundancy
3203 summary: Update a server redundancy policy
3211 description: server domain to mirror
3223 description: allow mirroring of the host's local videos
3228 description: successful operation
3230 description: server is not already known
3235 summary: List videos being mirrored
3243 description: direction of the mirror
3249 - $ref: '#/components/parameters/start'
3250 - $ref: '#/components/parameters/count'
3251 - $ref: '#/components/parameters/videoRedundanciesSort'
3254 description: successful operation
3260 $ref: '#/components/schemas/VideoRedundancy'
3264 summary: Mirror a video
3280 description: successful operation
3282 description: cannot mirror a local video
3284 description: video does not exist
3286 description: video is already mirrored
3287 /redundancy/videos/{redundancyId}:
3291 summary: Delete a mirror done on a video
3296 - name: redundancyId
3299 description: id of an existing redundancy on a video
3304 description: successful operation
3306 description: video redundancy not found
3307 '/feeds/video-comments.{format}':
3311 summary: List comments on videos
3316 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3329 description: 'limit listing to a specific video'
3334 description: 'limit listing to a specific account'
3339 description: 'limit listing to a specific account'
3342 - name: videoChannelId
3344 description: 'limit listing to a specific video channel'
3347 - name: videoChannelName
3349 description: 'limit listing to a specific video channel'
3354 description: successful operation
3359 default: 'max-age=900' # 15 min cache
3363 $ref: '#/components/schemas/VideoCommentsForXML'
3366 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3367 application/rss+xml:
3369 $ref: '#/components/schemas/VideoCommentsForXML'
3372 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
3375 $ref: '#/components/schemas/VideoCommentsForXML'
3378 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3379 application/atom+xml:
3381 $ref: '#/components/schemas/VideoCommentsForXML'
3384 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
3390 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
3392 x-summary: field inconsistencies
3395 - videoId filter is mixed with a channel filter
3397 description: video, video channel or account not found
3399 description: accept header unsupported
3400 '/feeds/videos.{format}':
3404 summary: List videos
3409 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3422 description: 'limit listing to a specific account'
3427 description: 'limit listing to a specific account'
3430 - name: videoChannelId
3432 description: 'limit listing to a specific video channel'
3435 - name: videoChannelName
3437 description: 'limit listing to a specific video channel'
3440 - $ref: '#/components/parameters/sort'
3441 - $ref: '#/components/parameters/nsfw'
3442 - $ref: '#/components/parameters/filter'
3445 description: successful operation
3450 default: 'max-age=900' # 15 min cache
3454 $ref: '#/components/schemas/VideosForXML'
3457 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
3458 application/rss+xml:
3460 $ref: '#/components/schemas/VideosForXML'
3463 externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
3466 $ref: '#/components/schemas/VideosForXML'
3469 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
3470 application/atom+xml:
3472 $ref: '#/components/schemas/VideosForXML'
3475 externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
3481 externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
3483 description: video channel or account not found
3485 description: accept header unsupported
3486 '/feeds/subscriptions.{format}':
3491 summary: List videos of subscriptions tied to a token
3496 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3509 description: limit listing to a specific account
3515 description: private token allowing access
3519 - $ref: '#/components/parameters/sort'
3520 - $ref: '#/components/parameters/nsfw'
3521 - $ref: '#/components/parameters/filter'
3524 description: successful operation
3529 default: 'max-age=900' # 15 min cache
3533 $ref: '#/components/schemas/VideosForXML'
3534 application/rss+xml:
3536 $ref: '#/components/schemas/VideosForXML'
3539 $ref: '#/components/schemas/VideosForXML'
3540 application/atom+xml:
3542 $ref: '#/components/schemas/VideosForXML'
3547 description: accept header unsupported
3552 summary: List plugins
3565 - $ref: '#/components/parameters/start'
3566 - $ref: '#/components/parameters/count'
3567 - $ref: '#/components/parameters/sort'
3570 description: successful operation
3574 $ref: '#/components/schemas/PluginResponse'
3579 summary: List available plugins
3592 - name: currentPeerTubeEngine
3596 - $ref: '#/components/parameters/start'
3597 - $ref: '#/components/parameters/count'
3598 - $ref: '#/components/parameters/sort'
3601 description: successful operation
3605 $ref: '#/components/schemas/PluginResponse'
3607 description: plugin index unavailable
3612 summary: Install a plugin
3625 example: peertube-plugin-auth-ldap
3628 additionalProperties: false
3635 additionalProperties: false
3638 description: successful operation
3640 description: should have either `npmName` or `path` set
3645 summary: Update a plugin
3658 example: peertube-plugin-auth-ldap
3661 additionalProperties: false
3668 additionalProperties: false
3671 description: successful operation
3673 description: should have either `npmName` or `path` set
3675 description: existing plugin not found
3680 summary: Uninstall a plugin
3692 description: name of the plugin/theme in its package.json
3693 example: peertube-plugin-auth-ldap
3698 description: successful operation
3700 description: existing plugin not found
3705 summary: Get a plugin
3710 - $ref: '#/components/parameters/npmName'
3713 description: successful operation
3717 $ref: '#/components/schemas/Plugin'
3719 description: plugin not found
3720 /plugins/{npmName}/settings:
3724 summary: Set a plugin's settings
3729 - $ref: '#/components/parameters/npmName'
3738 additionalProperties: true
3741 description: successful operation
3743 description: plugin not found
3744 /plugins/{npmName}/public-settings:
3748 summary: Get a plugin's public settings
3750 - $ref: '#/components/parameters/npmName'
3753 description: successful operation
3758 additionalProperties: true
3760 description: plugin not found
3761 /plugins/{npmName}/registered-settings:
3765 summary: Get a plugin's registered settings
3770 - $ref: '#/components/parameters/npmName'
3773 description: successful operation
3778 additionalProperties: true
3780 description: plugin not found
3782 - url: 'https://peertube2.cpy.re/api/v1'
3783 description: Live Test Server (live data - latest nightly version)
3784 - url: 'https://peertube3.cpy.re/api/v1'
3785 description: Live Test Server (live data - latest RC version)
3786 - url: 'https://peertube.cpy.re/api/v1'
3787 description: Live Test Server (live data - stable version)
3794 description: Offset used to paginate results
3802 description: "Number of items to return"
3812 description: Sort column
3820 description: Plain text search, applied to various parts of the model depending on endpoint
3828 If the administrator enabled search index support, you can override the default search target.
3831 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
3832 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
3833 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
3834 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
3835 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
3836 * If the current user doesn't have the ability to make a remote URI search, then redirect the user on the origin instance or fetch
3837 the data from the origin instance API
3847 description: Sort videos by criteria
3863 description: Sort videos by criteria
3878 description: Sort comments by criteria
3888 description: Sort blacklists by criteria
3904 description: Plain text search that will match with user usernames or emails
3911 description: Filter results down to (un)banned users
3918 description: Sort users by criteria
3929 description: Sort abuses by criteria
3936 videoRedundanciesSort:
3940 description: Sort abuses by criteria
3949 description: The username or handle of the account
3952 example: chocobozzz | chocobozzz@example.org
3957 description: The user id
3966 description: The object id or uuid
3972 - $ref: '#/components/schemas/UUIDv4'
3974 name: playlistElementId
3977 description: Playlist element id
3984 description: Abuse id
3988 name: abuseMessageId
3991 description: Abuse message id
3995 name: captionLanguage
3998 description: The caption language
4005 description: The video channel handle
4008 example: my_username | my_username@example.com
4010 name: subscriptionHandle
4013 description: The subscription handle
4016 example: my_username | my_username@example.com
4021 description: The thread id (root comment id)
4028 description: The comment id
4035 description: whether or not the video is a live
4042 description: category id of the video (see [/videos/categories](#tag/Video/paths/~1videos~1categories/get))
4055 description: tag(s) of the video
4069 description: tag(s) of the video, where all should be present in the video
4082 description: language id of the video (see [/videos/languages](#tag/Video/paths/~1videos~1languages/get)). Use `_unknown` to filter on videos that don't have a video language
4095 description: licence id of the video (see [/videos/licences](#tag/Video/paths/~1videos~1licences/get))
4108 description: if you don't need the `total` in the response
4119 description: whether to include nsfw videos, if any
4130 Special filters which might require special rights:
4131 * `local` - only videos local to the instance
4132 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
4133 * `all` - all videos, showing private and unlisted videos (requires Admin privileges)
4143 description: list of uris to check if each is part of the user subscriptions
4153 description: name of the plugin/theme on npmjs.com or in its package.json
4156 example: peertube-plugin-auth-ldap
4161 description: job type
4165 - activitypub-follow
4166 - activitypub-http-broadcast
4167 - activitypub-http-fetcher
4168 - activitypub-http-unicast
4174 - activitypub-refresher
4180 Authenticating via OAuth requires the following steps:
4181 - Have an activated account
4182 - [Generate](https://docs.joinpeertube.org/api-rest-getting-started) a
4183 Bearer Token for that account at `/api/v1/users/token`
4184 - Make authenticated requests, putting *Authorization: Bearer <token\>*
4185 - Profit, depending on the role assigned to the account
4187 Note that the __access token is valid for 1 day__ and, and is given
4188 along with a __refresh token valid for 2 weeks__.
4192 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
4195 moderator: Moderator scope
4201 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4202 pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
4203 # the regex above limits the length;
4204 # however, some tools might require explicit settings:
4208 VideoConstantNumber-Category:
4212 description: category id of the video (see [/videos/categories](#tag/Video/paths/~1videos~1categories/get))
4215 VideoConstantNumber-Licence:
4219 description: licence id of the video (see [/videos/licences](#tag/Video/paths/~1videos~1licences/get))
4222 VideoConstantString-Language:
4226 description: language id of the video (see [/videos/languages](#tag/Video/paths/~1videos~1languages/get))
4230 VideoPlaylistPrivacySet:
4236 description: 'The video playlist privacy (Public = `1`, Unlisted = `2`, Private = `3`)'
4237 VideoPlaylistPrivacyConstant:
4240 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4244 VideoPlaylistTypeSet:
4249 description: 'The video playlist type (Regular = `1`, Watch Later = `2`)'
4250 VideoPlaylistTypeConstant:
4253 $ref: '#/components/schemas/VideoPlaylistTypeSet'
4264 description: 'The video privacy (Public = `1`, Unlisted = `2`, Private = `3`, Internal = `4`)'
4265 VideoPrivacyConstant:
4268 $ref: '#/components/schemas/VideoPrivacySet'
4285 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
4292 description: 'Admin flags for the user (None = `0`, Bypass video blacklist = `1`)'
4303 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
4313 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
4317 $ref: '#/components/schemas/AbuseStateSet'
4320 AbusePredefinedReasons:
4333 example: [spamOrMisleading]
4335 VideoResolutionConstant:
4339 description: 'Video resolution (240, 360, 720, 1080, 1440 or 2160)'
4344 VideoScheduledUpdate:
4347 $ref: '#/components/schemas/VideoPrivacySet'
4351 description: When to update the video
4371 - $ref: '#/components/schemas/ActorImage'
4372 VideoChannelSummary:
4389 - $ref: '#/components/schemas/ActorImage'
4401 - $ref: '#/components/schemas/Video'
4407 $ref: '#/components/schemas/VideoResolutionConstant'
4410 description: 'Video file size in bytes'
4413 description: Direct URL of the torrent file
4417 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
4421 description: Direct URL of the video
4425 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
4432 VideoStreamingPlaylists:
4445 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS'
4446 VideoStreamingPlaylists-HLS:
4457 Video files associated to this playlist.
4459 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.)
4461 $ref: '#/components/schemas/VideoFile'
4475 $ref: '#/components/schemas/UUIDv4'
4486 $ref: '#/components/schemas/UUIDv4'
4492 example: 2017-10-01T10:52:46.396Z
4493 description: time at which the video object was first drafted
4497 example: 2018-10-01T10:52:46.396Z
4498 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
4502 example: 2021-05-04T08:01:01.502Z
4503 description: last time the video's metadata was modified
4504 originallyPublishedAt:
4507 example: 2010-10-01T10:52:46.396Z
4508 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
4510 $ref: '#/components/schemas/VideoConstantNumber-Category'
4512 $ref: '#/components/schemas/VideoConstantNumber-Licence'
4514 $ref: '#/components/schemas/VideoConstantString-Language'
4516 $ref: '#/components/schemas/VideoPrivacyConstant'
4520 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n
4521 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr...
4525 truncated description of the video, written in Markdown.
4526 Resolve `descriptionPath` to get the full description of maximum `10000` characters.
4530 description: duration of the video in seconds
4535 example: What is PeerTube?
4540 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
4543 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
4546 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
4562 $ref: '#/components/schemas/VideoStateConstant'
4566 - $ref: '#/components/schemas/VideoScheduledUpdate'
4574 $ref: '#/components/schemas/AccountSummary'
4576 $ref: '#/components/schemas/VideoChannelSummary'
4585 - $ref: '#/components/schemas/Video'
4590 example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description
4591 description: path at which to get the full description of maximum `10000` characters
4594 description: A text tell the audience how to support the video creator
4595 example: Please support my work on <insert crowdfunding plateform>! <3
4599 $ref: '#/components/schemas/VideoChannel'
4601 $ref: '#/components/schemas/Account'
4603 example: [flowers, gardening]
4623 $ref: '#/components/schemas/VideoFile'
4625 WebTorrent/raw video files. If WebTorrent is disabled on the server:
4627 - field will be empty
4628 - video files will be found in `streamingPlaylists[].files` field
4632 $ref: '#/components/schemas/VideoStreamingPlaylists'
4634 HLS playlists/manifest files. If HLS is disabled on the server:
4636 - field will be empty
4637 - video files will be found in `files` field
4638 FileRedundancyInformation:
4673 $ref: '#/components/schemas/UUIDv4'
4680 $ref: '#/components/schemas/FileRedundancyInformation'
4684 $ref: '#/components/schemas/FileRedundancyInformation'
4685 VideoImportStateConstant:
4693 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
4705 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
4709 example: magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.torrent&xt=urn:btih:38b4747ff788b30bf61f59d1965cd38f9e48e01f&dn=What+is+PeerTube%3F&tr=wss%3A%2F%2Fframatube.org%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.mp4
4713 $ref: '#/components/schemas/VideoImportStateConstant'
4723 $ref: '#/components/schemas/Video'
4731 example: The video is a spam
4735 $ref: '#/components/schemas/AbusePredefinedReasons'
4737 $ref: '#/components/schemas/Account'
4739 $ref: '#/components/schemas/AbuseStateConstant'
4742 example: Decided to ban the server since it spams us regularly
4746 $ref: '#/components/schemas/VideoInfo'
4764 $ref: '#/components/schemas/AccountSummary'
4782 $ref: '#/components/schemas/UUIDv4'
4815 $ref: '#/components/schemas/UUIDv4'
4831 $ref: '#/components/schemas/UUIDv4'
4843 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
4845 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
4847 $ref: '#/components/schemas/AccountSummary'
4849 $ref: '#/components/schemas/VideoChannelSummary'
4873 totalRepliesFromVideoAuthor:
4878 $ref: '#/components/schemas/Account'
4879 VideoCommentThreadTree:
4882 $ref: '#/components/schemas/VideoComment'
4886 $ref: '#/components/schemas/VideoCommentThreadTree'
4890 $ref: '#/components/schemas/VideoConstantString-Language'
4945 $ref: '#/components/schemas/ActorImage'
4948 - $ref: '#/components/schemas/Actor'
4961 description: timestamp within the video, in seconds
5028 allowedForCurrentIP:
5030 requiresEmailVerification:
5234 requiresEmailVerification:
5259 allowAdditionalExtensions:
5329 $ref: '#/components/schemas/Actor'
5331 $ref: '#/components/schemas/Actor'
5334 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
5347 PredefinedAbuseReasons:
5348 description: Reason categories that help triage reports
5380 - activitypub-http-unicast
5381 - activitypub-http-broadcast
5382 - activitypub-http-fetcher
5383 - activitypub-follow
5389 - activitypub-refresher
5393 additionalProperties: true
5396 additionalProperties: true
5420 VideoUploadRequestCommon:
5423 description: Video name
5426 description: Channel id that will contain this video
5429 $ref: '#/components/schemas/VideoPrivacySet'
5431 description: Video category
5435 description: Video licence
5439 description: Video language
5442 description: Video description
5445 description: Whether or not we wait transcoding before publish the video
5448 description: A text tell the audience how to support the video creator
5449 example: Please support my work on <insert crowdfunding plateform>! <3
5452 description: Whether or not this video contains sensitive content
5455 description: Video tags (maximum 5 tags each between 2 and 30 characters)
5465 description: Enable or disable comments for this video
5468 description: Enable or disable downloading for this video
5470 originallyPublishedAt:
5471 description: Date when the content was originally published
5475 $ref: '#/components/schemas/VideoScheduledUpdate'
5477 description: Video thumbnail file
5481 description: Video preview file
5487 VideoUploadRequestLegacy:
5489 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5495 description: Video file
5498 VideoUploadRequestResumable:
5500 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5506 description: Video filename including extension
5510 description: Video thumbnail file
5514 description: Video preview file
5517 VideoUploadResponse:
5526 $ref: '#/components/schemas/UUIDv4'
5527 CommentThreadResponse:
5536 $ref: '#/components/schemas/VideoComment'
5537 CommentThreadPostResponse:
5540 $ref: '#/components/schemas/VideoComment'
5550 $ref: '#/components/schemas/Video'
5558 description: The user username
5564 description: The user email
5567 description: Auth plugin to use to authenticate the user
5570 description: Theme enabled by this user
5573 description: Has the user confirmed their email address?
5575 $ref: '#/components/schemas/NSFWPolicy'
5578 description: Enable P2P in the player
5581 description: Automatically start playing the video on the watch page
5583 $ref: '#/components/schemas/UserRole'
5592 description: The user video quota
5595 description: The user daily video quota
5600 abusesAcceptedCount:
5606 noInstanceConfigWarningModal:
5617 $ref: '#/components/schemas/Account'
5621 $ref: '#/components/schemas/VideoChannel'
5626 description: The user username
5632 description: The user password. If the smtp server is configured, you can leave empty and an email will be sent
5638 description: The user email
5641 description: The user video quota
5644 description: The user daily video quota
5647 description: The user default channel username
5649 $ref: '#/components/schemas/UserRole'
5651 $ref: '#/components/schemas/UserAdminFlags'
5663 description: The user id
5667 description: The updated email of the user
5670 description: Set the email as verified
5673 description: The updated video quota of the user
5676 description: The updated daily video quota of the user
5680 description: The auth plugin to use to authenticate the user
5681 example: 'peertube-plugin-auth-saml2'
5683 $ref: '#/components/schemas/UserRole'
5685 $ref: '#/components/schemas/UserAdminFlags'
5693 description: Your new password
5699 description: Your new email
5702 description: Your new displayNSFW
5709 description: Your new autoPlayVideo
5719 description: Id of the video
5722 description: Rating of the video
5729 $ref: '#/components/schemas/Video'
5732 description: 'Rating of the video'
5740 description: The username of the user
5743 pattern: '/^[a-z0-9._]{1,50}$/'
5747 description: The password of the user
5753 description: The email of the user
5756 description: The user display name
5764 description: The username for the default channel
5765 pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/'
5768 description: The display name for the default channel
5788 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
5789 example: Please support my work on <insert crowdfunding plateform>! <3
5794 - $ref: '#/components/schemas/VideoChannelCommon'
5805 - $ref: '#/components/schemas/VideoChannelCommon'
5807 bulkVideosSupportUpdate:
5809 description: 'Update the support field for all videos of this channel'
5814 name: 'media:peerLink'
5823 - application/x-bittorrent
5829 name: 'media:content'
5860 VideoCommentsForXML:
5895 description: video watch page URL
5898 description: video canonical URL
5902 description: video publication date
5905 description: video description
5908 description: video description
5911 description: publisher user name
5914 description: video category (MRSS)
5917 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
5932 description: video embed path, relative to the canonical URL domain (MRSS)
5941 description: video watch path, relative to the canonical URL domain (MRSS)
5962 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
5963 'media:description':
5970 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
5973 description: main streamable file for the video
5983 - application/x-bittorrent
5992 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)
5995 - $ref: '#/components/schemas/MRSSPeerLink'
5996 - $ref: '#/components/schemas/MRSSGroupContent'
5997 NotificationSettingValue:
6018 Notification type, following the `UserNotificationType` enum:
6020 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
6022 - `2` NEW_COMMENT_ON_MY_VIDEO
6024 - `3` NEW_ABUSE_FOR_MODERATORS
6026 - `4` BLACKLIST_ON_MY_VIDEO
6028 - `5` UNBLACKLIST_ON_MY_VIDEO
6030 - `6` MY_VIDEO_PUBLISHED
6032 - `7` MY_VIDEO_IMPORT_SUCCESS
6034 - `8` MY_VIDEO_IMPORT_ERROR
6036 - `9` NEW_USER_REGISTRATION
6040 - `11` COMMENT_MENTION
6042 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
6044 - `13` NEW_INSTANCE_FOLLOWER
6046 - `14` AUTO_INSTANCE_FOLLOWING
6052 - $ref: '#/components/schemas/VideoInfo'
6056 $ref: '#/components/schemas/ActorInfo'
6065 $ref: '#/components/schemas/VideoInfo'
6086 $ref: '#/components/schemas/VideoInfo'
6088 $ref: '#/components/schemas/ActorInfo'
6097 - $ref: '#/components/schemas/VideoInfo'
6106 - $ref: '#/components/schemas/VideoInfo'
6110 - $ref: '#/components/schemas/ActorInfo'
6118 $ref: '#/components/schemas/ActorInfo'
6146 NotificationListResponse:
6155 $ref: '#/components/schemas/Notification'
6160 example: peertube-plugin-auth-ldap
6188 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
6191 additionalProperties: true
6207 $ref: '#/components/schemas/Plugin'
6214 description: User can stream multiple times in a permanent live
6223 description: RTMP stream key to use to stream into this live video
6227 description: User can stream multiple times in a permanent live
6234 'https://search.example.org/api/v1/search/videos':
6236 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
6239 description: successful operation
6243 $ref: '#/components/schemas/VideoListResponse'