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 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 an access token. Only __one
31 access 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
44 HTTP 1.1 404 Not Found
45 Content-Type: application/json
49 "error": "Account not found"
53 We provide error codes for [a growing number of cases](https://github.com/Chocobozzz/PeerTube/blob/develop/shared/models/server/server-error-code.enum.ts),
54 but it is still optional.
58 Each parameter is evaluated on its own against a set of rules before the route validator
59 proceeds with potential testing involving parameter combinations. Errors coming from Validation
60 errors appear earlier and benefit from a more detailed error type:
63 HTTP 1.1 400 Bad Request
64 Content-Type: application/json
69 "value": "a117eb-c6a9-4756-bb09-2a956239f",
70 "msg": "Should have a valid id",
78 Where `id` is the name of the field concerned by the error, within the route definition.
79 `errors.<field>.location` can be either 'params', 'body', 'header', 'query' or 'cookies', and
80 `errors.<field>.value` reports the value that didn't pass validation whose `errors.<field>.msg`
85 We are rate-limiting all endpoints of PeerTube's API. Custom values can be set by administrators:
87 | Endpoint (prefix: `/api/v1`) | Calls | Time frame |
88 |------------------------------|---------------|--------------|
89 | `/*` | 50 | 10 seconds |
90 | `POST /users/token` | 15 | 5 minutes |
91 | `POST /users/register` | 2<sup>*</sup> | 5 minutes |
92 | `POST /users/ask-send-verify-email` | 3 | 5 minutes |
94 Depending on the endpoint, <sup>*</sup>failed requests are not taken into account. A service
95 limit is announced by a `429 Too Many Requests` status code.
97 You can get details about the current state of your rate limit by reading the
100 | Header | Description |
101 |-------------------------|------------------------------------------------------------|
102 | `X-RateLimit-Limit` | Number of max requests allowed in the current time period |
103 | `X-RateLimit-Remaining` | Number of remaining requests in the current time period |
104 | `X-RateLimit-Reset` | Timestamp of end of current time period as UNIX timestamp |
105 | `Retry-After` | Seconds to delay after the first `429` is received |
109 This API features [Cross-Origin Resource Sharing (CORS)](https://fetch.spec.whatwg.org/),
110 allowing cross-domain communication from the browser for some routes:
113 |------------------------- ---|
117 | `/live/segments-sha256/*` |
118 | `/.well-known/webfinger` |
120 In addition, all routes serving ActivityPub are CORS-enabled for all origins.
122 url: https://docs.joinpeertube.org/api-rest-reference.html
126 As a visitor, you can use this API to open an account (if registrations are open on
127 that PeerTube instance). As an admin, you should use the dedicated [User creation
128 API](#operation/addUser) instead.
130 x-displayName: Login/Logout
132 Sessions deal with access tokens over time. Only __one session token can currently be used at a time__.
135 Accounts encompass remote accounts discovered across the federation,
136 and correspond to the main Actor, along with video channels a user can create, which
139 When a comment is posted, it is done with your Account's Actor.
142 Using some features of PeerTube require authentication, for which User
143 provide different levels of permission as well as associated user
144 information. Each user has a corresponding local Account for federation.
147 Operations related to your own User, when logged-in.
148 - name: My Subscriptions
150 Operations related to your subscriptions to video channels, their
151 new videos, and how to keep up to date with their latest publications!
154 Operations related to your watch history.
155 - name: My Notifications
157 Notifications following new videos, follows or reports. They allow you
158 to keep track of the interactions and overall important information that
159 concerns you. You MAY set per-notification type delivery preference, to
160 receive the info either by mail, by in-browser notification or both.
163 Each server exposes public information regarding supported videos and
167 Jobs are long-running tasks enqueued and processed by the instance
168 itself. No additional worker registration is currently available.
169 - name: Instance Follows
171 Managing servers which the instance interacts with is crucial to the
172 concept of federation in PeerTube and external video indexation. The PeerTube
173 server then deals with inter-server ActivityPub operations and propagates
174 information across its social graph by posting activities to actors' inbox
177 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-follows
178 - name: Instance Redundancy
180 Redundancy is part of the inter-server solidarity that PeerTube fosters.
181 Manage the list of instances you wish to help by seeding their videos according
182 to the policy of video selection of your choice. Note that you have a similar functionality
183 to mirror individual videos, see [video mirroring](#tag/Video-Mirroring).
185 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-redundancy
188 Managing plugins installed from a local path or from NPM, or search for new ones.
190 url: https://docs.joinpeertube.org/api-plugins
193 Abuses deal with reports of local or remote videos/comments/accounts alike.
196 Operations dealing with listing, uploading, fetching or modifying videos.
199 Operations dealing with adding video or audio. PeerTube supports two upload modes, and three import modes.
203 - [_legacy_](#operation/uploadLegacy), where the video file is sent in a single request
204 - [_resumable_](#operation/uploadResumableInit), where the video file is sent in chunks
206 You can upload videos more reliably by using the resumable variant. Its protocol lets
207 you resume an upload operation after a network interruption or other transmission failure,
208 saving time and bandwidth in the event of network failures.
210 Favor using resumable uploads in any of the following cases:
211 - You are transferring large files
212 - The likelihood of a network interruption is high
213 - Uploads are originating from a device with a low-bandwidth or unstable Internet connection,
214 such as a mobile device
218 - _URL_-based: where the URL points to any service supported by [youtube-dl](https://ytdl-org.github.io/youtube-dl/)
219 - _magnet_-based: where the URI resolves to a BitTorrent ressource containing a single supported video file
220 - _torrent_-based: where the metainfo file resolves to a BitTorrent ressource containing a single supported video file
222 The import function is practical when the desired video/audio is available online. It makes PeerTube
223 download it for you, saving you as much bandwidth and avoiding any instability or limitation your network might have.
224 - name: Video Captions
225 description: Operations dealing with listing, adding and removing closed captions of a video.
226 - name: Video Channels
227 description: Operations dealing with the creation, modification and listing of videos within a channel.
228 - name: Video Comments
230 Operations dealing with comments to a video. Comments are organized in threads: adding a
231 comment in response to the video starts a thread, adding a reply to a comment adds it to
232 its root comment thread.
234 description: Operations dealing with blocking videos (removing them from view and preventing interactions).
236 description: Like/dislike a video.
237 - name: Video Playlists
238 description: Operations dealing with playlists of videos. Playlists are bound to users and/or channels.
240 description: Server syndication feeds
243 The search helps to find _videos_ or _channels_ from within the instance and beyond.
244 Videos from other instances federated by the instance (that is, instances
245 followed by the instance) can be found via keywords and other criteria of
248 Administrators can also enable the use of a remote search system, indexing
249 videos and channels not could be not federated by the instance.
251 description: Get and update the custom homepage
252 - name: Video Mirroring
254 PeerTube instances can mirror videos from one another, and help distribute some videos.
256 For importing videos as your own, refer to [video imports](#operation/importVideo).
279 - Video Ownership Change
295 - name: Instance Configuration
299 - Instance Redundancy
309 summary: Get an account
310 operationId: getAccount
312 - $ref: '#/components/parameters/name'
315 description: successful operation
319 $ref: '#/components/schemas/Account'
321 description: account not found
323 '/accounts/{name}/videos':
328 summary: 'List videos of an account'
329 operationId: getAccountVideos
331 - $ref: '#/components/parameters/name'
332 - $ref: '#/components/parameters/categoryOneOf'
333 - $ref: '#/components/parameters/isLive'
334 - $ref: '#/components/parameters/tagsOneOf'
335 - $ref: '#/components/parameters/tagsAllOf'
336 - $ref: '#/components/parameters/licenceOneOf'
337 - $ref: '#/components/parameters/languageOneOf'
338 - $ref: '#/components/parameters/nsfw'
339 - $ref: '#/components/parameters/filter'
340 - $ref: '#/components/parameters/skipCount'
341 - $ref: '#/components/parameters/start'
342 - $ref: '#/components/parameters/count'
343 - $ref: '#/components/parameters/videosSort'
346 description: successful operation
350 $ref: '#/components/schemas/VideoListResponse'
354 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
355 .then(function(response) {
356 return response.json()
357 }).then(function(data) {
363 curl -s https://peertube2.cpy.re/api/v1/accounts/{name}/videos | jq
369 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
371 http = Net::HTTP.new(uri.host, uri.port)
374 response = http.get(uri.request_uri)
376 puts JSON.parse(response.read_body)
381 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
390 summary: List accounts
391 operationId: getAccounts
393 - $ref: '#/components/parameters/start'
394 - $ref: '#/components/parameters/count'
395 - $ref: '#/components/parameters/sort'
398 description: successful operation
404 $ref: '#/components/schemas/Account'
410 summary: Get instance public configuration
411 operationId: getConfig
414 description: successful operation
418 $ref: '#/components/schemas/ServerConfig'
421 externalValue: https://peertube2.cpy.re/api/v1/config
425 summary: Get instance "About" information
426 operationId: getAbout
431 description: successful operation
435 $ref: '#/components/schemas/ServerConfigAbout'
438 externalValue: https://peertube2.cpy.re/api/v1/config/about
442 summary: Get instance runtime configuration
443 operationId: getCustomConfig
451 description: successful operation
455 $ref: '#/components/schemas/ServerConfigCustom'
457 summary: Set instance runtime configuration
458 operationId: putCustomConfig
466 description: successful operation
468 x-summary: field inconsistencies
471 - the emailer is disabled and the instance is open to registrations
472 - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
474 summary: Delete instance runtime configuration
475 operationId: delCustomConfig
483 description: successful operation
485 /custom-pages/homepage/instance:
487 summary: Get instance custom homepage
492 description: No homepage set
494 description: successful operation
498 $ref: '#/components/schemas/CustomHomepage'
500 summary: Set instance custom homepage
514 description: content of the homepage, that will be injected in the client
517 description: successful operation
521 summary: List instance jobs
532 description: The state of the job ('' for for no filter)
542 - $ref: '#/components/parameters/jobType'
543 - $ref: '#/components/parameters/start'
544 - $ref: '#/components/parameters/count'
545 - $ref: '#/components/parameters/sort'
548 description: successful operation
561 $ref: '#/components/schemas/Job'
567 summary: List instances following the server
569 - $ref: '#/components/parameters/followState'
570 - $ref: '#/components/parameters/actorType'
571 - $ref: '#/components/parameters/start'
572 - $ref: '#/components/parameters/count'
573 - $ref: '#/components/parameters/sort'
576 description: successful operation
588 $ref: '#/components/schemas/Follow'
590 '/server/followers/{nameWithHost}':
592 summary: Remove or reject a follower to your server
602 description: The remote actor handle to remove from your followers
608 description: successful operation
610 description: follower not found
612 '/server/followers/{nameWithHost}/reject':
614 summary: Reject a pending follower to your server
624 description: The remote actor handle to remove from your followers
630 description: successful operation
632 description: follower not found
634 '/server/followers/{nameWithHost}/accept':
636 summary: Accept a pending follower to your server
646 description: The remote actor handle to remove from your followers
652 description: successful operation
654 description: follower not found
660 summary: List instances followed by the server
662 - $ref: '#/components/parameters/followState'
663 - $ref: '#/components/parameters/actorType'
664 - $ref: '#/components/parameters/start'
665 - $ref: '#/components/parameters/count'
666 - $ref: '#/components/parameters/sort'
669 description: successful operation
681 $ref: '#/components/schemas/Follow'
688 summary: Follow a list of servers
691 description: successful operation
693 description: cannot follow a non-HTTPS server
707 '/server/following/{host}':
709 summary: Unfollow a server
719 description: The host to unfollow
725 description: successful operation
727 description: host not found
731 summary: Create a user
740 description: user created
744 $ref: '#/components/schemas/AddUserResponse'
750 id: '$response.body#/user/id'
755 id: '$response.body#/user/id'
760 id: '$response.body#/user/id'
762 description: insufficient authority to create an admin or moderator
767 $ref: '#/components/schemas/AddUser'
769 If the smtp server is configured, you can leave the password empty and an email will be sent
770 asking the user to set it first.
774 operationId: getUsers
781 - $ref: '#/components/parameters/usersSearch'
782 - $ref: '#/components/parameters/usersBlocked'
783 - $ref: '#/components/parameters/start'
784 - $ref: '#/components/parameters/count'
785 - $ref: '#/components/parameters/usersSort'
788 description: successful operation
794 $ref: '#/components/schemas/User'
798 - $ref: '#/components/parameters/id'
800 summary: Delete a user
809 description: successful operation
820 description: include statistics about the user (only available as a moderator/admin)
825 x-summary: successful operation
827 As an admin/moderator, you can request a response augmented with statistics about the user's
828 moderation relations and videos usage, by using the `withStats` parameter.
833 - $ref: '#/components/schemas/User'
834 - $ref: '#/components/schemas/UserWithStats'
836 summary: Update a user
844 description: successful operation
849 $ref: '#/components/schemas/UpdateUser'
852 /oauth-clients/local:
854 summary: Login prerequisite
855 description: You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken).
856 operationId: getOAuthClient
861 description: successful operation
865 $ref: '#/components/schemas/OAuthClient'
867 UseOAuthClientToLogin:
868 operationId: getOAuthToken
870 client_id: '$response.body#/client_id'
871 client_secret: '$response.body#/client_secret'
875 API="https://peertube2.cpy.re/api/v1"
878 curl -s "$API/oauth-clients/local"
883 operationId: getOAuthToken
884 description: With your [client id and secret](#operation/getOAuthClient), you can retrieve an access and refresh tokens.
889 application/x-www-form-urlencoded:
892 - $ref: '#/components/schemas/OAuthToken-password'
893 - $ref: '#/components/schemas/OAuthToken-refresh_token'
895 propertyName: grant_type
897 password: '#/components/schemas/OAuthToken-password'
898 refresh_token: '#/components/schemas/OAuthToken-refresh_token'
901 description: successful operation
912 example: 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0
913 description: valid for 1 day
916 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
917 description: valid for 2 weeks
922 refresh_token_expires_in:
930 API="https://peertube2.cpy.re/api/v1"
931 USERNAME="<your_username>"
932 PASSWORD="<your_password>"
935 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
936 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
937 curl -s "$API/users/token" \
938 --data client_id="$client_id" \
939 --data client_secret="$client_secret" \
940 --data grant_type=password \
941 --data username="$USERNAME" \
942 --data password="$PASSWORD" \
943 | jq -r ".access_token"
948 description: Revokes your access token and its associated refresh token, destroying your current session.
949 operationId: revokeOAuthToken
956 description: successful operation
960 summary: Register a user
961 operationId: registerUser
967 description: successful operation
972 $ref: '#/components/schemas/RegisterUser'
975 /users/{id}/verify-email:
977 summary: Verify a user
978 operationId: verifyUser
980 Following a user registration, the new user will receive an email asking to click a link
986 - $ref: '#/components/parameters/id'
1002 description: successful operation
1004 description: invalid verification string
1006 description: user not found
1008 /users/ask-send-verify-email:
1010 summary: Resend user verification link
1011 operationId: resendEmailToVerifyUser
1017 description: successful operation
1021 summary: Get my user information
1022 operationId: getUserInfo
1030 description: successful operation
1036 $ref: '#/components/schemas/User'
1038 summary: Update my user information
1039 operationId: putUserInfo
1047 description: successful operation
1052 $ref: '#/components/schemas/UpdateMe'
1055 /users/me/videos/imports:
1057 summary: Get video imports of my user
1065 - $ref: '#/components/parameters/start'
1066 - $ref: '#/components/parameters/count'
1067 - $ref: '#/components/parameters/sort'
1070 description: successful operation
1074 $ref: '#/components/schemas/VideoImportsList'
1076 /users/me/video-quota-used:
1078 summary: Get my user used quota
1086 description: successful operation
1094 description: The user video quota used so far in bytes
1095 example: 16810141515
1096 videoQuotaUsedDaily:
1098 description: The user video quota used today in bytes
1101 '/users/me/videos/{videoId}/rating':
1103 summary: Get rate of my user for a video
1113 description: The video id
1115 $ref: '#/components/schemas/Video/properties/id'
1118 description: successful operation
1122 $ref: '#/components/schemas/GetMeVideoRating'
1126 summary: Get videos of my user
1134 - $ref: '#/components/parameters/start'
1135 - $ref: '#/components/parameters/count'
1136 - $ref: '#/components/parameters/sort'
1139 description: successful operation
1143 $ref: '#/components/schemas/VideoListResponse'
1145 /users/me/subscriptions:
1147 summary: Get my user subscriptions
1154 - $ref: '#/components/parameters/start'
1155 - $ref: '#/components/parameters/count'
1156 - $ref: '#/components/parameters/sort'
1159 description: successful operation
1163 $ref: '#/components/schemas/VideoChannelList'
1167 summary: Add subscription to my user
1180 description: uri of the video channels to subscribe to
1186 uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr
1189 description: successful operation
1191 /users/me/subscriptions/exist:
1193 summary: Get if subscriptions exist for my user
1200 - $ref: '#/components/parameters/subscriptionsUris'
1203 description: successful operation
1209 /users/me/subscriptions/videos:
1211 summary: List videos of subscriptions of my user
1219 - $ref: '#/components/parameters/categoryOneOf'
1220 - $ref: '#/components/parameters/isLive'
1221 - $ref: '#/components/parameters/tagsOneOf'
1222 - $ref: '#/components/parameters/tagsAllOf'
1223 - $ref: '#/components/parameters/licenceOneOf'
1224 - $ref: '#/components/parameters/languageOneOf'
1225 - $ref: '#/components/parameters/nsfw'
1226 - $ref: '#/components/parameters/filter'
1227 - $ref: '#/components/parameters/skipCount'
1228 - $ref: '#/components/parameters/start'
1229 - $ref: '#/components/parameters/count'
1230 - $ref: '#/components/parameters/videosSort'
1233 description: successful operation
1237 $ref: '#/components/schemas/VideoListResponse'
1239 '/users/me/subscriptions/{subscriptionHandle}':
1241 summary: Get subscription of my user
1248 - $ref: '#/components/parameters/subscriptionHandle'
1251 description: successful operation
1255 $ref: '#/components/schemas/VideoChannel'
1257 summary: Delete subscription of my user
1264 - $ref: '#/components/parameters/subscriptionHandle'
1267 description: successful operation
1269 /users/me/notifications:
1271 summary: List my notifications
1279 description: only list unread notifications
1282 - $ref: '#/components/parameters/start'
1283 - $ref: '#/components/parameters/count'
1284 - $ref: '#/components/parameters/sort'
1287 description: successful operation
1291 $ref: '#/components/schemas/NotificationListResponse'
1293 /users/me/notifications/read:
1295 summary: Mark notifications as read by their id
1308 description: ids of the notifications to mark as read
1315 description: successful operation
1317 /users/me/notifications/read-all:
1319 summary: Mark all my notification as read
1326 description: successful operation
1328 /users/me/notification-settings:
1330 summary: Update my notification settings
1341 newVideoFromSubscription:
1342 $ref: '#/components/schemas/NotificationSettingValue'
1343 newCommentOnMyVideo:
1344 $ref: '#/components/schemas/NotificationSettingValue'
1346 $ref: '#/components/schemas/NotificationSettingValue'
1347 videoAutoBlacklistAsModerator:
1348 $ref: '#/components/schemas/NotificationSettingValue'
1350 $ref: '#/components/schemas/NotificationSettingValue'
1352 $ref: '#/components/schemas/NotificationSettingValue'
1353 myVideoImportFinished:
1354 $ref: '#/components/schemas/NotificationSettingValue'
1356 $ref: '#/components/schemas/NotificationSettingValue'
1357 newUserRegistration:
1358 $ref: '#/components/schemas/NotificationSettingValue'
1360 $ref: '#/components/schemas/NotificationSettingValue'
1361 newInstanceFollower:
1362 $ref: '#/components/schemas/NotificationSettingValue'
1363 autoInstanceFollowing:
1364 $ref: '#/components/schemas/NotificationSettingValue'
1367 description: successful operation
1369 /users/me/history/videos:
1371 summary: List watched videos history
1377 - $ref: '#/components/parameters/start'
1378 - $ref: '#/components/parameters/count'
1379 - $ref: '#/components/parameters/search'
1382 description: successful operation
1386 $ref: '#/components/schemas/VideoListResponse'
1388 /users/me/history/videos/remove:
1390 summary: Clear video history
1397 multipart/form-data:
1402 description: history before this date will be deleted
1407 description: successful operation
1409 /users/me/avatar/pick:
1411 summary: Update my user avatar
1418 description: successful operation
1425 $ref: '#/components/schemas/ActorImage'
1427 description: image file too large
1429 X-File-Maximum-Size:
1433 description: Maximum file size for the avatar
1436 multipart/form-data:
1441 description: The file to upload
1446 contentType: image/png, image/jpeg
1450 summary: Delete my avatar
1457 description: successful operation
1461 summary: List video ownership changes
1463 - Video Ownership Change
1468 description: successful operation
1470 '/videos/ownership/{id}/accept':
1472 summary: Accept ownership change request
1474 - Video Ownership Change
1478 - $ref: '#/components/parameters/idOrUUID'
1481 description: successful operation
1483 description: cannot terminate an ownership change of another user
1485 description: video owneship change not found
1487 '/videos/ownership/{id}/refuse':
1489 summary: Refuse ownership change request
1491 - Video Ownership Change
1495 - $ref: '#/components/parameters/idOrUUID'
1498 description: successful operation
1500 description: cannot terminate an ownership change of another user
1502 description: video owneship change not found
1504 '/videos/{id}/give-ownership':
1506 summary: Request ownership change
1508 - Video Ownership Change
1512 - $ref: '#/components/parameters/idOrUUID'
1516 application/x-www-form-urlencoded:
1526 description: successful operation
1528 description: changing video ownership to a remote account is not supported yet
1530 description: video not found
1534 summary: List videos
1535 operationId: getVideos
1539 - $ref: '#/components/parameters/categoryOneOf'
1540 - $ref: '#/components/parameters/isLive'
1541 - $ref: '#/components/parameters/tagsOneOf'
1542 - $ref: '#/components/parameters/tagsAllOf'
1543 - $ref: '#/components/parameters/licenceOneOf'
1544 - $ref: '#/components/parameters/languageOneOf'
1545 - $ref: '#/components/parameters/nsfw'
1546 - $ref: '#/components/parameters/filter'
1547 - $ref: '#/components/parameters/skipCount'
1548 - $ref: '#/components/parameters/start'
1549 - $ref: '#/components/parameters/count'
1550 - $ref: '#/components/parameters/videosSort'
1553 description: successful operation
1557 $ref: '#/components/schemas/VideoListResponse'
1561 summary: List available video categories
1562 operationId: getCategories
1567 description: successful operation
1576 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
1580 summary: List available video licences
1581 operationId: getLicences
1586 description: successful operation
1595 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
1599 summary: List available video languages
1600 operationId: getLanguages
1605 description: successful operation
1614 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
1618 summary: List available video privacy policies
1619 operationId: getPrivacyPolicies
1624 description: successful operation
1633 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
1637 summary: Update a video
1638 operationId: putVideo
1644 - $ref: '#/components/parameters/idOrUUID'
1647 description: successful operation
1650 multipart/form-data:
1655 description: Video thumbnail file
1659 description: Video preview file
1663 $ref: '#/components/schemas/VideoCategorySet'
1665 $ref: '#/components/schemas/VideoLicenceSet'
1667 $ref: '#/components/schemas/VideoLanguageSet'
1669 $ref: '#/components/schemas/VideoPrivacySet'
1671 description: Video description
1674 description: Whether or not we wait transcoding before publish the video
1677 description: A text tell the audience how to support the video creator
1678 example: Please support our work on https://soutenir.framasoft.org/en/ <3
1681 description: Whether or not this video contains sensitive content
1684 description: Video name
1689 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1698 description: Enable or disable comments for this video
1700 originallyPublishedAt:
1701 description: Date when the content was originally published
1705 $ref: '#/components/schemas/VideoScheduledUpdate'
1708 contentType: image/jpeg
1710 contentType: image/jpeg
1712 summary: Get a video
1713 operationId: getVideo
1717 - $ref: '#/components/parameters/idOrUUID'
1720 description: successful operation
1724 $ref: '#/components/schemas/VideoDetails'
1726 summary: Delete a video
1727 operationId: delVideo
1733 - $ref: '#/components/parameters/idOrUUID'
1736 description: successful operation
1738 '/videos/{id}/description':
1740 summary: Get complete video description
1741 operationId: getVideoDesc
1745 - $ref: '#/components/parameters/idOrUUID'
1748 description: successful operation
1757 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n**Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**
1759 '/videos/{id}/views':
1761 summary: Add a view to a video
1765 - $ref: '#/components/parameters/idOrUUID'
1768 description: successful operation
1770 '/videos/{id}/watching':
1772 summary: Set watching progress of a video
1778 - $ref: '#/components/parameters/idOrUUID'
1783 $ref: '#/components/schemas/UserWatchingVideo'
1787 description: successful operation
1791 summary: Upload a video
1792 description: Uses a single request to upload a video.
1793 operationId: uploadLegacy
1801 description: successful operation
1805 $ref: '#/components/schemas/VideoUploadResponse'
1807 description: invalid file field, schedule date or parameter
1809 description: video didn't pass upload filter
1811 description: upload has timed out
1813 description: video file too large, due to quota or max body size limit set by the reverse-proxy
1815 X-File-Maximum-Size:
1819 description: Maximum file size for the video
1821 description: video type unsupported
1823 description: video unreadable
1826 multipart/form-data:
1828 $ref: '#/components/schemas/VideoUploadRequestLegacy'
1831 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1833 contentType: image/jpeg
1835 contentType: image/jpeg
1840 USERNAME="<your_username>"
1841 PASSWORD="<your_password>"
1842 FILE_PATH="<your_file_path>"
1843 CHANNEL_ID="<your_channel_id>"
1845 API="https://peertube2.cpy.re/api/v1"
1848 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
1849 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
1850 token=$(curl -s "$API/users/token" \
1851 --data client_id="$client_id" \
1852 --data client_secret="$client_secret" \
1853 --data grant_type=password \
1854 --data username="$USERNAME" \
1855 --data password="$PASSWORD" \
1856 | jq -r ".access_token")
1859 curl -s "$API/videos/upload" \
1860 -H "Authorization: Bearer $token" \
1862 --form videofile=@"$FILE_PATH" \
1863 --form channelId=$CHANNEL_ID \
1866 /videos/upload-resumable:
1868 summary: Initialize the resumable upload of a video
1869 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video
1870 operationId: uploadResumableInit
1877 - name: X-Upload-Content-Length
1883 description: Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading.
1884 - name: X-Upload-Content-Type
1891 description: MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.
1896 $ref: '#/components/schemas/VideoUploadRequestResumable'
1899 description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead
1901 description: created
1907 example: /api/v1/videos/upload-resumable?upload_id=471e97554f21dec3b8bb5d4602939c51
1913 description: invalid file field, schedule date or parameter
1915 description: video file too large, due to quota, absolute max file size or concurrent partial upload limit
1917 description: video type unsupported
1919 summary: Send chunk for the resumable upload of a video
1920 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
1921 operationId: uploadResumable
1932 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
1933 not valid anymore and you need to initialize a new upload.
1936 - name: Content-Range
1940 example: bytes 0-262143/2469036
1943 Specifies the bytes in the file that the request is uploading.
1945 For example, a value of `bytes 0-262143/1000000` shows that the request is sending the first
1946 262144 bytes (256 x 1024) in a 2,469,036 byte file.
1947 - name: Content-Length
1954 Size of the chunk that the request is sending.
1956 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)
1957 doesn't mandate for chunks to have the same size throughout the upload sequence.
1959 Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from
1960 1048576 bytes (~1MB) and increases or reduces size depending on connection health.
1963 application/octet-stream:
1969 description: last chunk received
1977 $ref: '#/components/schemas/VideoUploadResponse'
1979 description: resume incomplete
1984 example: bytes=0-262143
1990 description: video didn't pass upload filter
1992 description: video file too large, due to quota or max body size limit set by the reverse-proxy
1994 description: video unreadable
1996 summary: Cancel the resumable upload of a video, deleting any data uploaded so far
1997 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video
1998 operationId: uploadResumableCancel
2009 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
2010 not valid anymore and the upload session has already been deleted with its data ;-)
2013 - name: Content-Length
2021 description: upload cancelled
2030 summary: Import a video
2031 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
2032 operationId: importVideo
2040 multipart/form-data:
2042 $ref: '#/components/schemas/VideoCreateImport'
2045 contentType: application/x-bittorrent
2047 contentType: image/jpeg
2049 contentType: image/jpeg
2052 description: successful operation
2056 $ref: '#/components/schemas/VideoUploadResponse'
2058 description: '`magnetUri` or `targetUrl` or a torrent file missing'
2060 description: video didn't pass pre-import filter
2062 description: HTTP or Torrent/magnetURI import not enabled
2066 summary: Create a live
2067 operationId: addLive
2075 description: successful operation
2079 $ref: '#/components/schemas/VideoUploadResponse'
2081 description: live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
2084 multipart/form-data:
2089 description: Channel id that will contain this live video
2094 description: User can stream multiple times in a permanent live
2097 description: Live video/replay thumbnail file
2101 description: Live video/replay preview file
2105 $ref: '#/components/schemas/VideoPrivacySet'
2107 $ref: '#/components/schemas/VideoCategorySet'
2109 $ref: '#/components/schemas/VideoLicenceSet'
2111 $ref: '#/components/schemas/VideoLanguageSet'
2113 description: Live video/replay description
2116 description: A text tell the audience how to support the creator
2117 example: Please support our work on https://soutenir.framasoft.org/en/ <3
2120 description: Whether or not this live video/replay contains sensitive content
2123 description: Live video/replay name
2128 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
2137 description: Enable or disable comments for this live video/replay
2140 description: Enable or disable downloading for the replay of this live
2147 contentType: image/jpeg
2149 contentType: image/jpeg
2153 summary: Get information about a live
2154 operationId: getLiveId
2161 - $ref: '#/components/parameters/idOrUUID'
2164 description: successful operation
2168 $ref: '#/components/schemas/LiveVideoResponse'
2170 summary: Update information about a live
2171 operationId: updateLiveId
2178 - $ref: '#/components/parameters/idOrUUID'
2183 $ref: '#/components/schemas/LiveVideoUpdate'
2186 description: successful operation
2188 description: bad parameters or trying to update a live that has already started
2190 description: trying to save replay of the live but saving replay is not enabled on the instance
2194 summary: List my abuses
2195 operationId: getMyAbuses
2204 description: only list the report with this id
2210 $ref: '#/components/schemas/AbuseStateSet'
2211 - $ref: '#/components/parameters/abusesSort'
2212 - $ref: '#/components/parameters/start'
2213 - $ref: '#/components/parameters/count'
2216 description: successful operation
2228 $ref: '#/components/schemas/Abuse'
2232 summary: List abuses
2233 operationId: getAbuses
2243 description: only list the report with this id
2246 - name: predefinedReason
2248 description: predefined reason the listed reports should contain
2250 $ref: '#/components/schemas/PredefinedAbuseReasons'
2253 description: plain search that will match with video titles, reporter names and more
2259 $ref: '#/components/schemas/AbuseStateSet'
2260 - name: searchReporter
2262 description: only list reports of a specific reporter
2265 - name: searchReportee
2266 description: only list reports of a specific reportee
2272 description: only list reports of a specific video
2275 - name: searchVideoChannel
2277 description: only list reports of a specific video channel
2282 description: only list blacklisted or deleted videos
2290 description: only list account, comment or video reports
2297 - $ref: '#/components/parameters/start'
2298 - $ref: '#/components/parameters/count'
2299 - $ref: '#/components/parameters/abusesSort'
2302 description: successful operation
2314 $ref: '#/components/schemas/Abuse'
2316 summary: Report an abuse
2329 description: Reason why the user reports this video
2334 $ref: '#/components/schemas/PredefinedAbuseReasons'
2339 description: Video id to report
2341 - $ref: '#/components/schemas/Video/properties/id'
2345 description: Timestamp in the video that marks the beginning of the report
2350 description: Timestamp in the video that marks the ending of the report
2356 description: Comment id to report
2358 - $ref: '#/components/schemas/VideoComment/properties/id'
2363 description: Account id to report
2369 description: successful operation
2379 $ref: '#/components/schemas/id'
2381 description: incorrect request parameters
2383 '/abuses/{abuseId}':
2385 summary: Update an abuse
2393 - $ref: '#/components/parameters/abuseId'
2401 $ref: '#/components/schemas/AbuseStateSet'
2404 description: Update the report comment visible only to the moderation team
2409 description: successful operation
2411 description: abuse not found
2415 summary: Delete an abuse
2421 - $ref: '#/components/parameters/abuseId'
2424 description: successful operation
2426 description: block not found
2428 '/abuses/{abuseId}/messages':
2430 summary: List messages of an abuse
2436 - $ref: '#/components/parameters/abuseId'
2439 description: successful operation
2451 $ref: '#/components/schemas/AbuseMessage'
2453 summary: Add message to an abuse
2459 - $ref: '#/components/parameters/abuseId'
2468 description: Message to send
2476 description: successful operation
2478 description: incorrect request parameters
2480 '/abuses/{abuseId}/messages/{abuseMessageId}':
2482 summary: Delete an abuse message
2488 - $ref: '#/components/parameters/abuseId'
2489 - $ref: '#/components/parameters/abuseMessageId'
2492 description: successful operation
2494 '/videos/{id}/blacklist':
2496 summary: Block a video
2497 operationId: addVideoBlock
2505 - $ref: '#/components/parameters/idOrUUID'
2508 description: successful operation
2510 summary: Unblock a video by its id
2511 operationId: delVideoBlock
2519 - $ref: '#/components/parameters/idOrUUID'
2522 description: successful operation
2524 description: block not found
2530 summary: List video blocks
2531 operationId: getVideoBlocks
2540 list only blocks that match this type:
2544 - `2`: automatic block that needs review
2552 description: plain search that will match with video titles, and more
2555 - $ref: '#/components/parameters/start'
2556 - $ref: '#/components/parameters/count'
2557 - $ref: '#/components/parameters/blacklistsSort'
2560 description: successful operation
2572 $ref: '#/components/schemas/VideoBlacklist'
2574 /videos/{id}/captions:
2576 summary: List captions of a video
2577 operationId: getVideoCaptions
2581 - $ref: '#/components/parameters/idOrUUID'
2584 description: successful operation
2596 $ref: '#/components/schemas/VideoCaption'
2598 /videos/{id}/captions/{captionLanguage}:
2600 summary: Add or replace a video caption
2601 operationId: addVideoCaption
2608 - $ref: '#/components/parameters/idOrUUID'
2609 - $ref: '#/components/parameters/captionLanguage'
2612 multipart/form-data:
2617 description: The file to upload.
2622 contentType: text/vtt, application/x-subrip, text/plain
2625 description: successful operation
2627 description: video or language not found
2629 summary: Delete a video caption
2630 operationId: delVideoCaption
2637 - $ref: '#/components/parameters/idOrUUID'
2638 - $ref: '#/components/parameters/captionLanguage'
2641 description: successful operation
2643 description: video or language or caption for that language not found
2647 summary: List video channels
2648 operationId: getVideoChannels
2652 - $ref: '#/components/parameters/start'
2653 - $ref: '#/components/parameters/count'
2654 - $ref: '#/components/parameters/sort'
2657 description: successful operation
2661 $ref: '#/components/schemas/VideoChannelList'
2663 summary: Create a video channel
2664 operationId: addVideoChannel
2671 description: successful operation
2681 $ref: '#/components/schemas/VideoChannel/properties/id'
2686 $ref: '#/components/schemas/VideoChannelCreate'
2688 '/video-channels/{channelHandle}':
2690 summary: Get a video channel
2691 operationId: getVideoChannel
2695 - $ref: '#/components/parameters/channelHandle'
2698 description: successful operation
2702 $ref: '#/components/schemas/VideoChannel'
2704 summary: Update a video channel
2705 operationId: putVideoChannel
2711 - $ref: '#/components/parameters/channelHandle'
2714 description: successful operation
2719 $ref: '#/components/schemas/VideoChannelUpdate'
2721 summary: Delete a video channel
2722 operationId: delVideoChannel
2728 - $ref: '#/components/parameters/channelHandle'
2731 description: successful operation
2733 '/video-channels/{channelHandle}/videos':
2735 summary: List videos of a video channel
2736 operationId: getVideoChannelVideos
2741 - $ref: '#/components/parameters/channelHandle'
2742 - $ref: '#/components/parameters/categoryOneOf'
2743 - $ref: '#/components/parameters/isLive'
2744 - $ref: '#/components/parameters/tagsOneOf'
2745 - $ref: '#/components/parameters/tagsAllOf'
2746 - $ref: '#/components/parameters/licenceOneOf'
2747 - $ref: '#/components/parameters/languageOneOf'
2748 - $ref: '#/components/parameters/nsfw'
2749 - $ref: '#/components/parameters/filter'
2750 - $ref: '#/components/parameters/skipCount'
2751 - $ref: '#/components/parameters/start'
2752 - $ref: '#/components/parameters/count'
2753 - $ref: '#/components/parameters/videosSort'
2756 description: successful operation
2760 $ref: '#/components/schemas/VideoListResponse'
2762 '/video-channels/{channelHandle}/avatar/pick':
2764 summary: Update channel avatar
2770 - $ref: '#/components/parameters/channelHandle'
2773 description: successful operation
2780 $ref: '#/components/schemas/ActorImage'
2782 description: image file too large
2784 X-File-Maximum-Size:
2788 description: Maximum file size for the avatar
2791 multipart/form-data:
2796 description: The file to upload.
2801 contentType: image/png, image/jpeg
2803 '/video-channels/{channelHandle}/avatar':
2805 summary: Delete channel avatar
2811 - $ref: '#/components/parameters/channelHandle'
2814 description: successful operation
2816 '/video-channels/{channelHandle}/banner/pick':
2818 summary: Update channel banner
2824 - $ref: '#/components/parameters/channelHandle'
2827 description: successful operation
2834 $ref: '#/components/schemas/ActorImage'
2836 description: image file too large
2838 X-File-Maximum-Size:
2842 description: Maximum file size for the banner
2845 multipart/form-data:
2850 description: The file to upload.
2855 contentType: image/png, image/jpeg
2857 '/video-channels/{channelHandle}/banner':
2859 summary: Delete channel banner
2865 - $ref: '#/components/parameters/channelHandle'
2868 description: successful operation
2870 /video-playlists/privacies:
2872 summary: List available playlist privacy policies
2873 operationId: getPlaylistPrivacyPolicies
2878 description: successful operation
2887 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
2891 summary: List video playlists
2892 operationId: getPlaylists
2896 - $ref: '#/components/parameters/start'
2897 - $ref: '#/components/parameters/count'
2898 - $ref: '#/components/parameters/sort'
2901 description: successful operation
2913 $ref: '#/components/schemas/VideoPlaylist'
2915 summary: Create a video playlist
2916 description: If the video playlist is set as public, `videoChannelId` is mandatory.
2917 operationId: addPlaylist
2924 description: successful operation
2934 $ref: '#/components/schemas/VideoPlaylist/properties/id'
2936 $ref: '#/components/schemas/VideoPlaylist/properties/uuid'
2939 multipart/form-data:
2944 description: Video playlist display name
2949 description: Video playlist thumbnail file
2953 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2955 description: Video playlist description
2961 - $ref: '#/components/schemas/id'
2962 description: Video channel in which the playlist will be published
2967 contentType: image/jpeg
2969 /video-playlists/{playlistId}:
2971 summary: Get a video playlist
2975 - $ref: '#/components/parameters/playlistId'
2978 description: successful operation
2982 $ref: '#/components/schemas/VideoPlaylist'
2984 summary: Update a video playlist
2985 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
2992 description: successful operation
2994 - $ref: '#/components/parameters/playlistId'
2997 multipart/form-data:
3002 description: Video playlist display name
3007 description: Video playlist thumbnail file
3011 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
3013 description: Video playlist description
3017 - $ref: '#/components/schemas/id'
3018 description: Video channel in which the playlist will be published
3021 contentType: image/jpeg
3023 summary: Delete a video playlist
3029 - $ref: '#/components/parameters/playlistId'
3032 description: successful operation
3034 /video-playlists/{playlistId}/videos:
3036 summary: 'List videos of a playlist'
3037 operationId: getVideoPlaylistVideos
3042 - $ref: '#/components/parameters/playlistId'
3045 description: successful operation
3049 $ref: '#/components/schemas/VideoListResponse'
3051 summary: Add a video in a playlist
3052 operationId: addVideoPlaylistVideo
3059 - $ref: '#/components/parameters/playlistId'
3062 description: successful operation
3068 videoPlaylistElement:
3082 - $ref: '#/components/schemas/Video/properties/uuid'
3083 - $ref: '#/components/schemas/Video/properties/id'
3084 description: Video to add in the playlist
3088 description: Start the video at this specific timestamp
3092 description: Stop the video at this specific timestamp
3096 /video-playlists/{playlistId}/videos/reorder:
3098 summary: 'Reorder a playlist'
3099 operationId: reorderVideoPlaylist
3105 - $ref: '#/components/parameters/playlistId'
3108 description: successful operation
3117 description: 'Start position of the element to reorder'
3119 insertAfterPosition:
3121 description: 'New position for the block to reorder, to add the block before the first element'
3125 description: 'How many element from `startPosition` to reorder'
3129 - insertAfterPosition
3131 /video-playlists/{playlistId}/videos/{playlistElementId}:
3133 summary: Update a playlist element
3134 operationId: putVideoPlaylistVideo
3140 - $ref: '#/components/parameters/playlistId'
3141 - $ref: '#/components/parameters/playlistElementId'
3144 description: successful operation
3154 description: Start the video at this specific timestamp
3158 description: Stop the video at this specific timestamp
3160 summary: Delete an element from a playlist
3161 operationId: delVideoPlaylistVideo
3167 - $ref: '#/components/parameters/playlistId'
3168 - $ref: '#/components/parameters/playlistElementId'
3171 description: successful operation
3173 '/users/me/video-playlists/videos-exist':
3175 summary: Check video exists in my playlists
3184 description: The video ids to check
3188 $ref: '#/components/schemas/Video/properties/id'
3191 description: successful operation
3213 '/accounts/{name}/video-channels':
3215 summary: List video channels of an account
3220 - $ref: '#/components/parameters/name'
3223 description: include view statistics for the last 30 days (only if authentified as the account user)
3226 - $ref: '#/components/parameters/start'
3227 - $ref: '#/components/parameters/count'
3228 - $ref: '#/components/parameters/sort'
3231 description: successful operation
3235 $ref: '#/components/schemas/VideoChannelList'
3237 '/accounts/{name}/ratings':
3239 summary: List ratings of an account
3245 - $ref: '#/components/parameters/name'
3246 - $ref: '#/components/parameters/start'
3247 - $ref: '#/components/parameters/count'
3248 - $ref: '#/components/parameters/sort'
3252 description: Optionally filter which ratings to retrieve
3260 description: successful operation
3266 $ref: '#/components/schemas/VideoRating'
3268 '/videos/{id}/comment-threads':
3270 summary: List threads of a video
3274 - $ref: '#/components/parameters/idOrUUID'
3275 - $ref: '#/components/parameters/start'
3276 - $ref: '#/components/parameters/count'
3277 - $ref: '#/components/parameters/commentsSort'
3280 description: successful operation
3284 $ref: '#/components/schemas/CommentThreadResponse'
3286 summary: Create a thread
3292 - $ref: '#/components/parameters/idOrUUID'
3295 description: successful operation
3299 $ref: '#/components/schemas/CommentThreadPostResponse'
3301 description: video does not exist
3310 - $ref: '#/components/schemas/VideoComment/properties/text'
3316 '/videos/{id}/comment-threads/{threadId}':
3318 summary: Get a thread
3322 - $ref: '#/components/parameters/idOrUUID'
3323 - $ref: '#/components/parameters/threadId'
3326 description: successful operation
3330 $ref: '#/components/schemas/VideoCommentThreadTree'
3332 '/videos/{id}/comments/{commentId}':
3334 summary: Reply to a thread of a video
3340 - $ref: '#/components/parameters/idOrUUID'
3341 - $ref: '#/components/parameters/commentId'
3344 description: successful operation
3348 $ref: '#/components/schemas/CommentThreadPostResponse'
3350 description: thread or video does not exist
3359 - $ref: '#/components/schemas/VideoComment/properties/text'
3365 summary: Delete a comment or a reply
3371 - $ref: '#/components/parameters/idOrUUID'
3372 - $ref: '#/components/parameters/commentId'
3375 description: successful operation
3377 description: cannot remove comment of another user
3379 description: comment or video does not exist
3381 description: comment is already deleted
3383 '/videos/{id}/rate':
3385 summary: Like/dislike a video
3391 - $ref: '#/components/parameters/idOrUUID'
3407 description: successful operation
3409 description: video does not exist
3415 summary: Search videos
3416 operationId: searchVideos
3421 allowEmptyValue: false
3423 String to search. If the user can make a remote URI search, and the string is an URI then the
3424 PeerTube instance will fetch the remote object and add it to its database. Then,
3425 you can use the REST API to fetch the complete video information and interact with it.
3428 - $ref: '#/components/parameters/categoryOneOf'
3429 - $ref: '#/components/parameters/isLive'
3430 - $ref: '#/components/parameters/tagsOneOf'
3431 - $ref: '#/components/parameters/tagsAllOf'
3432 - $ref: '#/components/parameters/licenceOneOf'
3433 - $ref: '#/components/parameters/languageOneOf'
3434 - $ref: '#/components/parameters/nsfw'
3435 - $ref: '#/components/parameters/filter'
3436 - $ref: '#/components/parameters/skipCount'
3437 - $ref: '#/components/parameters/start'
3438 - $ref: '#/components/parameters/count'
3439 - $ref: '#/components/parameters/searchTarget'
3440 - $ref: '#/components/parameters/videosSearchSort'
3443 description: Get videos that are published after this date
3449 description: Get videos that are published before this date
3453 - name: originallyPublishedStartDate
3455 description: Get videos that are originally published after this date
3459 - name: originallyPublishedEndDate
3461 description: Get videos that are originally published before this date
3467 description: Get videos that have this minimum duration
3472 description: Get videos that have this maximum duration
3476 'searchTarget === search-index':
3477 $ref: '#/components/callbacks/searchIndex'
3480 description: successful operation
3484 $ref: '#/components/schemas/VideoListResponse'
3486 description: search index unavailable
3488 /search/video-channels:
3492 summary: Search channels
3493 operationId: searchChannels
3499 String to search. If the user can make a remote URI search, and the string is an URI then the
3500 PeerTube instance will fetch the remote object and add it to its database. Then,
3501 you can use the REST API to fetch the complete channel information and interact with it.
3504 - $ref: '#/components/parameters/start'
3505 - $ref: '#/components/parameters/count'
3506 - $ref: '#/components/parameters/searchTarget'
3507 - $ref: '#/components/parameters/sort'
3509 'searchTarget === search-index':
3510 $ref: '#/components/callbacks/searchIndex'
3513 description: successful operation
3517 $ref: '#/components/schemas/VideoChannelList'
3519 description: search index unavailable
3521 /server/blocklist/accounts:
3525 summary: List account blocks
3530 - $ref: '#/components/parameters/start'
3531 - $ref: '#/components/parameters/count'
3532 - $ref: '#/components/parameters/sort'
3535 description: successful operation
3539 summary: Block an account
3551 example: chocobozzz@example.org
3552 description: account to block, in the form `username@domain`
3557 description: successful operation
3559 description: self-blocking forbidden
3561 '/server/blocklist/accounts/{accountName}':
3565 summary: Unblock an account by its handle
3573 description: account to unblock, in the form `username@domain`
3578 description: successful operation
3580 description: account or account block does not exist
3582 /server/blocklist/servers:
3586 summary: List server blocks
3591 - $ref: '#/components/parameters/start'
3592 - $ref: '#/components/parameters/count'
3593 - $ref: '#/components/parameters/sort'
3596 description: successful operation
3600 summary: Block a server
3613 description: server domain to block
3618 description: successful operation
3620 description: self-blocking forbidden
3622 '/server/blocklist/servers/{host}':
3626 summary: Unblock a server by its domain
3634 description: server domain to unblock
3640 description: successful operation
3642 description: account block does not exist
3644 /server/redundancy/{host}:
3647 - Instance Redundancy
3648 summary: Update a server redundancy policy
3656 description: server domain to mirror
3668 description: allow mirroring of the host's local videos
3673 description: successful operation
3675 description: server is not already known
3677 /server/redundancy/videos:
3681 summary: List videos being mirrored
3682 operationId: getMirroredVideos
3690 description: direction of the mirror
3696 - $ref: '#/components/parameters/start'
3697 - $ref: '#/components/parameters/count'
3698 - $ref: '#/components/parameters/videoRedundanciesSort'
3701 description: successful operation
3707 $ref: '#/components/schemas/VideoRedundancy'
3711 summary: Mirror a video
3712 operationId: putMirroredVideo
3723 $ref: '#/components/schemas/Video/properties/id'
3728 description: successful operation
3730 description: cannot mirror a local video
3732 description: video does not exist
3734 description: video is already mirrored
3736 /server/redundancy/videos/{redundancyId}:
3740 summary: Delete a mirror done on a video
3741 operationId: delMirroredVideo
3746 - name: redundancyId
3749 description: id of an existing redundancy on a video
3754 description: successful operation
3756 description: video redundancy not found
3758 '/feeds/video-comments.{format}':
3762 summary: List comments on videos
3763 operationId: getSyndicatedComments
3768 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3781 description: 'limit listing to a specific video'
3786 description: 'limit listing to a specific account'
3791 description: 'limit listing to a specific account'
3794 - name: videoChannelId
3796 description: 'limit listing to a specific video channel'
3799 - name: videoChannelName
3801 description: 'limit listing to a specific video channel'
3806 description: successful operation
3811 default: 'max-age=900' # 15 min cache
3815 $ref: '#/components/schemas/VideoCommentsForXML'
3818 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3819 application/rss+xml:
3821 $ref: '#/components/schemas/VideoCommentsForXML'
3824 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
3827 $ref: '#/components/schemas/VideoCommentsForXML'
3830 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3831 application/atom+xml:
3833 $ref: '#/components/schemas/VideoCommentsForXML'
3836 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
3842 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
3844 x-summary: field inconsistencies
3847 - videoId filter is mixed with a channel filter
3849 description: video, video channel or account not found
3851 description: accept header unsupported
3853 '/feeds/videos.{format}':
3857 summary: List videos
3858 operationId: getSyndicatedVideos
3863 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3876 description: 'limit listing to a specific account'
3881 description: 'limit listing to a specific account'
3884 - name: videoChannelId
3886 description: 'limit listing to a specific video channel'
3889 - name: videoChannelName
3891 description: 'limit listing to a specific video channel'
3894 - $ref: '#/components/parameters/sort'
3895 - $ref: '#/components/parameters/nsfw'
3896 - $ref: '#/components/parameters/filter'
3899 description: successful operation
3904 default: 'max-age=900' # 15 min cache
3908 $ref: '#/components/schemas/VideosForXML'
3911 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
3912 application/rss+xml:
3914 $ref: '#/components/schemas/VideosForXML'
3917 externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
3920 $ref: '#/components/schemas/VideosForXML'
3923 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
3924 application/atom+xml:
3926 $ref: '#/components/schemas/VideosForXML'
3929 externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
3935 externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
3937 description: video channel or account not found
3939 description: accept header unsupported
3941 '/feeds/subscriptions.{format}':
3946 summary: List videos of subscriptions tied to a token
3947 operationId: getSyndicatedSubscriptionVideos
3952 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3965 description: limit listing to a specific account
3971 description: private token allowing access
3975 - $ref: '#/components/parameters/sort'
3976 - $ref: '#/components/parameters/nsfw'
3977 - $ref: '#/components/parameters/filter'
3980 description: successful operation
3985 default: 'max-age=900' # 15 min cache
3989 $ref: '#/components/schemas/VideosForXML'
3990 application/rss+xml:
3992 $ref: '#/components/schemas/VideosForXML'
3995 $ref: '#/components/schemas/VideosForXML'
3996 application/atom+xml:
3998 $ref: '#/components/schemas/VideosForXML'
4003 description: accept header unsupported
4009 summary: List plugins
4010 operationId: getPlugins
4023 - $ref: '#/components/parameters/start'
4024 - $ref: '#/components/parameters/count'
4025 - $ref: '#/components/parameters/sort'
4028 description: successful operation
4032 $ref: '#/components/schemas/PluginResponse'
4038 summary: List available plugins
4039 operationId: getAvailablePlugins
4052 - name: currentPeerTubeEngine
4056 - $ref: '#/components/parameters/start'
4057 - $ref: '#/components/parameters/count'
4058 - $ref: '#/components/parameters/sort'
4061 description: successful operation
4065 $ref: '#/components/schemas/PluginResponse'
4067 description: plugin index unavailable
4073 summary: Install a plugin
4074 operationId: addPlugin
4087 example: peertube-plugin-auth-ldap
4090 additionalProperties: false
4097 additionalProperties: false
4100 description: successful operation
4102 description: should have either `npmName` or `path` set
4108 summary: Update a plugin
4109 operationId: updatePlugin
4122 example: peertube-plugin-auth-ldap
4125 additionalProperties: false
4132 additionalProperties: false
4135 description: successful operation
4137 description: should have either `npmName` or `path` set
4139 description: existing plugin not found
4145 summary: Uninstall a plugin
4146 operationId: uninstallPlugin
4158 description: name of the plugin/theme in its package.json
4159 example: peertube-plugin-auth-ldap
4164 description: successful operation
4166 description: existing plugin not found
4172 summary: Get a plugin
4173 operationId: getPlugin
4178 - $ref: '#/components/parameters/npmName'
4181 description: successful operation
4185 $ref: '#/components/schemas/Plugin'
4187 description: plugin not found
4189 /plugins/{npmName}/settings:
4193 summary: Set a plugin's settings
4198 - $ref: '#/components/parameters/npmName'
4207 additionalProperties: true
4210 description: successful operation
4212 description: plugin not found
4214 /plugins/{npmName}/public-settings:
4218 summary: Get a plugin's public settings
4220 - $ref: '#/components/parameters/npmName'
4223 description: successful operation
4228 additionalProperties: true
4230 description: plugin not found
4232 /plugins/{npmName}/registered-settings:
4236 summary: Get a plugin's registered settings
4241 - $ref: '#/components/parameters/npmName'
4244 description: successful operation
4249 additionalProperties: true
4251 description: plugin not found
4254 - url: 'https://peertube2.cpy.re/api/v1'
4255 description: Live Test Server (live data - latest nightly version)
4256 - url: 'https://peertube3.cpy.re/api/v1'
4257 description: Live Test Server (live data - latest RC version)
4258 - url: 'https://peertube.cpy.re/api/v1'
4259 description: Live Test Server (live data - stable version)
4266 description: Offset used to paginate results
4274 description: "Number of items to return"
4284 description: Sort column
4292 description: Plain text search, applied to various parts of the model depending on endpoint
4300 If the administrator enabled search index support, you can override the default search target.
4303 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
4304 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
4305 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
4306 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
4307 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
4308 * 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
4309 the data from the origin instance API
4319 description: Sort videos by criteria
4335 description: Sort videos by criteria
4350 description: Sort comments by criteria
4360 description: Sort blacklists by criteria
4376 description: Plain text search that will match with user usernames or emails
4383 description: Filter results down to (un)banned users
4390 description: Sort users by criteria
4401 description: Sort abuses by criteria
4408 videoRedundanciesSort:
4412 description: Sort abuses by criteria
4421 description: The username or handle of the account
4424 example: chocobozzz | chocobozzz@example.org
4429 description: The user id
4431 $ref: '#/components/schemas/id'
4436 description: The object id or uuid
4439 - $ref: '#/components/schemas/id'
4440 - $ref: '#/components/schemas/UUIDv4'
4445 description: Playlist id
4447 $ref: '#/components/schemas/VideoPlaylist/properties/id'
4449 name: playlistElementId
4452 description: Playlist element id
4454 $ref: '#/components/schemas/id'
4459 description: Abuse id
4461 $ref: '#/components/schemas/Abuse/properties/id'
4463 name: abuseMessageId
4466 description: Abuse message id
4468 $ref: '#/components/schemas/AbuseMessage/properties/id'
4470 name: captionLanguage
4473 description: The caption language
4475 $ref: '#/components/schemas/VideoLanguageSet'
4480 description: The video channel handle
4483 example: my_username | my_username@example.com
4485 name: subscriptionHandle
4488 description: The subscription handle
4491 example: my_username | my_username@example.com
4496 description: The thread id (root comment id)
4503 description: The comment id
4505 $ref: '#/components/schemas/VideoComment/properties/id'
4510 description: whether or not the video is a live
4517 description: category id of the video (see [/videos/categories](#operation/getCategories))
4520 - $ref: '#/components/schemas/VideoCategorySet'
4523 $ref: '#/components/schemas/VideoCategorySet'
4530 description: tag(s) of the video
4544 description: tag(s) of the video, where all should be present in the video
4557 description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language
4560 - $ref: '#/components/schemas/VideoLanguageSet'
4563 $ref: '#/components/schemas/VideoLanguageSet'
4570 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4573 - $ref: '#/components/schemas/VideoLicenceSet'
4576 $ref: '#/components/schemas/VideoLicenceSet'
4583 description: if you don't need the `total` in the response
4594 description: whether to include nsfw videos, if any
4605 Special filters which might require special rights:
4606 * `local` - only videos local to the instance
4607 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
4608 * `all` - all videos, showing private and unlisted videos (requires Admin privileges)
4618 description: list of uris to check if each is part of the user subscriptions
4628 description: name of the plugin/theme on npmjs.com or in its package.json
4631 example: peertube-plugin-auth-ldap
4636 description: job type
4640 - activitypub-follow
4641 - activitypub-http-broadcast
4642 - activitypub-http-fetcher
4643 - activitypub-http-unicast
4649 - activitypub-refresher
4674 Authenticating via OAuth requires the following steps:
4675 - Have an activated account
4676 - [Generate] an access token for that account at `/api/v1/users/token`.
4677 - Make requests with the *Authorization: Bearer <token\>* header
4678 - Profit, depending on the role assigned to the account
4680 Note that the __access token is valid for 1 day__ and is given
4681 along with a __refresh token valid for 2 weeks__.
4683 [Generate]: https://docs.joinpeertube.org/api-rest-getting-started
4687 tokenUrl: /api/v1/users/token
4690 moderator: Moderator scope
4693 # Resuable core properties
4701 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4702 pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
4707 description: immutable name of the user, used to find or mention its actor
4709 pattern: '/^[a-z0-9._]+$/'
4714 description: immutable name of the channel, used to interact with its actor
4715 example: framasoft_videos
4716 pattern: '/^[a-zA-Z0-9\\-_.:]+$/'
4727 description: category id of the video (see [/videos/categories](#operation/getCategories))
4729 VideoConstantNumber-Category:
4732 $ref: '#/components/schemas/VideoCategorySet'
4735 example: Science & Technology
4739 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4741 VideoConstantNumber-Licence:
4744 $ref: '#/components/schemas/VideoLicenceSet'
4747 example: Attribution - Share Alike
4751 description: language id of the video (see [/videos/languages](#operation/getLanguages))
4753 VideoConstantString-Language:
4756 $ref: '#/components/schemas/VideoLanguageSet'
4761 VideoPlaylistPrivacySet:
4767 description: Video playlist privacy policy (see [/video-playlists/privacies])
4768 VideoPlaylistPrivacyConstant:
4771 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4775 VideoPlaylistTypeSet:
4780 description: The video playlist type (Regular = `1`, Watch Later = `2`)
4781 VideoPlaylistTypeConstant:
4784 $ref: '#/components/schemas/VideoPlaylistTypeSet'
4795 description: privacy id of the video (see [/videos/privacies](#operation/getPrivacyPolicies))
4796 VideoPrivacyConstant:
4799 $ref: '#/components/schemas/VideoPrivacySet'
4816 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
4823 description: 'Admin flags for the user (None = `0`, Bypass video blacklist = `1`)'
4834 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
4844 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
4848 $ref: '#/components/schemas/AbuseStateSet'
4851 AbusePredefinedReasons:
4864 example: [spamOrMisleading]
4869 Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`)
4871 `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos.
4873 VideoResolutionConstant:
4874 description: resolutions and their labels for the video
4877 $ref: '#/components/schemas/VideoResolutionSet'
4881 VideoScheduledUpdate:
4884 $ref: '#/components/schemas/VideoPrivacySet'
4888 description: When to update the video
4908 - $ref: '#/components/schemas/ActorImage'
4909 VideoChannelSummary:
4912 $ref: '#/components/schemas/id'
4926 - $ref: '#/components/schemas/ActorImage'
4940 - $ref: '#/components/schemas/Video'
4947 description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file
4948 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
4949 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
4951 $ref: '#/components/schemas/VideoResolutionConstant'
4954 description: Video file size in bytes
4957 description: Direct URL of the torrent file
4961 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
4965 description: Direct URL of the video
4969 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
4973 description: Frames per second of the video file
4977 description: URL dereferencing the output of ffprobe on the file
4978 VideoStreamingPlaylists:
4983 $ref: '#/components/schemas/id'
4991 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS'
4992 VideoStreamingPlaylists-HLS:
5003 Video files associated to this playlist.
5005 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.)
5007 $ref: '#/components/schemas/VideoFile'
5019 $ref: '#/components/schemas/Video/properties/id'
5021 $ref: '#/components/schemas/Video/properties/uuid'
5023 $ref: '#/components/schemas/Video/properties/name'
5027 description: object id for the video
5029 - $ref: '#/components/schemas/id'
5031 description: universal identifier for the video, that can be used across instances
5033 - $ref: '#/components/schemas/UUIDv4'
5039 example: 2017-10-01T10:52:46.396Z
5040 description: time at which the video object was first drafted
5044 example: 2018-10-01T10:52:46.396Z
5045 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
5049 example: 2021-05-04T08:01:01.502Z
5050 description: last time the video's metadata was modified
5051 originallyPublishedAt:
5054 example: 2010-10-01T10:52:46.396Z
5055 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
5058 - $ref: '#/components/schemas/VideoConstantNumber-Category'
5059 description: category in which the video is classified
5062 - $ref: '#/components/schemas/VideoConstantNumber-Licence'
5063 description: licence under which the video is distributed
5066 - $ref: '#/components/schemas/VideoConstantString-Language'
5067 description: main language used in the video
5070 - $ref: '#/components/schemas/VideoPrivacyConstant'
5071 description: privacy policy used to distribute the video
5075 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n
5076 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr...
5080 truncated description of the video, written in Markdown.
5081 Resolve `descriptionPath` to get the full description of maximum `10000` characters.
5086 description: duration of the video in seconds
5091 description: title of the video
5092 example: What is PeerTube?
5097 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5100 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5103 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
5120 - $ref: '#/components/schemas/VideoStateConstant'
5121 description: represents the internal state of the video processing within the PeerTube instance
5125 - $ref: '#/components/schemas/VideoScheduledUpdate'
5133 $ref: '#/components/schemas/AccountSummary'
5135 $ref: '#/components/schemas/VideoChannelSummary'
5144 - $ref: '#/components/schemas/Video'
5149 example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description
5150 description: path at which to get the full description of maximum `10000` characters
5153 description: A text tell the audience how to support the video creator
5154 example: Please support our work on https://soutenir.framasoft.org/en/ <3
5158 $ref: '#/components/schemas/VideoChannel'
5160 $ref: '#/components/schemas/Account'
5162 example: [flowers, gardening]
5180 - https://peertube2.cpy.re/tracker/announce
5181 - wss://peertube2.cpy.re/tracker/socket
5185 $ref: '#/components/schemas/VideoFile'
5187 WebTorrent/raw video files. If WebTorrent is disabled on the server:
5189 - field will be empty
5190 - video files will be found in `streamingPlaylists[].files` field
5194 $ref: '#/components/schemas/VideoStreamingPlaylists'
5196 HLS playlists/manifest files. If HLS is disabled on the server:
5198 - field will be empty
5199 - video files will be found in `files` field
5200 FileRedundancyInformation:
5203 $ref: '#/components/schemas/id'
5228 $ref: '#/components/schemas/id'
5235 $ref: '#/components/schemas/UUIDv4'
5242 $ref: '#/components/schemas/FileRedundancyInformation'
5246 $ref: '#/components/schemas/FileRedundancyInformation'
5247 VideoImportStateConstant:
5255 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
5262 additionalProperties: false
5266 $ref: '#/components/schemas/VideoImport/properties/targetUrl'
5267 required: [targetUrl]
5270 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
5271 required: [magnetUri]
5274 $ref: '#/components/schemas/VideoImport/properties/torrentfile'
5275 required: [torrentfile]
5276 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5285 - $ref: '#/components/schemas/id'
5289 description: remote URL where to find the import's source video
5290 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
5294 description: magnet URI allowing to resolve the import's source video
5295 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
5296 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5301 description: Torrent file containing only the video file
5308 - $ref: '#/components/schemas/VideoImportStateConstant'
5324 - $ref: '#/components/schemas/Video'
5334 $ref: '#/components/schemas/VideoImport'
5338 $ref: '#/components/schemas/id'
5341 example: The video is a spam
5345 $ref: '#/components/schemas/AbusePredefinedReasons'
5347 $ref: '#/components/schemas/Account'
5349 $ref: '#/components/schemas/AbuseStateConstant'
5352 example: Decided to ban the server since it spams us regularly
5356 $ref: '#/components/schemas/VideoInfo'
5363 $ref: '#/components/schemas/id'
5374 $ref: '#/components/schemas/AccountSummary'
5378 $ref: '#/components/schemas/id'
5380 $ref: '#/components/schemas/Video/properties/id'
5392 $ref: '#/components/schemas/UUIDv4'
5410 $ref: '#/components/schemas/id'
5412 $ref: '#/components/schemas/UUIDv4'
5435 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
5437 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
5439 $ref: '#/components/schemas/AccountSummary'
5441 $ref: '#/components/schemas/VideoChannelSummary'
5445 $ref: '#/components/schemas/id'
5452 description: Text of the comment
5454 example: This video is wonderful!
5456 $ref: '#/components/schemas/id'
5460 - $ref: '#/components/schemas/id'
5462 $ref: '#/components/schemas/Video/properties/id'
5477 totalRepliesFromVideoAuthor:
5484 $ref: '#/components/schemas/Account'
5485 VideoCommentThreadTree:
5488 $ref: '#/components/schemas/VideoComment'
5492 $ref: '#/components/schemas/VideoCommentThreadTree'
5496 $ref: '#/components/schemas/VideoConstantString-Language'
5512 $ref: '#/components/schemas/id'
5529 $ref: '#/components/schemas/id'
5534 description: immutable name of the actor, used to find or mention it
5536 - $ref: '#/components/schemas/username'
5540 description: server on which the actor is resident
5541 hostRedundancyAllowed:
5543 description: whether this actor's host allows redundancy of its videos
5547 description: number of actors subscribed to by this actor, as seen by this instance
5551 description: number of followers of this actor, as seen by this instance
5559 $ref: '#/components/schemas/ActorImage'
5562 - $ref: '#/components/schemas/Actor'
5565 description: object id for the user tied to this account
5567 - $ref: '#/components/schemas/User/properties/id'
5570 description: editable name of the account, displayed in its representations
5575 description: text or bio displayed on the account's profile
5581 description: timestamp within the video, in seconds
5648 allowedForCurrentIP:
5650 requiresEmailVerification:
5668 $ref: '#/components/schemas/VideoResolutionSet'
5753 example: 16810141515
5862 requiresEmailVerification:
5877 description: Settings that apply to new users, if registration is enabled
5881 example: 16810141515
5887 description: Settings pertaining to transcoding jobs
5891 allowAdditionalExtensions:
5893 description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos
5896 description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
5899 description: Amount of threads used by ffmpeg for 1 transcoding job
5902 description: Amount of transcoding jobs to execute in parallel
5908 New profiles can be added by plugins ; available in core PeerTube: 'default'.
5911 description: Resolutions to transcode _new videos_ to
5931 description: WebTorrent-specific settings
5937 description: HLS-specific settings
5987 $ref: '#/components/schemas/id'
5989 $ref: '#/components/schemas/Actor'
5991 $ref: '#/components/schemas/Actor'
5994 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
6007 PredefinedAbuseReasons:
6008 description: Reason categories that help triage reports
6026 $ref: '#/components/schemas/id'
6038 - activitypub-http-unicast
6039 - activitypub-http-broadcast
6040 - activitypub-http-fetcher
6041 - activitypub-follow
6047 - activitypub-refresher
6051 additionalProperties: true
6054 additionalProperties: true
6070 $ref: '#/components/schemas/id'
6075 $ref: '#/components/schemas/id'
6076 VideoUploadRequestCommon:
6079 description: Video name
6081 example: What is PeerTube?
6085 description: Channel id that will contain this video
6090 $ref: '#/components/schemas/VideoPrivacySet'
6092 $ref: '#/components/schemas/VideoCategorySet'
6094 $ref: '#/components/schemas/VideoLicenceSet'
6096 $ref: '#/components/schemas/VideoLanguageSet'
6098 description: Video description
6101 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n**Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**
6103 description: Whether or not we wait transcoding before publish the video
6106 description: A text tell the audience how to support the video creator
6107 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6110 description: Whether or not this video contains sensitive content
6113 description: Video tags (maximum 5 tags each between 2 and 30 characters)
6126 description: Enable or disable comments for this video
6129 description: Enable or disable downloading for this video
6131 originallyPublishedAt:
6132 description: Date when the content was originally published
6136 $ref: '#/components/schemas/VideoScheduledUpdate'
6138 description: Video thumbnail file
6142 description: Video preview file
6148 VideoUploadRequestLegacy:
6150 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6156 description: Video file
6159 VideoUploadRequestResumable:
6161 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6167 description: Video filename including extension
6170 example: what_is_peertube.mp4
6172 description: Video thumbnail file
6176 description: Video preview file
6179 VideoUploadResponse:
6185 $ref: '#/components/schemas/Video/properties/id'
6187 $ref: '#/components/schemas/Video/properties/uuid'
6188 CommentThreadResponse:
6197 $ref: '#/components/schemas/VideoComment'
6198 CommentThreadPostResponse:
6201 $ref: '#/components/schemas/VideoComment'
6211 $ref: '#/components/schemas/Video'
6215 $ref: '#/components/schemas/Account'
6218 description: Automatically start playing the upcoming video after the currently playing video
6219 autoPlayNextVideoPlaylist:
6221 description: Automatically start playing the video on the playlist after the currently playing video
6224 description: Automatically start playing the video on the watch page
6234 description: The user email
6237 description: Has the user confirmed their email address?
6240 - $ref: '#/components/schemas/id'
6244 description: Auth plugin to use to authenticate the user
6248 noInstanceConfigWarningModal:
6253 $ref: '#/components/schemas/NSFWPolicy'
6255 $ref: '#/components/schemas/UserRole'
6264 description: Theme enabled by this user
6266 $ref: '#/components/schemas/username'
6270 $ref: '#/components/schemas/VideoChannel'
6273 description: The user video quota in bytes
6277 description: The user daily video quota in bytes
6281 description: Enable P2P in the player
6284 - $ref: '#/components/schemas/User'
6286 # optionally present fields: they require WITH_STATS scope
6289 description: Count of videos published
6292 description: Count of reports/abuses of which the user is a target
6293 abusesAcceptedCount:
6295 description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team
6298 description: Count of reports/abuses created by the user
6301 description: Count of comments published
6305 $ref: '#/components/schemas/username'
6307 $ref: '#/components/schemas/password'
6311 description: The user email
6314 description: The user video quota in bytes
6318 description: The user daily video quota in bytes
6321 $ref: '#/components/schemas/usernameChannel'
6323 $ref: '#/components/schemas/UserRole'
6325 $ref: '#/components/schemas/UserAdminFlags'
6336 description: The updated email of the user
6338 - $ref: '#/components/schemas/User/properties/email'
6341 description: Set the email as verified
6344 description: The updated video quota of the user in bytes
6347 description: The updated daily video quota of the user in bytes
6351 description: The auth plugin to use to authenticate the user
6352 example: 'peertube-plugin-auth-saml2'
6354 $ref: '#/components/schemas/UserRole'
6356 $ref: '#/components/schemas/UserAdminFlags'
6358 # see shared/models/users/user-update-me.model.ts:
6361 $ref: '#/components/schemas/password'
6363 $ref: '#/components/schemas/password'
6365 description: new email used for login and service communications
6367 - $ref: '#/components/schemas/User/properties/email'
6370 description: new name of the user in its representations
6375 description: new NSFW display policy
6382 description: whether to enable P2P in the player or not
6385 description: new preference regarding playing videos automatically
6388 description: new preference regarding playing following videos automatically
6389 autoPlayNextVideoPlaylist:
6391 description: new preference regarding playing following playlist videos automatically
6392 videosHistoryEnabled:
6394 description: whether to keep track of watched history or not
6399 description: list of languages to filter videos down to
6402 noInstanceConfigWarningModal:
6409 $ref: '#/components/schemas/id'
6416 description: Rating of the video
6423 $ref: '#/components/schemas/Video'
6430 description: Rating of the video
6437 description: immutable name of the user, used to find or mention its actor
6439 - $ref: '#/components/schemas/username'
6441 $ref: '#/components/schemas/password'
6445 description: email of the user, used for login or service communications
6448 description: editable name of the user, displayed in its representations
6453 description: channel base information used to create the first channel of the user
6456 $ref: '#/components/schemas/usernameChannel'
6458 $ref: '#/components/schemas/VideoChannel/properties/displayName'
6468 pattern: /^[a-z0-9]$/
6471 example: v1ikx5hnfop4mdpnci8nsqh93c45rldf
6474 pattern: /^[a-zA-Z0-9]$/
6477 example: AjWiOapPltI6EnsWQwlFarRtLh4u8tDt
6478 OAuthToken-password:
6480 - $ref: '#/components/schemas/OAuthClient'
6490 $ref: '#/components/schemas/User/properties/username'
6492 $ref: '#/components/schemas/password'
6499 OAuthToken-refresh_token:
6501 - $ref: '#/components/schemas/OAuthClient'
6512 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
6521 # GET/POST/PUT properties
6524 description: editable name of the channel, displayed in its representations
6525 example: Videos of Framasoft
6530 example: Videos made with <3 by Framasoft
6535 description: text shown by default on all videos of this channel, to tell the audience how to support it
6536 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6539 # GET-only properties
6543 - $ref: '#/components/schemas/id'
6559 $ref: '#/components/schemas/UUIDv4'
6562 - $ref: '#/components/schemas/VideoChannel'
6565 description: username of the channel to create
6567 - $ref: '#/components/schemas/usernameChannel'
6573 - $ref: '#/components/schemas/VideoChannel'
6575 bulkVideosSupportUpdate:
6577 description: Update the support field for all videos of this channel
6587 - $ref: '#/components/schemas/VideoChannel'
6588 - $ref: '#/components/schemas/Actor'
6593 name: 'media:peerLink'
6602 - application/x-bittorrent
6608 name: 'media:content'
6639 VideoCommentsForXML:
6674 description: video watch page URL
6677 description: video canonical URL
6681 description: video publication date
6684 description: video description
6687 description: video description
6690 description: publisher user name
6693 description: video category (MRSS)
6696 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
6711 description: video embed path, relative to the canonical URL domain (MRSS)
6720 description: video watch path, relative to the canonical URL domain (MRSS)
6741 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
6742 'media:description':
6749 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
6752 description: main streamable file for the video
6762 - application/x-bittorrent
6771 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)
6774 - $ref: '#/components/schemas/MRSSPeerLink'
6775 - $ref: '#/components/schemas/MRSSGroupContent'
6776 NotificationSettingValue:
6793 $ref: '#/components/schemas/id'
6797 Notification type, following the `UserNotificationType` enum:
6799 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
6801 - `2` NEW_COMMENT_ON_MY_VIDEO
6803 - `3` NEW_ABUSE_FOR_MODERATORS
6805 - `4` BLACKLIST_ON_MY_VIDEO
6807 - `5` UNBLACKLIST_ON_MY_VIDEO
6809 - `6` MY_VIDEO_PUBLISHED
6811 - `7` MY_VIDEO_IMPORT_SUCCESS
6813 - `8` MY_VIDEO_IMPORT_ERROR
6815 - `9` NEW_USER_REGISTRATION
6819 - `11` COMMENT_MENTION
6821 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
6823 - `13` NEW_INSTANCE_FOLLOWER
6825 - `14` AUTO_INSTANCE_FOLLOWING
6831 - $ref: '#/components/schemas/VideoInfo'
6835 $ref: '#/components/schemas/ActorInfo'
6841 $ref: '#/components/schemas/id'
6844 $ref: '#/components/schemas/VideoInfo'
6849 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
6859 $ref: '#/components/schemas/id'
6863 $ref: '#/components/schemas/VideoInfo'
6865 $ref: '#/components/schemas/ActorInfo'
6871 $ref: '#/components/schemas/id'
6874 - $ref: '#/components/schemas/VideoInfo'
6880 $ref: '#/components/schemas/id'
6883 - $ref: '#/components/schemas/VideoInfo'
6887 - $ref: '#/components/schemas/ActorInfo'
6893 $ref: '#/components/schemas/id'
6895 $ref: '#/components/schemas/ActorInfo'
6923 NotificationListResponse:
6932 $ref: '#/components/schemas/Notification'
6937 example: peertube-plugin-auth-ldap
6965 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
6968 additionalProperties: true
6984 $ref: '#/components/schemas/Plugin'
6991 description: User can stream multiple times in a permanent live
7000 description: RTMP stream key to use to stream into this live video
7004 description: User can stream multiple times in a permanent live
7011 'https://search.example.org/api/v1/search/videos':
7013 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
7016 description: successful operation
7020 $ref: '#/components/schemas/VideoListResponse'