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 set by administrators:
55 | Endpoint | Calls | Time frame |
56 |-------------------------|------------------|---------------------------|
57 | `/*` | 50 | 10 seconds |
58 | `POST /users/token` | 15 | 5 minutes |
59 | `POST /users/register` | 2¹ | 5 minutes |
60 | `POST /users/ask-send-verify-email` | 3 | 5 minutes |
62 Depending on the endpoint, ¹failed requests are not taken into account. A service
63 limit is announced by a `429 Too Many Requests` status code.
65 You can get details about the current state of your rate limit by reading the
68 | Header | Description |
69 |-------------------------|------------------------------------------------------------|
70 | X-RateLimit-Limit | Number of max requests allowed in the current time period |
71 | X-RateLimit-Remaining | Number of remaining requests in the current time period |
72 | X-RateLimit-Reset | Timestamp of end of current time period as UNIX timestamp |
73 | Retry-After | Seconds to delay after the first `429` is received |
75 url: https://docs.joinpeertube.org/api-rest-reference.html
79 Accounts encompass remote accounts discovered across the federation,
80 and correspond to the main Actor, along with video channels a user can create, which
83 When a comment is posted, it is done with your Account's Actor.
86 Using some features of PeerTube require authentication, for which User
87 provide different levels of permission as well as associated user
88 information. Each user has a corresponding local Account for federation.
91 Operations related to your own User, when logged-in.
92 - name: My Subscriptions
94 Operations related to your subscriptions to video channels, their
95 new videos, and how to keep up to date with their latest publications!
98 Operations related to your watch history.
99 - name: My Notifications
101 Notifications following new videos, follows or reports. They allow you
102 to keep track of the interactions and overall important information that
103 concerns you. You MAY set per-notification type delivery preference, to
104 receive the info either by mail, by in-browser notification or both.
107 Each server exposes public information regarding supported videos and
111 Jobs are long-running tasks enqueued and processed by the instance
112 itself. No additional worker registration is currently available.
113 - name: Instance Follows
115 Managing servers which the instance interacts with is crucial to the
116 concept of federation in PeerTube and external video indexation. The PeerTube
117 server then deals with inter-server ActivityPub operations and propagates
118 information across its social graph by posting activities to actors' inbox
121 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-follows
122 - name: Instance Redundancy
124 Redundancy is part of the inter-server solidarity that PeerTube fosters.
125 Manage the list of instances you wish to help by seeding their videos according
126 to the policy of video selection of your choice. Note that you have a similar functionality
127 to mirror individual videos, see [video mirroring](#tag/Video-Mirroring).
129 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-redundancy
132 Managing plugins installed from a local path or from NPM, or search for new ones.
134 url: https://docs.joinpeertube.org/api-plugins
137 Abuses deal with reports of local or remote videos/comments/accounts alike.
140 Operations dealing with listing, uploading, fetching or modifying videos.
143 Operations dealing with adding video or audio. PeerTube supports two upload modes, and three import modes.
147 - [_legacy_](#tag/Video-Upload/paths/~1videos~1upload/post), where the video file is sent in a single request
148 - [_resumable_](#tag/Video-Upload/paths/~1videos~1upload-resumable/post), where the video file is sent in chunks
150 You can upload videos more reliably by using the resumable variant. Its protocol lets
151 you resume an upload operation after a network interruption or other transmission failure,
152 saving time and bandwidth in the event of network failures.
154 Favor using resumable uploads in any of the following cases:
155 - You are transferring large files
156 - The likelihood of a network interruption is high
157 - Uploads are originating from a device with a low-bandwidth or unstable Internet connection,
158 such as a mobile device
162 - _URL_-based: where the URL points to any service supported by [youtube-dl](https://ytdl-org.github.io/youtube-dl/)
163 - _magnet_-based: where the URI resolves to a BitTorrent ressource containing a single supported video file
164 - _torrent_-based: where the metainfo file resolves to a BitTorrent ressource containing a single supported video file
166 The import function is practical when the desired video/audio is available online. It makes PeerTube
167 download it for you, saving you as much bandwidth and avoiding any instability or limitation your network might have.
168 - name: Video Captions
169 description: Operations dealing with listing, adding and removing closed captions of a video.
170 - name: Video Channels
171 description: Operations dealing with the creation, modification and listing of videos within a channel.
172 - name: Video Comments
174 Operations dealing with comments to a video. Comments are organized in threads: adding a
175 comment in response to the video starts a thread, adding a reply to a comment adds it to
176 its root comment thread.
178 description: Operations dealing with blocking videos (removing them from view and preventing interactions).
180 description: Like/dislike a video.
181 - name: Video Playlists
182 description: Operations dealing with playlists of videos. Playlists are bound to users and/or channels.
184 description: Server syndication feeds
187 The search helps to find _videos_ or _channels_ from within the instance and beyond.
188 Videos from other instances federated by the instance (that is, instances
189 followed by the instance) can be found via keywords and other criteria of
192 Administrators can also enable the use of a remote search system, indexing
193 videos and channels not could be not federated by the instance.
194 - name: Video Mirroring
196 PeerTube instances can mirror videos from one another, and help distribute some videos.
198 For importing videos as your own, refer to [video imports](#tag/Video-Upload/paths/~1videos~1imports/post).
217 - Video Ownership Change
230 - name: Instance Configuration
234 - Instance Redundancy
244 summary: Get an account
246 - $ref: '#/components/parameters/name'
249 description: successful operation
253 $ref: '#/components/schemas/Account'
255 description: account not found
256 '/accounts/{name}/videos':
261 summary: 'List videos of an account'
263 - $ref: '#/components/parameters/name'
264 - $ref: '#/components/parameters/categoryOneOf'
265 - $ref: '#/components/parameters/isLive'
266 - $ref: '#/components/parameters/tagsOneOf'
267 - $ref: '#/components/parameters/tagsAllOf'
268 - $ref: '#/components/parameters/licenceOneOf'
269 - $ref: '#/components/parameters/languageOneOf'
270 - $ref: '#/components/parameters/nsfw'
271 - $ref: '#/components/parameters/filter'
272 - $ref: '#/components/parameters/skipCount'
273 - $ref: '#/components/parameters/start'
274 - $ref: '#/components/parameters/count'
275 - $ref: '#/components/parameters/videosSort'
278 description: successful operation
282 $ref: '#/components/schemas/VideoListResponse'
286 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
287 .then(function(response) {
288 return response.json()
289 }).then(function(data) {
295 curl -s https://peertube2.cpy.re/api/v1/accounts/{name}/videos | jq
301 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
303 http = Net::HTTP.new(uri.host, uri.port)
306 response = http.get(uri.request_uri)
308 puts JSON.parse(response.read_body)
313 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
321 summary: List accounts
323 - $ref: '#/components/parameters/start'
324 - $ref: '#/components/parameters/count'
325 - $ref: '#/components/parameters/sort'
328 description: successful operation
334 $ref: '#/components/schemas/Account'
339 summary: Get instance public configuration
342 description: successful operation
346 $ref: '#/components/schemas/ServerConfig'
349 summary: Get instance "About" information
354 description: successful operation
358 $ref: '#/components/schemas/ServerConfigAbout'
361 summary: Get instance runtime configuration
369 description: successful operation
373 $ref: '#/components/schemas/ServerConfigCustom'
375 summary: Set instance runtime configuration
383 description: successful operation
385 x-summary: field inconsistencies
388 - the emailer is disabled and the instance is open to registrations
389 - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
391 summary: Delete instance runtime configuration
399 description: successful operation
402 summary: List instance jobs
412 description: The state of the job ('' for for no filter)
422 - $ref: '#/components/parameters/jobType'
423 - $ref: '#/components/parameters/start'
424 - $ref: '#/components/parameters/count'
425 - $ref: '#/components/parameters/sort'
428 description: successful operation
441 $ref: '#/components/schemas/Job'
442 '/server/following/{host}':
449 summary: Unfollow a server
454 description: 'The host to unfollow '
460 description: successful operation
465 summary: List instance followers
467 - $ref: '#/components/parameters/start'
468 - $ref: '#/components/parameters/count'
469 - $ref: '#/components/parameters/sort'
472 description: successful operation
478 $ref: '#/components/schemas/Follow'
483 summary: List instances followed by the server
502 - $ref: '#/components/parameters/start'
503 - $ref: '#/components/parameters/count'
504 - $ref: '#/components/parameters/sort'
507 description: successful operation
513 $ref: '#/components/schemas/Follow'
520 summary: Follow a server
523 description: successful operation
525 description: cannot follow a non-HTTPS server
540 summary: Create a user
548 description: user created
552 $ref: '#/components/schemas/AddUserResponse'
556 operationId: getUserId
558 id: '$response.body#/user/id'
561 operationId: putUserId
563 id: '$response.body#/user/id'
566 operationId: delUserId
568 id: '$response.body#/user/id'
570 description: insufficient authority to create an admin or moderator
575 $ref: '#/components/schemas/AddUser'
576 description: User to create
586 - $ref: '#/components/parameters/usersSearch'
587 - $ref: '#/components/parameters/usersBlocked'
588 - $ref: '#/components/parameters/start'
589 - $ref: '#/components/parameters/count'
590 - $ref: '#/components/parameters/usersSort'
593 description: successful operation
599 $ref: '#/components/schemas/User'
602 - $ref: '#/components/parameters/id'
604 summary: Delete a user
610 operationId: delUserId
613 description: successful operation
620 operationId: getUserId
624 description: include statistics about the user (only available as a moderator/admin)
629 x-summary: successful operation
631 As an admin/moderator, you can request a response augmented with statistics about the user's
632 moderation relations and videos usage, by using the `withStats` parameter.
637 - $ref: '#/components/schemas/User'
638 - $ref: '#/components/schemas/UserWithStats'
640 summary: Update a user
645 operationId: putUserId
648 description: successful operation
653 $ref: '#/components/schemas/UpdateUser'
657 summary: Register a user
662 description: successful operation
667 $ref: '#/components/schemas/RegisterUser'
671 summary: Get my user information
679 description: successful operation
685 $ref: '#/components/schemas/User'
687 summary: Update my user information
695 description: successful operation
700 $ref: '#/components/schemas/UpdateMe'
702 /users/me/videos/imports:
704 summary: Get video imports of my user
712 - $ref: '#/components/parameters/start'
713 - $ref: '#/components/parameters/count'
714 - $ref: '#/components/parameters/sort'
717 description: successful operation
721 $ref: '#/components/schemas/VideoImportsList'
722 /users/me/video-quota-used:
724 summary: Get my user used quota
732 description: successful operation
744 '/users/me/videos/{videoId}/rating':
746 summary: Get rate of my user for a video
756 description: 'The video id '
761 description: successful operation
765 $ref: '#/components/schemas/GetMeVideoRating'
768 summary: Get videos of my user
776 - $ref: '#/components/parameters/start'
777 - $ref: '#/components/parameters/count'
778 - $ref: '#/components/parameters/sort'
781 description: successful operation
785 $ref: '#/components/schemas/VideoListResponse'
786 /users/me/subscriptions:
788 summary: Get my user subscriptions
795 - $ref: '#/components/parameters/start'
796 - $ref: '#/components/parameters/count'
797 - $ref: '#/components/parameters/sort'
800 description: successful operation
804 summary: Add subscription to my user
817 description: uri of the video channels to subscribe to
823 uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr
826 description: successful operation
827 /users/me/subscriptions/exist:
829 summary: Get if subscriptions exist for my user
836 - $ref: '#/components/parameters/subscriptionsUris'
839 description: successful operation
844 /users/me/subscriptions/videos:
846 summary: List videos of subscriptions of my user
854 - $ref: '#/components/parameters/categoryOneOf'
855 - $ref: '#/components/parameters/isLive'
856 - $ref: '#/components/parameters/tagsOneOf'
857 - $ref: '#/components/parameters/tagsAllOf'
858 - $ref: '#/components/parameters/licenceOneOf'
859 - $ref: '#/components/parameters/languageOneOf'
860 - $ref: '#/components/parameters/nsfw'
861 - $ref: '#/components/parameters/filter'
862 - $ref: '#/components/parameters/skipCount'
863 - $ref: '#/components/parameters/start'
864 - $ref: '#/components/parameters/count'
865 - $ref: '#/components/parameters/videosSort'
868 description: successful operation
872 $ref: '#/components/schemas/VideoListResponse'
873 '/users/me/subscriptions/{subscriptionHandle}':
875 summary: Get subscription of my user
882 - $ref: '#/components/parameters/subscriptionHandle'
885 description: successful operation
889 $ref: '#/components/schemas/VideoChannel'
891 summary: Delete subscription of my user
898 - $ref: '#/components/parameters/subscriptionHandle'
901 description: successful operation
902 /users/me/notifications:
904 summary: List my notifications
912 description: only list unread notifications
915 - $ref: '#/components/parameters/start'
916 - $ref: '#/components/parameters/count'
917 - $ref: '#/components/parameters/sort'
920 description: successful operation
924 $ref: '#/components/schemas/NotificationListResponse'
925 /users/me/notifications/read:
927 summary: Mark notifications as read by their id
940 description: ids of the notifications to mark as read
947 description: successful operation
948 /users/me/notifications/read-all:
950 summary: Mark all my notification as read
957 description: successful operation
958 /users/me/notification-settings:
960 summary: Update my notification settings
971 newVideoFromSubscription:
972 $ref: '#/components/schemas/NotificationSettingValue'
974 $ref: '#/components/schemas/NotificationSettingValue'
976 $ref: '#/components/schemas/NotificationSettingValue'
977 videoAutoBlacklistAsModerator:
978 $ref: '#/components/schemas/NotificationSettingValue'
980 $ref: '#/components/schemas/NotificationSettingValue'
982 $ref: '#/components/schemas/NotificationSettingValue'
983 myVideoImportFinished:
984 $ref: '#/components/schemas/NotificationSettingValue'
986 $ref: '#/components/schemas/NotificationSettingValue'
988 $ref: '#/components/schemas/NotificationSettingValue'
990 $ref: '#/components/schemas/NotificationSettingValue'
992 $ref: '#/components/schemas/NotificationSettingValue'
993 autoInstanceFollowing:
994 $ref: '#/components/schemas/NotificationSettingValue'
997 description: successful operation
998 /users/me/history/videos:
1000 summary: List watched videos history
1006 - $ref: '#/components/parameters/start'
1007 - $ref: '#/components/parameters/count'
1008 - $ref: '#/components/parameters/search'
1011 description: successful operation
1015 $ref: '#/components/schemas/VideoListResponse'
1016 /users/me/history/videos/remove:
1018 summary: Clear video history
1025 multipart/form-data:
1030 description: history before this date will be deleted
1035 description: successful operation
1036 /users/me/avatar/pick:
1038 summary: Update my user avatar
1045 description: successful operation
1052 $ref: '#/components/schemas/ActorImage'
1054 description: image file too large
1056 X-File-Maximum-Size:
1060 description: Maximum file size for the avatar
1063 multipart/form-data:
1068 description: The file to upload.
1073 contentType: image/png, image/jpeg
1076 summary: Delete my avatar
1083 description: successful operation
1087 summary: List video ownership changes
1089 - Video Ownership Change
1094 description: successful operation
1095 '/videos/ownership/{id}/accept':
1097 summary: Accept ownership change request
1099 - Video Ownership Change
1103 - $ref: '#/components/parameters/idOrUUID'
1106 description: successful operation
1108 description: cannot terminate an ownership change of another user
1110 description: video owneship change not found
1111 '/videos/ownership/{id}/refuse':
1113 summary: Refuse ownership change request
1115 - Video Ownership Change
1119 - $ref: '#/components/parameters/idOrUUID'
1122 description: successful operation
1124 description: cannot terminate an ownership change of another user
1126 description: video owneship change not found
1127 '/videos/{id}/give-ownership':
1129 summary: Request ownership change
1131 - Video Ownership Change
1135 - $ref: '#/components/parameters/idOrUUID'
1139 application/x-www-form-urlencoded:
1149 description: successful operation
1151 description: changing video ownership to a remote account is not supported yet
1153 description: video not found
1156 summary: List videos
1160 - $ref: '#/components/parameters/categoryOneOf'
1161 - $ref: '#/components/parameters/isLive'
1162 - $ref: '#/components/parameters/tagsOneOf'
1163 - $ref: '#/components/parameters/tagsAllOf'
1164 - $ref: '#/components/parameters/licenceOneOf'
1165 - $ref: '#/components/parameters/languageOneOf'
1166 - $ref: '#/components/parameters/nsfw'
1167 - $ref: '#/components/parameters/filter'
1168 - $ref: '#/components/parameters/skipCount'
1169 - $ref: '#/components/parameters/start'
1170 - $ref: '#/components/parameters/count'
1171 - $ref: '#/components/parameters/videosSort'
1174 description: successful operation
1178 $ref: '#/components/schemas/VideoListResponse'
1181 summary: List available video categories
1186 description: successful operation
1195 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
1198 summary: List available video licences
1203 description: successful operation
1212 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
1215 summary: List available video languages
1220 description: successful operation
1229 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
1232 summary: List available video privacies
1237 description: successful operation
1246 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
1249 summary: Update a video
1255 - $ref: '#/components/parameters/idOrUUID'
1258 description: successful operation
1261 multipart/form-data:
1266 description: Video thumbnail file
1270 description: Video preview file
1274 description: Video category
1278 description: Video licence
1282 description: Video language
1285 $ref: '#/components/schemas/VideoPrivacySet'
1287 description: Video description
1290 description: Whether or not we wait transcoding before publish the video
1293 description: A text tell the audience how to support the video creator
1294 example: Please support my work on <insert crowdfunding plateform>! <3
1297 description: Whether or not this video contains sensitive content
1300 description: Video name
1305 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1314 description: Enable or disable comments for this video
1316 originallyPublishedAt:
1317 description: Date when the content was originally published
1321 $ref: '#/components/schemas/VideoScheduledUpdate'
1324 contentType: image/jpeg
1326 contentType: image/jpeg
1328 summary: Get a video
1332 - $ref: '#/components/parameters/idOrUUID'
1335 description: successful operation
1339 $ref: '#/components/schemas/VideoDetails'
1341 summary: Delete a video
1347 - $ref: '#/components/parameters/idOrUUID'
1350 description: successful operation
1351 '/videos/{id}/description':
1353 summary: Get complete video description
1357 - $ref: '#/components/parameters/idOrUUID'
1360 description: successful operation
1365 '/videos/{id}/views':
1367 summary: Add a view to a video
1371 - $ref: '#/components/parameters/idOrUUID'
1374 description: successful operation
1375 '/videos/{id}/watching':
1377 summary: Set watching progress of a video
1383 - $ref: '#/components/parameters/idOrUUID'
1388 $ref: '#/components/schemas/UserWatchingVideo'
1392 description: successful operation
1395 summary: Upload a video
1396 description: Uses a single request to upload a video.
1404 description: successful operation
1408 $ref: '#/components/schemas/VideoUploadResponse'
1410 description: invalid file field, schedule date or parameter
1412 description: video didn't pass upload filter
1414 description: upload has timed out
1416 description: video file too large, due to quota or max body size limit set by the reverse-proxy
1418 X-File-Maximum-Size:
1422 description: Maximum file size for the video
1424 description: video type unsupported
1426 description: video unreadable
1429 multipart/form-data:
1431 $ref: '#/components/schemas/VideoUploadRequestLegacy'
1434 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1436 contentType: image/jpeg
1438 contentType: image/jpeg
1443 USERNAME="<your_username>"
1444 PASSWORD="<your_password>"
1445 FILE_PATH="<your_file_path>"
1446 CHANNEL_ID="<your_channel_id>"
1449 API_PATH="https://peertube2.cpy.re/api/v1"
1451 client_id=$(curl -s "$API_PATH/oauth-clients/local" | jq -r ".client_id")
1452 client_secret=$(curl -s "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
1453 token=$(curl -s "$API_PATH/users/token" \
1454 --data client_id="$client_id" \
1455 --data client_secret="$client_secret" \
1456 --data grant_type=password \
1457 --data response_type=code \
1458 --data username="$USERNAME" \
1459 --data password="$PASSWORD" \
1460 | jq -r ".access_token")
1462 curl -s "$API_PATH/videos/upload" \
1463 -H "Authorization: Bearer $token" \
1465 --form videofile=@"$FILE_PATH" \
1466 --form channelId=$CHANNEL_ID \
1468 /videos/upload-resumable:
1470 summary: Initialize the resumable upload of a video
1471 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video
1478 - name: X-Upload-Content-Length
1484 description: Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading.
1485 - name: X-Upload-Content-Type
1492 description: MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.
1497 $ref: '#/components/schemas/VideoUploadRequestResumable'
1500 description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead
1502 description: created
1508 example: /api/v1/videos/upload-resumable?upload_id=471e97554f21dec3b8bb5d4602939c51
1514 description: invalid file field, schedule date or parameter
1516 description: video file too large, due to quota, absolute max file size or concurrent partial upload limit
1518 description: video type unsupported
1520 summary: Send chunk for the resumable upload of a video
1521 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
1532 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
1533 not valid anymore and you need to initialize a new upload.
1536 - name: Content-Range
1540 example: bytes 0-262143/2469036
1543 Specifies the bytes in the file that the request is uploading.
1545 For example, a value of `bytes 0-262143/1000000` shows that the request is sending the first
1546 262144 bytes (256 x 1024) in a 2,469,036 byte file.
1547 - name: Content-Length
1554 Size of the chunk that the request is sending.
1556 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)
1557 doesn't mandate for chunks to have the same size throughout the upload sequence.
1559 Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from
1560 1048576 bytes (~1MB) and increases or reduces size depending on connection health.
1563 application/octet-stream:
1569 description: last chunk received
1577 $ref: '#/components/schemas/VideoUploadResponse'
1579 description: resume incomplete
1584 example: bytes=0-262143
1590 description: video didn't pass upload filter
1592 description: video file too large, due to quota or max body size limit set by the reverse-proxy
1594 description: video unreadable
1596 summary: Cancel the resumable upload of a video, deleting any data uploaded so far
1597 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video
1608 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
1609 not valid anymore and the upload session has already been deleted with its data ;-)
1612 - name: Content-Length
1620 description: upload cancelled
1628 summary: Import a video
1629 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
1637 multipart/form-data:
1642 description: Torrent File
1646 description: HTTP target URL
1649 description: Magnet URI
1652 description: Channel id that will contain this video
1655 description: Video thumbnail file
1659 description: Video preview file
1663 $ref: '#/components/schemas/VideoPrivacySet'
1665 description: Video category
1669 description: Video licence
1673 description: Video language
1676 description: Video description
1679 description: Whether or not we wait transcoding before publish the video
1682 description: A text tell the audience how to support the video creator
1683 example: Please support my work on <insert crowdfunding plateform>! <3
1686 description: Whether or not this video contains sensitive content
1689 description: Video name
1694 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1703 description: Enable or disable comments for this video
1706 description: Enable or disable downloading for this video
1709 $ref: '#/components/schemas/VideoScheduledUpdate'
1715 contentType: application/x-bittorrent
1717 contentType: image/jpeg
1719 contentType: image/jpeg
1722 description: successful operation
1726 $ref: '#/components/schemas/VideoUploadResponse'
1728 description: '`magnetUri` or `targetUrl` or a torrent file missing'
1730 description: video didn't pass pre-import filter
1732 description: HTTP or Torrent/magnetURI import not enabled
1736 summary: Create a live
1744 description: successful operation
1748 $ref: '#/components/schemas/VideoUploadResponse'
1750 description: Live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
1753 multipart/form-data:
1758 description: Channel id that will contain this live video
1763 description: User can stream multiple times in a permanent live
1766 description: Live video/replay thumbnail file
1770 description: Live video/replay preview file
1774 $ref: '#/components/schemas/VideoPrivacySet'
1776 description: Live video/replay category
1779 description: Live video/replay licence
1782 description: Live video/replay language
1785 description: Live video/replay description
1788 description: A text tell the audience how to support the creator
1789 example: Please support my work on <insert crowdfunding plateform>! <3
1792 description: Whether or not this live video/replay contains sensitive content
1795 description: Live video/replay name
1800 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
1809 description: Enable or disable comments for this live video/replay
1812 description: Enable or disable downloading for the replay of this live
1819 contentType: image/jpeg
1821 contentType: image/jpeg
1825 summary: Get information about a live
1832 - $ref: '#/components/parameters/idOrUUID'
1835 description: successful operation
1839 $ref: '#/components/schemas/LiveVideoResponse'
1841 summary: Update information about a live
1848 - $ref: '#/components/parameters/idOrUUID'
1853 $ref: '#/components/schemas/LiveVideoUpdate'
1856 description: Successful operation
1858 description: Bad parameters or trying to update a live that has already started
1860 description: Trying to save replay of the live but saving replay is not enabled on the instance
1864 summary: List my abuses
1873 description: only list the report with this id
1879 $ref: '#/components/schemas/AbuseStateSet'
1880 - $ref: '#/components/parameters/start'
1881 - $ref: '#/components/parameters/count'
1882 - $ref: '#/components/parameters/abusesSort'
1885 description: successful operation
1891 $ref: '#/components/schemas/Abuse'
1895 summary: List abuses
1905 description: only list the report with this id
1908 - name: predefinedReason
1910 description: predefined reason the listed reports should contain
1912 $ref: '#/components/schemas/PredefinedAbuseReasons'
1915 description: plain search that will match with video titles, reporter names and more
1921 $ref: '#/components/schemas/AbuseStateSet'
1922 - name: searchReporter
1924 description: only list reports of a specific reporter
1927 - name: searchReportee
1928 description: only list reports of a specific reportee
1934 description: only list reports of a specific video
1937 - name: searchVideoChannel
1939 description: only list reports of a specific video channel
1944 description: only list blacklisted or deleted videos
1952 description: only list account, comment or video reports
1959 - $ref: '#/components/parameters/start'
1960 - $ref: '#/components/parameters/count'
1961 - $ref: '#/components/parameters/abusesSort'
1964 description: successful operation
1970 $ref: '#/components/schemas/Abuse'
1973 summary: Report an abuse
1986 description: Reason why the user reports this video
1991 $ref: '#/components/schemas/PredefinedAbuseReasons'
1996 description: Video id to report
2000 description: Timestamp in the video that marks the beginning of the report
2004 description: Timestamp in the video that marks the ending of the report
2010 description: Comment id to report
2016 description: Account id to report
2022 description: successful operation
2024 description: incorrect request parameters
2025 '/abuses/{abuseId}':
2027 summary: Update an abuse
2035 - $ref: '#/components/parameters/abuseId'
2043 $ref: '#/components/schemas/AbuseStateSet'
2046 description: Update the report comment visible only to the moderation team
2051 description: successful operation
2053 description: abuse not found
2057 summary: Delete an abuse
2063 - $ref: '#/components/parameters/abuseId'
2066 description: successful operation
2068 description: block not found
2069 '/abuses/{abuseId}/messages':
2071 summary: List messages of an abuse
2077 - $ref: '#/components/parameters/abuseId'
2080 description: successful operation
2086 $ref: '#/components/schemas/AbuseMessage'
2089 summary: Add message to an abuse
2095 - $ref: '#/components/parameters/abuseId'
2104 description: Message to send
2112 description: successful operation
2114 description: incorrect request parameters
2115 '/abuses/{abuseId}/messages/{abuseMessageId}':
2117 summary: Delete an abuse message
2123 - $ref: '#/components/parameters/abuseId'
2124 - $ref: '#/components/parameters/abuseMessageId'
2127 description: successful operation
2129 '/videos/{id}/blacklist':
2131 summary: Block a video
2139 - $ref: '#/components/parameters/idOrUUID'
2142 description: successful operation
2144 summary: Unblock a video by its id
2152 - $ref: '#/components/parameters/idOrUUID'
2155 description: successful operation
2157 description: block not found
2162 summary: List video blocks
2171 list only blocks that match this type:
2175 - `2`: automatic block that needs review
2183 description: plain search that will match with video titles, and more
2186 - $ref: '#/components/parameters/start'
2187 - $ref: '#/components/parameters/count'
2188 - $ref: '#/components/parameters/blacklistsSort'
2191 description: successful operation
2203 $ref: '#/components/schemas/VideoBlacklist'
2204 /videos/{id}/captions:
2206 summary: List captions of a video
2210 - $ref: '#/components/parameters/idOrUUID'
2213 description: successful operation
2225 $ref: '#/components/schemas/VideoCaption'
2226 /videos/{id}/captions/{captionLanguage}:
2228 summary: Add or replace a video caption
2235 - $ref: '#/components/parameters/idOrUUID'
2236 - $ref: '#/components/parameters/captionLanguage'
2239 multipart/form-data:
2244 description: The file to upload.
2249 contentType: text/vtt, application/x-subrip, text/plain
2252 description: successful operation
2254 description: video or language not found
2256 summary: Delete a video caption
2263 - $ref: '#/components/parameters/idOrUUID'
2264 - $ref: '#/components/parameters/captionLanguage'
2267 description: successful operation
2269 description: video or language or caption for that language not found
2272 summary: List video channels
2276 - $ref: '#/components/parameters/start'
2277 - $ref: '#/components/parameters/count'
2278 - $ref: '#/components/parameters/sort'
2281 description: successful operation
2293 $ref: '#/components/schemas/VideoChannel'
2295 summary: Create a video channel
2302 description: successful operation
2307 $ref: '#/components/schemas/VideoChannelCreate'
2308 '/video-channels/{channelHandle}':
2310 summary: Get a video channel
2314 - $ref: '#/components/parameters/channelHandle'
2317 description: successful operation
2321 $ref: '#/components/schemas/VideoChannel'
2323 summary: Update a video channel
2329 - $ref: '#/components/parameters/channelHandle'
2332 description: successful operation
2337 $ref: '#/components/schemas/VideoChannelUpdate'
2339 summary: Delete a video channel
2345 - $ref: '#/components/parameters/channelHandle'
2348 description: successful operation
2349 '/video-channels/{channelHandle}/videos':
2351 summary: List videos of a video channel
2356 - $ref: '#/components/parameters/channelHandle'
2357 - $ref: '#/components/parameters/categoryOneOf'
2358 - $ref: '#/components/parameters/isLive'
2359 - $ref: '#/components/parameters/tagsOneOf'
2360 - $ref: '#/components/parameters/tagsAllOf'
2361 - $ref: '#/components/parameters/licenceOneOf'
2362 - $ref: '#/components/parameters/languageOneOf'
2363 - $ref: '#/components/parameters/nsfw'
2364 - $ref: '#/components/parameters/filter'
2365 - $ref: '#/components/parameters/skipCount'
2366 - $ref: '#/components/parameters/start'
2367 - $ref: '#/components/parameters/count'
2368 - $ref: '#/components/parameters/videosSort'
2371 description: successful operation
2375 $ref: '#/components/schemas/VideoListResponse'
2376 '/video-channels/{channelHandle}/avatar/pick':
2378 summary: Update channel avatar
2384 - $ref: '#/components/parameters/channelHandle'
2387 description: successful operation
2394 $ref: '#/components/schemas/ActorImage'
2396 description: image file too large
2398 X-File-Maximum-Size:
2402 description: Maximum file size for the avatar
2405 multipart/form-data:
2410 description: The file to upload.
2415 contentType: image/png, image/jpeg
2416 '/video-channels/{channelHandle}/avatar':
2418 summary: Delete channel avatar
2424 - $ref: '#/components/parameters/channelHandle'
2427 description: successful operation
2430 '/video-channels/{channelHandle}/banner/pick':
2432 summary: Update channel banner
2438 - $ref: '#/components/parameters/channelHandle'
2441 description: successful operation
2448 $ref: '#/components/schemas/ActorImage'
2450 description: image file too large
2452 X-File-Maximum-Size:
2456 description: Maximum file size for the banner
2459 multipart/form-data:
2464 description: The file to upload.
2469 contentType: image/png, image/jpeg
2470 '/video-channels/{channelHandle}/banner':
2472 summary: Delete channel banner
2478 - $ref: '#/components/parameters/channelHandle'
2481 description: successful operation
2483 /video-playlists/privacies:
2485 summary: List available playlist privacies
2490 description: successful operation
2499 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
2503 summary: List video playlists
2507 - $ref: '#/components/parameters/start'
2508 - $ref: '#/components/parameters/count'
2509 - $ref: '#/components/parameters/sort'
2512 description: successful operation
2524 $ref: '#/components/schemas/VideoPlaylist'
2526 summary: Create a video playlist
2527 description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
2534 description: successful operation
2546 $ref: '#/components/schemas/UUIDv4'
2549 multipart/form-data:
2554 description: Video playlist display name
2559 description: Video playlist thumbnail file
2563 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2565 description: Video playlist description
2568 description: Video channel in which the playlist will be published
2574 contentType: image/jpeg
2576 /video-playlists/{id}:
2578 summary: Get a video playlist
2582 - $ref: '#/components/parameters/idOrUUID'
2585 description: successful operation
2589 $ref: '#/components/schemas/VideoPlaylist'
2591 summary: Update a video playlist
2592 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
2599 description: successful operation
2601 - $ref: '#/components/parameters/idOrUUID'
2604 multipart/form-data:
2609 description: Video playlist display name
2614 description: Video playlist thumbnail file
2618 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2620 description: Video playlist description
2623 description: Video channel in which the playlist will be published
2627 contentType: image/jpeg
2629 summary: Delete a video playlist
2635 - $ref: '#/components/parameters/idOrUUID'
2638 description: successful operation
2640 /video-playlists/{id}/videos:
2642 summary: 'List videos of a playlist'
2647 - $ref: '#/components/parameters/idOrUUID'
2650 description: successful operation
2654 $ref: '#/components/schemas/VideoListResponse'
2656 summary: 'Add a video in a playlist'
2663 - $ref: '#/components/parameters/idOrUUID'
2666 description: successful operation
2672 videoPlaylistElement:
2685 description: 'Video to add in the playlist'
2688 description: 'Start the video at this specific timestamp (in seconds)'
2691 description: 'Stop the video at this specific timestamp (in seconds)'
2695 /video-playlists/{id}/videos/reorder:
2697 summary: 'Reorder a playlist'
2703 - $ref: '#/components/parameters/idOrUUID'
2706 description: successful operation
2715 description: 'Start position of the element to reorder'
2717 insertAfterPosition:
2719 description: 'New position for the block to reorder, to add the block before the first element'
2723 description: 'How many element from `startPosition` to reorder'
2727 - insertAfterPosition
2729 /video-playlists/{id}/videos/{playlistElementId}:
2731 summary: 'Update a playlist element'
2737 - $ref: '#/components/parameters/idOrUUID'
2738 - $ref: '#/components/parameters/playlistElementId'
2741 description: successful operation
2750 description: 'Start the video at this specific timestamp (in seconds)'
2753 description: 'Stop the video at this specific timestamp (in seconds)'
2755 summary: 'Delete an element from a playlist'
2761 - $ref: '#/components/parameters/idOrUUID'
2762 - $ref: '#/components/parameters/playlistElementId'
2765 description: successful operation
2767 '/users/me/video-playlists/videos-exist':
2769 summary: 'Check video exists in my playlists'
2778 description: The video ids to check
2785 description: successful operation
2805 '/accounts/{name}/video-channels':
2807 summary: List video channels of an account
2812 - $ref: '#/components/parameters/name'
2815 description: include view statistics for the last 30 days (only if authentified as the account user)
2818 - $ref: '#/components/parameters/start'
2819 - $ref: '#/components/parameters/count'
2820 - $ref: '#/components/parameters/sort'
2823 description: successful operation
2834 $ref: '#/components/schemas/VideoChannel'
2835 '/accounts/{name}/ratings':
2837 summary: List ratings of an account
2843 - $ref: '#/components/parameters/name'
2844 - $ref: '#/components/parameters/start'
2845 - $ref: '#/components/parameters/count'
2846 - $ref: '#/components/parameters/sort'
2850 description: Optionally filter which ratings to retrieve
2858 description: successful operation
2864 $ref: '#/components/schemas/VideoRating'
2865 '/videos/{id}/comment-threads':
2867 summary: List threads of a video
2871 - $ref: '#/components/parameters/idOrUUID'
2872 - $ref: '#/components/parameters/start'
2873 - $ref: '#/components/parameters/count'
2874 - $ref: '#/components/parameters/commentsSort'
2877 description: successful operation
2881 $ref: '#/components/schemas/CommentThreadResponse'
2883 summary: Create a thread
2889 - $ref: '#/components/parameters/idOrUUID'
2892 description: successful operation
2896 $ref: '#/components/schemas/CommentThreadPostResponse'
2898 description: video does not exist
2907 description: 'Text comment'
2911 '/videos/{id}/comment-threads/{threadId}':
2913 summary: Get a thread
2917 - $ref: '#/components/parameters/idOrUUID'
2918 - $ref: '#/components/parameters/threadId'
2921 description: successful operation
2925 $ref: '#/components/schemas/VideoCommentThreadTree'
2926 '/videos/{id}/comments/{commentId}':
2928 summary: Reply to a thread of a video
2934 - $ref: '#/components/parameters/idOrUUID'
2935 - $ref: '#/components/parameters/commentId'
2938 description: successful operation
2942 $ref: '#/components/schemas/CommentThreadPostResponse'
2944 description: thread or video does not exist
2953 description: 'Text comment'
2958 summary: Delete a comment or a reply
2964 - $ref: '#/components/parameters/idOrUUID'
2965 - $ref: '#/components/parameters/commentId'
2968 description: successful operation
2970 description: cannot remove comment of another user
2972 description: comment or video does not exist
2974 description: comment is already deleted
2975 '/videos/{id}/rate':
2977 summary: Like/dislike a video
2983 - $ref: '#/components/parameters/idOrUUID'
2986 description: successful operation
2988 description: video does not exist
2993 summary: Search videos
2998 allowEmptyValue: false
3000 String to search. If the user can make a remote URI search, and the string is an URI then the
3001 PeerTube instance will fetch the remote object and add it to its database. Then,
3002 you can use the REST API to fetch the complete video information and interact with it.
3005 - $ref: '#/components/parameters/categoryOneOf'
3006 - $ref: '#/components/parameters/isLive'
3007 - $ref: '#/components/parameters/tagsOneOf'
3008 - $ref: '#/components/parameters/tagsAllOf'
3009 - $ref: '#/components/parameters/licenceOneOf'
3010 - $ref: '#/components/parameters/languageOneOf'
3011 - $ref: '#/components/parameters/nsfw'
3012 - $ref: '#/components/parameters/filter'
3013 - $ref: '#/components/parameters/skipCount'
3014 - $ref: '#/components/parameters/start'
3015 - $ref: '#/components/parameters/count'
3016 - $ref: '#/components/parameters/searchTarget'
3017 - $ref: '#/components/parameters/videosSearchSort'
3020 description: Get videos that are published after this date
3026 description: Get videos that are published before this date
3030 - name: originallyPublishedStartDate
3032 description: Get videos that are originally published after this date
3036 - name: originallyPublishedEndDate
3038 description: Get videos that are originally published before this date
3044 description: Get videos that have this minimum duration
3049 description: Get videos that have this maximum duration
3053 'searchTarget === search-index':
3054 $ref: '#/components/callbacks/searchIndex'
3057 description: successful operation
3061 $ref: '#/components/schemas/VideoListResponse'
3063 description: search index unavailable
3064 /search/video-channels:
3068 summary: Search channels
3074 String to search. If the user can make a remote URI search, and the string is an URI then the
3075 PeerTube instance will fetch the remote object and add it to its database. Then,
3076 you can use the REST API to fetch the complete channel information and interact with it.
3079 - $ref: '#/components/parameters/start'
3080 - $ref: '#/components/parameters/count'
3081 - $ref: '#/components/parameters/searchTarget'
3082 - $ref: '#/components/parameters/sort'
3084 'searchTarget === search-index':
3085 $ref: '#/components/callbacks/searchIndex'
3088 description: successful operation
3094 $ref: '#/components/schemas/VideoChannel'
3096 description: search index unavailable
3097 /blocklist/accounts:
3101 summary: List account blocks
3106 - $ref: '#/components/parameters/start'
3107 - $ref: '#/components/parameters/count'
3108 - $ref: '#/components/parameters/sort'
3111 description: successful operation
3115 summary: Block an account
3127 example: chocobozzz@example.org
3128 description: account to block, in the form `username@domain`
3133 description: successful operation
3135 description: self-blocking forbidden
3136 '/blocklist/accounts/{accountName}':
3140 summary: Unblock an account by its handle
3148 description: account to unblock, in the form `username@domain`
3153 description: successful operation
3155 description: account or account block does not exist
3160 summary: List server blocks
3165 - $ref: '#/components/parameters/start'
3166 - $ref: '#/components/parameters/count'
3167 - $ref: '#/components/parameters/sort'
3170 description: successful operation
3174 summary: Block a server
3187 description: server domain to block
3192 description: successful operation
3194 description: self-blocking forbidden
3195 '/blocklist/servers/{host}':
3199 summary: Unblock a server by its domain
3207 description: server domain to unblock
3213 description: successful operation
3215 description: account block does not exist
3219 - Instance Redundancy
3220 summary: Update a server redundancy policy
3228 description: server domain to mirror
3240 description: allow mirroring of the host's local videos
3245 description: successful operation
3247 description: server is not already known
3252 summary: List videos being mirrored
3260 description: direction of the mirror
3266 - $ref: '#/components/parameters/start'
3267 - $ref: '#/components/parameters/count'
3268 - $ref: '#/components/parameters/videoRedundanciesSort'
3271 description: successful operation
3277 $ref: '#/components/schemas/VideoRedundancy'
3281 summary: Mirror a video
3297 description: successful operation
3299 description: cannot mirror a local video
3301 description: video does not exist
3303 description: video is already mirrored
3304 /redundancy/videos/{redundancyId}:
3308 summary: Delete a mirror done on a video
3313 - name: redundancyId
3316 description: id of an existing redundancy on a video
3321 description: successful operation
3323 description: video redundancy not found
3324 '/feeds/video-comments.{format}':
3328 summary: List comments on videos
3333 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3346 description: 'limit listing to a specific video'
3351 description: 'limit listing to a specific account'
3356 description: 'limit listing to a specific account'
3359 - name: videoChannelId
3361 description: 'limit listing to a specific video channel'
3364 - name: videoChannelName
3366 description: 'limit listing to a specific video channel'
3371 description: successful operation
3376 default: 'max-age=900' # 15 min cache
3380 $ref: '#/components/schemas/VideoCommentsForXML'
3383 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3384 application/rss+xml:
3386 $ref: '#/components/schemas/VideoCommentsForXML'
3389 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
3392 $ref: '#/components/schemas/VideoCommentsForXML'
3395 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3396 application/atom+xml:
3398 $ref: '#/components/schemas/VideoCommentsForXML'
3401 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
3407 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
3409 x-summary: field inconsistencies
3412 - videoId filter is mixed with a channel filter
3414 description: video, video channel or account not found
3416 description: accept header unsupported
3417 '/feeds/videos.{format}':
3421 summary: List videos
3426 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3439 description: 'limit listing to a specific account'
3444 description: 'limit listing to a specific account'
3447 - name: videoChannelId
3449 description: 'limit listing to a specific video channel'
3452 - name: videoChannelName
3454 description: 'limit listing to a specific video channel'
3457 - $ref: '#/components/parameters/sort'
3458 - $ref: '#/components/parameters/nsfw'
3459 - $ref: '#/components/parameters/filter'
3462 description: successful operation
3467 default: 'max-age=900' # 15 min cache
3471 $ref: '#/components/schemas/VideosForXML'
3474 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
3475 application/rss+xml:
3477 $ref: '#/components/schemas/VideosForXML'
3480 externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
3483 $ref: '#/components/schemas/VideosForXML'
3486 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
3487 application/atom+xml:
3489 $ref: '#/components/schemas/VideosForXML'
3492 externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
3498 externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
3500 description: video channel or account not found
3502 description: accept header unsupported
3503 '/feeds/subscriptions.{format}':
3508 summary: List videos of subscriptions tied to a token
3513 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3526 description: limit listing to a specific account
3532 description: private token allowing access
3536 - $ref: '#/components/parameters/sort'
3537 - $ref: '#/components/parameters/nsfw'
3538 - $ref: '#/components/parameters/filter'
3541 description: successful operation
3546 default: 'max-age=900' # 15 min cache
3550 $ref: '#/components/schemas/VideosForXML'
3551 application/rss+xml:
3553 $ref: '#/components/schemas/VideosForXML'
3556 $ref: '#/components/schemas/VideosForXML'
3557 application/atom+xml:
3559 $ref: '#/components/schemas/VideosForXML'
3564 description: accept header unsupported
3569 summary: List plugins
3582 - $ref: '#/components/parameters/start'
3583 - $ref: '#/components/parameters/count'
3584 - $ref: '#/components/parameters/sort'
3587 description: successful operation
3591 $ref: '#/components/schemas/PluginResponse'
3596 summary: List available plugins
3609 - name: currentPeerTubeEngine
3613 - $ref: '#/components/parameters/start'
3614 - $ref: '#/components/parameters/count'
3615 - $ref: '#/components/parameters/sort'
3618 description: successful operation
3622 $ref: '#/components/schemas/PluginResponse'
3624 description: plugin index unavailable
3629 summary: Install a plugin
3642 example: peertube-plugin-auth-ldap
3645 additionalProperties: false
3652 additionalProperties: false
3655 description: successful operation
3657 description: should have either `npmName` or `path` set
3662 summary: Update a plugin
3675 example: peertube-plugin-auth-ldap
3678 additionalProperties: false
3685 additionalProperties: false
3688 description: successful operation
3690 description: should have either `npmName` or `path` set
3692 description: existing plugin not found
3697 summary: Uninstall a plugin
3709 description: name of the plugin/theme in its package.json
3710 example: peertube-plugin-auth-ldap
3715 description: successful operation
3717 description: existing plugin not found
3722 summary: Get a plugin
3727 - $ref: '#/components/parameters/npmName'
3730 description: successful operation
3734 $ref: '#/components/schemas/Plugin'
3736 description: plugin not found
3737 /plugins/{npmName}/settings:
3741 summary: Set a plugin's settings
3746 - $ref: '#/components/parameters/npmName'
3755 additionalProperties: true
3758 description: successful operation
3760 description: plugin not found
3761 /plugins/{npmName}/public-settings:
3765 summary: Get a plugin's public settings
3767 - $ref: '#/components/parameters/npmName'
3770 description: successful operation
3775 additionalProperties: true
3777 description: plugin not found
3778 /plugins/{npmName}/registered-settings:
3782 summary: Get a plugin's registered settings
3787 - $ref: '#/components/parameters/npmName'
3790 description: successful operation
3795 additionalProperties: true
3797 description: plugin not found
3799 - url: 'https://peertube2.cpy.re/api/v1'
3800 description: Live Test Server (live data - latest nightly version)
3801 - url: 'https://peertube3.cpy.re/api/v1'
3802 description: Live Test Server (live data - latest RC version)
3803 - url: 'https://peertube.cpy.re/api/v1'
3804 description: Live Test Server (live data - stable version)
3811 description: Offset used to paginate results
3819 description: "Number of items to return"
3829 description: Sort column
3837 description: Plain text search, applied to various parts of the model depending on endpoint
3845 If the administrator enabled search index support, you can override the default search target.
3848 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
3849 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
3850 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
3851 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
3852 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
3853 * 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
3854 the data from the origin instance API
3864 description: Sort videos by criteria
3880 description: Sort videos by criteria
3895 description: Sort comments by criteria
3905 description: Sort blacklists by criteria
3921 description: Plain text search that will match with user usernames or emails
3928 description: Filter results down to (un)banned users
3935 description: Sort users by criteria
3946 description: Sort abuses by criteria
3953 videoRedundanciesSort:
3957 description: Sort abuses by criteria
3966 description: The username or handle of the account
3969 example: chocobozzz | chocobozzz@example.org
3974 description: The user id
3983 description: The object id or uuid
3989 - $ref: '#/components/schemas/UUIDv4'
3991 name: playlistElementId
3994 description: Playlist element id
4001 description: Abuse id
4005 name: abuseMessageId
4008 description: Abuse message id
4012 name: captionLanguage
4015 description: The caption language
4022 description: The video channel handle
4025 example: my_username | my_username@example.com
4027 name: subscriptionHandle
4030 description: The subscription handle
4033 example: my_username | my_username@example.com
4038 description: The thread id (root comment id)
4045 description: The comment id
4052 description: whether or not the video is a live
4059 description: category id of the video (see [/videos/categories](#tag/Video/paths/~1videos~1categories/get))
4072 description: tag(s) of the video
4086 description: tag(s) of the video, where all should be present in the video
4099 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
4112 description: licence id of the video (see [/videos/licences](#tag/Video/paths/~1videos~1licences/get))
4125 description: if you don't need the `total` in the response
4136 description: whether to include nsfw videos, if any
4147 Special filters which might require special rights:
4148 * `local` - only videos local to the instance
4149 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
4150 * `all` - all videos, showing private and unlisted videos (requires Admin privileges)
4160 description: list of uris to check if each is part of the user subscriptions
4170 description: name of the plugin/theme on npmjs.com or in its package.json
4173 example: peertube-plugin-auth-ldap
4178 description: job type
4182 - activitypub-follow
4183 - activitypub-http-broadcast
4184 - activitypub-http-fetcher
4185 - activitypub-http-unicast
4191 - activitypub-refresher
4197 Authenticating via OAuth requires the following steps:
4198 - Have an activated account
4199 - [Generate](https://docs.joinpeertube.org/api-rest-getting-started) a
4200 Bearer Token for that account at `/api/v1/users/token`
4201 - Make authenticated requests, putting *Authorization: Bearer <token\>*
4202 - Profit, depending on the role assigned to the account
4204 Note that the __access token is valid for 1 day__ and, and is given
4205 along with a __refresh token valid for 2 weeks__.
4209 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
4212 moderator: Moderator scope
4218 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4219 pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
4220 # the regex above limits the length;
4221 # however, some tools might require explicit settings:
4225 VideoConstantNumber-Category:
4229 description: category id of the video (see [/videos/categories](#tag/Video/paths/~1videos~1categories/get))
4232 VideoConstantNumber-Licence:
4236 description: licence id of the video (see [/videos/licences](#tag/Video/paths/~1videos~1licences/get))
4239 VideoConstantString-Language:
4243 description: language id of the video (see [/videos/languages](#tag/Video/paths/~1videos~1languages/get))
4247 VideoPlaylistPrivacySet:
4253 description: 'The video playlist privacy (Public = `1`, Unlisted = `2`, Private = `3`)'
4254 VideoPlaylistPrivacyConstant:
4257 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4261 VideoPlaylistTypeSet:
4266 description: 'The video playlist type (Regular = `1`, Watch Later = `2`)'
4267 VideoPlaylistTypeConstant:
4270 $ref: '#/components/schemas/VideoPlaylistTypeSet'
4281 description: 'The video privacy (Public = `1`, Unlisted = `2`, Private = `3`, Internal = `4`)'
4282 VideoPrivacyConstant:
4285 $ref: '#/components/schemas/VideoPrivacySet'
4302 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
4309 description: 'Admin flags for the user (None = `0`, Bypass video blacklist = `1`)'
4320 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
4330 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
4334 $ref: '#/components/schemas/AbuseStateSet'
4337 AbusePredefinedReasons:
4350 example: [spamOrMisleading]
4352 VideoResolutionConstant:
4356 description: 'Video resolution (240, 360, 720, 1080, 1440 or 2160)'
4361 VideoScheduledUpdate:
4364 $ref: '#/components/schemas/VideoPrivacySet'
4368 description: When to update the video
4388 - $ref: '#/components/schemas/ActorImage'
4389 VideoChannelSummary:
4406 - $ref: '#/components/schemas/ActorImage'
4418 - $ref: '#/components/schemas/Video'
4424 $ref: '#/components/schemas/VideoResolutionConstant'
4427 description: 'Video file size in bytes'
4430 description: Direct URL of the torrent file
4434 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
4438 description: Direct URL of the video
4442 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
4449 VideoStreamingPlaylists:
4462 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS'
4463 VideoStreamingPlaylists-HLS:
4474 Video files associated to this playlist.
4476 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.)
4478 $ref: '#/components/schemas/VideoFile'
4492 $ref: '#/components/schemas/UUIDv4'
4503 $ref: '#/components/schemas/UUIDv4'
4509 example: 2017-10-01T10:52:46.396Z
4510 description: time at which the video object was first drafted
4514 example: 2018-10-01T10:52:46.396Z
4515 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
4519 example: 2021-05-04T08:01:01.502Z
4520 description: last time the video's metadata was modified
4521 originallyPublishedAt:
4524 example: 2010-10-01T10:52:46.396Z
4525 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
4527 $ref: '#/components/schemas/VideoConstantNumber-Category'
4529 $ref: '#/components/schemas/VideoConstantNumber-Licence'
4531 $ref: '#/components/schemas/VideoConstantString-Language'
4533 $ref: '#/components/schemas/VideoPrivacyConstant'
4537 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n
4538 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr...
4542 truncated description of the video, written in Markdown.
4543 Resolve `descriptionPath` to get the full description of maximum `10000` characters.
4547 description: duration of the video in seconds
4552 example: What is PeerTube?
4557 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
4560 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
4563 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
4579 $ref: '#/components/schemas/VideoStateConstant'
4583 - $ref: '#/components/schemas/VideoScheduledUpdate'
4591 $ref: '#/components/schemas/AccountSummary'
4593 $ref: '#/components/schemas/VideoChannelSummary'
4602 - $ref: '#/components/schemas/Video'
4607 example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description
4608 description: path at which to get the full description of maximum `10000` characters
4611 description: A text tell the audience how to support the video creator
4612 example: Please support my work on <insert crowdfunding plateform>! <3
4616 $ref: '#/components/schemas/VideoChannel'
4618 $ref: '#/components/schemas/Account'
4620 example: [flowers, gardening]
4640 $ref: '#/components/schemas/VideoFile'
4642 WebTorrent/raw video files. If WebTorrent is disabled on the server:
4644 - field will be empty
4645 - video files will be found in `streamingPlaylists[].files` field
4649 $ref: '#/components/schemas/VideoStreamingPlaylists'
4651 HLS playlists/manifest files. If HLS is disabled on the server:
4653 - field will be empty
4654 - video files will be found in `files` field
4655 FileRedundancyInformation:
4690 $ref: '#/components/schemas/UUIDv4'
4697 $ref: '#/components/schemas/FileRedundancyInformation'
4701 $ref: '#/components/schemas/FileRedundancyInformation'
4702 VideoImportStateConstant:
4710 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
4722 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
4726 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
4730 $ref: '#/components/schemas/VideoImportStateConstant'
4740 $ref: '#/components/schemas/Video'
4750 $ref: '#/components/schemas/VideoImport'
4758 example: The video is a spam
4762 $ref: '#/components/schemas/AbusePredefinedReasons'
4764 $ref: '#/components/schemas/Account'
4766 $ref: '#/components/schemas/AbuseStateConstant'
4769 example: Decided to ban the server since it spams us regularly
4773 $ref: '#/components/schemas/VideoInfo'
4791 $ref: '#/components/schemas/AccountSummary'
4809 $ref: '#/components/schemas/UUIDv4'
4842 $ref: '#/components/schemas/UUIDv4'
4858 $ref: '#/components/schemas/UUIDv4'
4870 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
4872 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
4874 $ref: '#/components/schemas/AccountSummary'
4876 $ref: '#/components/schemas/VideoChannelSummary'
4900 totalRepliesFromVideoAuthor:
4905 $ref: '#/components/schemas/Account'
4906 VideoCommentThreadTree:
4909 $ref: '#/components/schemas/VideoComment'
4913 $ref: '#/components/schemas/VideoCommentThreadTree'
4917 $ref: '#/components/schemas/VideoConstantString-Language'
4972 $ref: '#/components/schemas/ActorImage'
4975 - $ref: '#/components/schemas/Actor'
4988 description: timestamp within the video, in seconds
5055 allowedForCurrentIP:
5057 requiresEmailVerification:
5261 requiresEmailVerification:
5286 allowAdditionalExtensions:
5356 $ref: '#/components/schemas/Actor'
5358 $ref: '#/components/schemas/Actor'
5361 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
5374 PredefinedAbuseReasons:
5375 description: Reason categories that help triage reports
5407 - activitypub-http-unicast
5408 - activitypub-http-broadcast
5409 - activitypub-http-fetcher
5410 - activitypub-follow
5416 - activitypub-refresher
5420 additionalProperties: true
5423 additionalProperties: true
5447 VideoUploadRequestCommon:
5450 description: Video name
5453 description: Channel id that will contain this video
5456 $ref: '#/components/schemas/VideoPrivacySet'
5458 description: Video category
5462 description: Video licence
5466 description: Video language
5469 description: Video description
5472 description: Whether or not we wait transcoding before publish the video
5475 description: A text tell the audience how to support the video creator
5476 example: Please support my work on <insert crowdfunding plateform>! <3
5479 description: Whether or not this video contains sensitive content
5482 description: Video tags (maximum 5 tags each between 2 and 30 characters)
5492 description: Enable or disable comments for this video
5495 description: Enable or disable downloading for this video
5497 originallyPublishedAt:
5498 description: Date when the content was originally published
5502 $ref: '#/components/schemas/VideoScheduledUpdate'
5504 description: Video thumbnail file
5508 description: Video preview file
5514 VideoUploadRequestLegacy:
5516 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5522 description: Video file
5525 VideoUploadRequestResumable:
5527 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5533 description: Video filename including extension
5537 description: Video thumbnail file
5541 description: Video preview file
5544 VideoUploadResponse:
5553 $ref: '#/components/schemas/UUIDv4'
5554 CommentThreadResponse:
5563 $ref: '#/components/schemas/VideoComment'
5564 CommentThreadPostResponse:
5567 $ref: '#/components/schemas/VideoComment'
5577 $ref: '#/components/schemas/Video'
5581 $ref: '#/components/schemas/Account'
5584 description: Automatically start playing the upcoming video after the currently playing video
5585 autoPlayNextVideoPlaylist:
5587 description: Automatically start playing the video on the playlist after the currently playing video
5590 description: Automatically start playing the video on the watch page
5600 description: The user email
5603 description: Has the user confirmed their email address?
5609 description: Auth plugin to use to authenticate the user
5613 noInstanceConfigWarningModal:
5618 $ref: '#/components/schemas/NSFWPolicy'
5620 $ref: '#/components/schemas/UserRole'
5629 description: Theme enabled by this user
5632 description: The user username
5638 $ref: '#/components/schemas/VideoChannel'
5641 description: The user video quota in bytes
5645 description: The user daily video quota in bytes
5649 description: Enable P2P in the player
5652 - $ref: '#/components/schemas/User'
5654 # optionally present fields: they require WITH_STATS scope
5657 description: Count of videos published
5660 description: Count of reports/abuses of which the user is a target
5661 abusesAcceptedCount:
5663 description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team
5666 description: Count of reports/abuses created by the user
5669 description: Count of comments published
5674 description: The user username
5677 pattern: '/^[a-z0-9._]{1,50}$/'
5681 description: The user password. If the smtp server is configured, you can leave empty and an email will be sent
5687 description: The user email
5690 description: The user video quota
5693 description: The user daily video quota
5696 description: The user default channel username
5697 pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/'
5699 $ref: '#/components/schemas/UserRole'
5701 $ref: '#/components/schemas/UserAdminFlags'
5713 description: The user id
5717 description: The updated email of the user
5720 description: Set the email as verified
5723 description: The updated video quota of the user
5726 description: The updated daily video quota of the user
5730 description: The auth plugin to use to authenticate the user
5731 example: 'peertube-plugin-auth-saml2'
5733 $ref: '#/components/schemas/UserRole'
5735 $ref: '#/components/schemas/UserAdminFlags'
5743 description: Your new password
5749 description: Your new email
5752 description: Your new displayNSFW
5759 description: Your new autoPlayVideo
5769 description: Id of the video
5776 description: Rating of the video
5783 $ref: '#/components/schemas/Video'
5790 description: Rating of the video
5798 description: The username of the user
5801 pattern: '/^[a-z0-9._]{1,50}$/'
5805 description: The password of the user
5811 description: The email of the user
5814 description: The user display name
5822 description: The username for the default channel
5823 pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/'
5826 description: The display name for the default channel
5846 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
5847 example: Please support my work on <insert crowdfunding plateform>! <3
5852 - $ref: '#/components/schemas/VideoChannelCommon'
5863 - $ref: '#/components/schemas/VideoChannelCommon'
5865 bulkVideosSupportUpdate:
5867 description: 'Update the support field for all videos of this channel'
5872 name: 'media:peerLink'
5881 - application/x-bittorrent
5887 name: 'media:content'
5918 VideoCommentsForXML:
5953 description: video watch page URL
5956 description: video canonical URL
5960 description: video publication date
5963 description: video description
5966 description: video description
5969 description: publisher user name
5972 description: video category (MRSS)
5975 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
5990 description: video embed path, relative to the canonical URL domain (MRSS)
5999 description: video watch path, relative to the canonical URL domain (MRSS)
6020 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
6021 'media:description':
6028 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
6031 description: main streamable file for the video
6041 - application/x-bittorrent
6050 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)
6053 - $ref: '#/components/schemas/MRSSPeerLink'
6054 - $ref: '#/components/schemas/MRSSGroupContent'
6055 NotificationSettingValue:
6076 Notification type, following the `UserNotificationType` enum:
6078 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
6080 - `2` NEW_COMMENT_ON_MY_VIDEO
6082 - `3` NEW_ABUSE_FOR_MODERATORS
6084 - `4` BLACKLIST_ON_MY_VIDEO
6086 - `5` UNBLACKLIST_ON_MY_VIDEO
6088 - `6` MY_VIDEO_PUBLISHED
6090 - `7` MY_VIDEO_IMPORT_SUCCESS
6092 - `8` MY_VIDEO_IMPORT_ERROR
6094 - `9` NEW_USER_REGISTRATION
6098 - `11` COMMENT_MENTION
6100 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
6102 - `13` NEW_INSTANCE_FOLLOWER
6104 - `14` AUTO_INSTANCE_FOLLOWING
6110 - $ref: '#/components/schemas/VideoInfo'
6114 $ref: '#/components/schemas/ActorInfo'
6123 $ref: '#/components/schemas/VideoInfo'
6144 $ref: '#/components/schemas/VideoInfo'
6146 $ref: '#/components/schemas/ActorInfo'
6155 - $ref: '#/components/schemas/VideoInfo'
6164 - $ref: '#/components/schemas/VideoInfo'
6168 - $ref: '#/components/schemas/ActorInfo'
6176 $ref: '#/components/schemas/ActorInfo'
6204 NotificationListResponse:
6213 $ref: '#/components/schemas/Notification'
6218 example: peertube-plugin-auth-ldap
6246 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
6249 additionalProperties: true
6265 $ref: '#/components/schemas/Plugin'
6272 description: User can stream multiple times in a permanent live
6281 description: RTMP stream key to use to stream into this live video
6285 description: User can stream multiple times in a permanent live
6292 'https://search.example.org/api/v1/search/videos':
6294 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
6297 description: successful operation
6301 $ref: '#/components/schemas/VideoListResponse'