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
41 of the API call, completed by a [RFC7807-compliant](https://tools.ietf.org/html/rfc7807) response body.
44 HTTP 1.1 404 Not Found
45 Content-Type: application/problem+json; charset=utf-8
48 "detail": "Video not found",
49 "docs": "https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo",
56 We provide error `type` values for [a growing number of cases](https://github.com/Chocobozzz/PeerTube/blob/develop/shared/models/server/server-error-code.enum.ts),
57 but it is still optional. Types are used to disambiguate errors that bear the same status code
61 HTTP 1.1 403 Forbidden
62 Content-Type: application/problem+json; charset=utf-8
65 "detail": "Cannot get this video regarding follow constraints",
66 "docs": "https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo",
69 "type": "https://docs.joinpeertube.org/api-rest-reference.html#section/Errors/does_not_respect_follow_constraints"
73 Here a 403 error could otherwise mean that the video is private or blocklisted.
77 Each parameter is evaluated on its own against a set of rules before the route validator
78 proceeds with potential testing involving parameter combinations. Errors coming from validation
79 errors appear earlier and benefit from a more detailed error description:
82 HTTP 1.1 400 Bad Request
83 Content-Type: application/problem+json; charset=utf-8
86 "detail": "Incorrect request parameters: id",
87 "docs": "https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo",
88 "instance": "/api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180",
92 "msg": "Invalid value",
94 "value": "9c9de5e8-0a1e-484a-b099-e80766180"
98 "title": "Bad Request",
103 Where `id` is the name of the field concerned by the error, within the route definition.
104 `invalid-params.<field>.location` can be either 'params', 'body', 'header', 'query' or 'cookies', and
105 `invalid-params.<field>.value` reports the value that didn't pass validation whose `invalid-params.<field>.msg`
108 ### Deprecated error fields
110 Some fields could be included with previous versions. They are still included but their use is deprecated:
111 - `error`: superseded by `detail`
112 - `code`: superseded by `type` (which is now an URI)
116 We are rate-limiting all endpoints of PeerTube's API. Custom values can be set by administrators:
118 | Endpoint (prefix: `/api/v1`) | Calls | Time frame |
119 |------------------------------|---------------|--------------|
120 | `/*` | 50 | 10 seconds |
121 | `POST /users/token` | 15 | 5 minutes |
122 | `POST /users/register` | 2<sup>*</sup> | 5 minutes |
123 | `POST /users/ask-send-verify-email` | 3 | 5 minutes |
125 Depending on the endpoint, <sup>*</sup>failed requests are not taken into account. A service
126 limit is announced by a `429 Too Many Requests` status code.
128 You can get details about the current state of your rate limit by reading the
131 | Header | Description |
132 |-------------------------|------------------------------------------------------------|
133 | `X-RateLimit-Limit` | Number of max requests allowed in the current time period |
134 | `X-RateLimit-Remaining` | Number of remaining requests in the current time period |
135 | `X-RateLimit-Reset` | Timestamp of end of current time period as UNIX timestamp |
136 | `Retry-After` | Seconds to delay after the first `429` is received |
140 This API features [Cross-Origin Resource Sharing (CORS)](https://fetch.spec.whatwg.org/),
141 allowing cross-domain communication from the browser for some routes:
144 |------------------------- ---|
148 | `/live/segments-sha256/*` |
149 | `/.well-known/webfinger` |
151 In addition, all routes serving ActivityPub are CORS-enabled for all origins.
153 url: https://docs.joinpeertube.org/api-rest-reference.html
157 As a visitor, you can use this API to open an account (if registrations are open on
158 that PeerTube instance). As an admin, you should use the dedicated [User creation
159 API](#operation/addUser) instead.
161 x-displayName: Login/Logout
163 Sessions deal with access tokens over time. Only __one session token can currently be used at a time__.
166 Accounts encompass remote accounts discovered across the federation,
167 and correspond to the main Actor, along with video channels a user can create, which
170 When a comment is posted, it is done with your Account's Actor.
173 Using some features of PeerTube require authentication, for which User
174 provide different levels of permission as well as associated user
175 information. Each user has a corresponding local Account for federation.
178 Operations related to your own User, when logged-in.
179 - name: My Subscriptions
181 Operations related to your subscriptions to video channels, their
182 new videos, and how to keep up to date with their latest publications!
185 Operations related to your watch history.
186 - name: My Notifications
188 Notifications following new videos, follows or reports. They allow you
189 to keep track of the interactions and overall important information that
190 concerns you. You MAY set per-notification type delivery preference, to
191 receive the info either by mail, by in-browser notification or both.
194 Each server exposes public information regarding supported videos and
198 Jobs are long-running tasks enqueued and processed by the instance
199 itself. No additional worker registration is currently available.
200 - name: Instance Follows
202 Managing servers which the instance interacts with is crucial to the
203 concept of federation in PeerTube and external video indexation. The PeerTube
204 server then deals with inter-server ActivityPub operations and propagates
205 information across its social graph by posting activities to actors' inbox
208 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-follows
209 - name: Instance Redundancy
211 Redundancy is part of the inter-server solidarity that PeerTube fosters.
212 Manage the list of instances you wish to help by seeding their videos according
213 to the policy of video selection of your choice. Note that you have a similar functionality
214 to mirror individual videos, see [video mirroring](#tag/Video-Mirroring).
216 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-redundancy
219 Managing plugins installed from a local path or from NPM, or search for new ones.
221 url: https://docs.joinpeertube.org/api-plugins
224 Abuses deal with reports of local or remote videos/comments/accounts alike.
227 Operations dealing with listing, uploading, fetching or modifying videos.
230 Operations dealing with adding video or audio. PeerTube supports two upload modes, and three import modes.
234 - [_legacy_](#operation/uploadLegacy), where the video file is sent in a single request
235 - [_resumable_](#operation/uploadResumableInit), where the video file is sent in chunks
237 You can upload videos more reliably by using the resumable variant. Its protocol lets
238 you resume an upload operation after a network interruption or other transmission failure,
239 saving time and bandwidth in the event of network failures.
241 Favor using resumable uploads in any of the following cases:
242 - You are transferring large files
243 - The likelihood of a network interruption is high
244 - Uploads are originating from a device with a low-bandwidth or unstable Internet connection,
245 such as a mobile device
249 - _URL_-based: where the URL points to any service supported by [youtube-dl](https://ytdl-org.github.io/youtube-dl/)
250 - _magnet_-based: where the URI resolves to a BitTorrent ressource containing a single supported video file
251 - _torrent_-based: where the metainfo file resolves to a BitTorrent ressource containing a single supported video file
253 The import function is practical when the desired video/audio is available online. It makes PeerTube
254 download it for you, saving you as much bandwidth and avoiding any instability or limitation your network might have.
255 - name: Video Captions
256 description: Operations dealing with listing, adding and removing closed captions of a video.
257 - name: Video Channels
258 description: Operations dealing with the creation, modification and listing of videos within a channel.
259 - name: Video Comments
261 Operations dealing with comments to a video. Comments are organized in threads: adding a
262 comment in response to the video starts a thread, adding a reply to a comment adds it to
263 its root comment thread.
265 description: Operations dealing with blocking videos (removing them from view and preventing interactions).
267 description: Like/dislike a video.
268 - name: Video Playlists
269 description: Operations dealing with playlists of videos. Playlists are bound to users and/or channels.
271 description: Server syndication feeds
274 The search helps to find _videos_ or _channels_ from within the instance and beyond.
275 Videos from other instances federated by the instance (that is, instances
276 followed by the instance) can be found via keywords and other criteria of
279 Administrators can also enable the use of a remote search system, indexing
280 videos and channels not could be not federated by the instance.
282 description: Get and update the custom homepage
283 - name: Video Mirroring
285 PeerTube instances can mirror videos from one another, and help distribute some videos.
287 For importing videos as your own, refer to [video imports](#operation/importVideo).
310 - Video Ownership Change
326 - name: Instance Configuration
330 - Instance Redundancy
340 summary: Get an account
341 operationId: getAccount
343 - $ref: '#/components/parameters/name'
346 description: successful operation
350 $ref: '#/components/schemas/Account'
352 description: account not found
354 '/accounts/{name}/videos':
359 summary: 'List videos of an account'
360 operationId: getAccountVideos
362 - $ref: '#/components/parameters/name'
363 - $ref: '#/components/parameters/categoryOneOf'
364 - $ref: '#/components/parameters/isLive'
365 - $ref: '#/components/parameters/tagsOneOf'
366 - $ref: '#/components/parameters/tagsAllOf'
367 - $ref: '#/components/parameters/licenceOneOf'
368 - $ref: '#/components/parameters/languageOneOf'
369 - $ref: '#/components/parameters/nsfw'
370 - $ref: '#/components/parameters/filter'
371 - $ref: '#/components/parameters/skipCount'
372 - $ref: '#/components/parameters/start'
373 - $ref: '#/components/parameters/count'
374 - $ref: '#/components/parameters/videosSort'
377 description: successful operation
381 $ref: '#/components/schemas/VideoListResponse'
385 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
386 .then(function(response) {
387 return response.json()
388 }).then(function(data) {
394 curl -s https://peertube2.cpy.re/api/v1/accounts/{name}/videos | jq
400 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
402 http = Net::HTTP.new(uri.host, uri.port)
405 response = http.get(uri.request_uri)
407 puts JSON.parse(response.read_body)
412 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
421 summary: List accounts
422 operationId: getAccounts
424 - $ref: '#/components/parameters/start'
425 - $ref: '#/components/parameters/count'
426 - $ref: '#/components/parameters/sort'
429 description: successful operation
435 $ref: '#/components/schemas/Account'
441 summary: Get instance public configuration
442 operationId: getConfig
445 description: successful operation
449 $ref: '#/components/schemas/ServerConfig'
452 externalValue: https://peertube2.cpy.re/api/v1/config
456 summary: Get instance "About" information
457 operationId: getAbout
462 description: successful operation
466 $ref: '#/components/schemas/ServerConfigAbout'
469 externalValue: https://peertube2.cpy.re/api/v1/config/about
473 summary: Get instance runtime configuration
474 operationId: getCustomConfig
482 description: successful operation
486 $ref: '#/components/schemas/ServerConfigCustom'
488 summary: Set instance runtime configuration
489 operationId: putCustomConfig
497 description: successful operation
499 x-summary: field inconsistencies
502 - the emailer is disabled and the instance is open to registrations
503 - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
505 summary: Delete instance runtime configuration
506 operationId: delCustomConfig
514 description: successful operation
516 /custom-pages/homepage/instance:
518 summary: Get instance custom homepage
523 description: No homepage set
525 description: successful operation
529 $ref: '#/components/schemas/CustomHomepage'
531 summary: Set instance custom homepage
545 description: content of the homepage, that will be injected in the client
548 description: successful operation
552 summary: List instance jobs
563 description: The state of the job ('' for for no filter)
573 - $ref: '#/components/parameters/jobType'
574 - $ref: '#/components/parameters/start'
575 - $ref: '#/components/parameters/count'
576 - $ref: '#/components/parameters/sort'
579 description: successful operation
592 $ref: '#/components/schemas/Job'
598 summary: List instances following the server
600 - $ref: '#/components/parameters/followState'
601 - $ref: '#/components/parameters/actorType'
602 - $ref: '#/components/parameters/start'
603 - $ref: '#/components/parameters/count'
604 - $ref: '#/components/parameters/sort'
607 description: successful operation
619 $ref: '#/components/schemas/Follow'
621 '/server/followers/{nameWithHost}':
623 summary: Remove or reject a follower to your server
633 description: The remote actor handle to remove from your followers
639 description: successful operation
641 description: follower not found
643 '/server/followers/{nameWithHost}/reject':
645 summary: Reject a pending follower to your server
655 description: The remote actor handle to remove from your followers
661 description: successful operation
663 description: follower not found
665 '/server/followers/{nameWithHost}/accept':
667 summary: Accept a pending follower to your server
677 description: The remote actor handle to remove from your followers
683 description: successful operation
685 description: follower not found
691 summary: List instances followed by the server
693 - $ref: '#/components/parameters/followState'
694 - $ref: '#/components/parameters/actorType'
695 - $ref: '#/components/parameters/start'
696 - $ref: '#/components/parameters/count'
697 - $ref: '#/components/parameters/sort'
700 description: successful operation
712 $ref: '#/components/schemas/Follow'
719 summary: Follow a list of servers
722 description: successful operation
724 description: cannot follow a non-HTTPS server
738 '/server/following/{host}':
740 summary: Unfollow a server
750 description: The host to unfollow
756 description: successful operation
758 description: host not found
762 summary: Create a user
771 description: user created
775 $ref: '#/components/schemas/AddUserResponse'
781 id: '$response.body#/user/id'
786 id: '$response.body#/user/id'
791 id: '$response.body#/user/id'
793 description: insufficient authority to create an admin or moderator
798 $ref: '#/components/schemas/AddUser'
800 If the smtp server is configured, you can leave the password empty and an email will be sent
801 asking the user to set it first.
805 operationId: getUsers
812 - $ref: '#/components/parameters/usersSearch'
813 - $ref: '#/components/parameters/usersBlocked'
814 - $ref: '#/components/parameters/start'
815 - $ref: '#/components/parameters/count'
816 - $ref: '#/components/parameters/usersSort'
819 description: successful operation
825 $ref: '#/components/schemas/User'
829 - $ref: '#/components/parameters/id'
831 summary: Delete a user
840 description: successful operation
851 description: include statistics about the user (only available as a moderator/admin)
856 x-summary: successful operation
858 As an admin/moderator, you can request a response augmented with statistics about the user's
859 moderation relations and videos usage, by using the `withStats` parameter.
864 - $ref: '#/components/schemas/User'
865 - $ref: '#/components/schemas/UserWithStats'
867 summary: Update a user
875 description: successful operation
880 $ref: '#/components/schemas/UpdateUser'
883 /oauth-clients/local:
885 summary: Login prerequisite
886 description: You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken).
887 operationId: getOAuthClient
892 description: successful operation
896 $ref: '#/components/schemas/OAuthClient'
898 UseOAuthClientToLogin:
899 operationId: getOAuthToken
901 client_id: '$response.body#/client_id'
902 client_secret: '$response.body#/client_secret'
906 API="https://peertube2.cpy.re/api/v1"
909 curl -s "$API/oauth-clients/local"
914 operationId: getOAuthToken
915 description: With your [client id and secret](#operation/getOAuthClient), you can retrieve an access and refresh tokens.
920 application/x-www-form-urlencoded:
923 - $ref: '#/components/schemas/OAuthToken-password'
924 - $ref: '#/components/schemas/OAuthToken-refresh_token'
926 propertyName: grant_type
928 password: '#/components/schemas/OAuthToken-password'
929 refresh_token: '#/components/schemas/OAuthToken-refresh_token'
932 description: successful operation
943 example: 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0
944 description: valid for 1 day
947 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
948 description: valid for 2 weeks
953 refresh_token_expires_in:
958 x-summary: client or credentials are invalid
960 Disambiguate via `type`:
961 - `invalid_client` for an unmatched `client_id`
962 - `invalid_grant` for unmatched credentials
964 x-summary: token expired
966 Disambiguate via `type`:
967 - default value for a regular authentication failure
968 - `invalid_token` for an expired token
973 API="https://peertube2.cpy.re/api/v1"
974 USERNAME="<your_username>"
975 PASSWORD="<your_password>"
978 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
979 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
980 curl -s "$API/users/token" \
981 --data client_id="$client_id" \
982 --data client_secret="$client_secret" \
983 --data grant_type=password \
984 --data username="$USERNAME" \
985 --data password="$PASSWORD" \
986 | jq -r ".access_token"
991 description: Revokes your access token and its associated refresh token, destroying your current session.
992 operationId: revokeOAuthToken
999 description: successful operation
1003 summary: Register a user
1004 operationId: registerUser
1010 description: successful operation
1015 $ref: '#/components/schemas/RegisterUser'
1018 /users/{id}/verify-email:
1020 summary: Verify a user
1021 operationId: verifyUser
1023 Following a user registration, the new user will receive an email asking to click a link
1024 containing a secret.
1029 - $ref: '#/components/parameters/id'
1042 - verificationString
1045 description: successful operation
1047 description: invalid verification string
1049 description: user not found
1051 /users/ask-send-verify-email:
1053 summary: Resend user verification link
1054 operationId: resendEmailToVerifyUser
1060 description: successful operation
1064 summary: Get my user information
1065 operationId: getUserInfo
1073 description: successful operation
1079 $ref: '#/components/schemas/User'
1081 summary: Update my user information
1082 operationId: putUserInfo
1090 description: successful operation
1095 $ref: '#/components/schemas/UpdateMe'
1098 /users/me/videos/imports:
1100 summary: Get video imports of my user
1108 - $ref: '#/components/parameters/start'
1109 - $ref: '#/components/parameters/count'
1110 - $ref: '#/components/parameters/sort'
1113 description: successful operation
1117 $ref: '#/components/schemas/VideoImportsList'
1119 /users/me/video-quota-used:
1121 summary: Get my user used quota
1129 description: successful operation
1137 description: The user video quota used so far in bytes
1138 example: 16810141515
1139 videoQuotaUsedDaily:
1141 description: The user video quota used today in bytes
1144 '/users/me/videos/{videoId}/rating':
1146 summary: Get rate of my user for a video
1156 description: The video id
1158 $ref: '#/components/schemas/Video/properties/id'
1161 description: successful operation
1165 $ref: '#/components/schemas/GetMeVideoRating'
1169 summary: Get videos of my user
1177 - $ref: '#/components/parameters/start'
1178 - $ref: '#/components/parameters/count'
1179 - $ref: '#/components/parameters/sort'
1182 description: successful operation
1186 $ref: '#/components/schemas/VideoListResponse'
1188 /users/me/subscriptions:
1190 summary: Get my user subscriptions
1197 - $ref: '#/components/parameters/start'
1198 - $ref: '#/components/parameters/count'
1199 - $ref: '#/components/parameters/sort'
1202 description: successful operation
1206 $ref: '#/components/schemas/VideoChannelList'
1210 summary: Add subscription to my user
1223 description: uri of the video channels to subscribe to
1229 uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr
1232 description: successful operation
1234 /users/me/subscriptions/exist:
1236 summary: Get if subscriptions exist for my user
1243 - $ref: '#/components/parameters/subscriptionsUris'
1246 description: successful operation
1252 /users/me/subscriptions/videos:
1254 summary: List videos of subscriptions of my user
1262 - $ref: '#/components/parameters/categoryOneOf'
1263 - $ref: '#/components/parameters/isLive'
1264 - $ref: '#/components/parameters/tagsOneOf'
1265 - $ref: '#/components/parameters/tagsAllOf'
1266 - $ref: '#/components/parameters/licenceOneOf'
1267 - $ref: '#/components/parameters/languageOneOf'
1268 - $ref: '#/components/parameters/nsfw'
1269 - $ref: '#/components/parameters/filter'
1270 - $ref: '#/components/parameters/skipCount'
1271 - $ref: '#/components/parameters/start'
1272 - $ref: '#/components/parameters/count'
1273 - $ref: '#/components/parameters/videosSort'
1276 description: successful operation
1280 $ref: '#/components/schemas/VideoListResponse'
1282 '/users/me/subscriptions/{subscriptionHandle}':
1284 summary: Get subscription of my user
1291 - $ref: '#/components/parameters/subscriptionHandle'
1294 description: successful operation
1298 $ref: '#/components/schemas/VideoChannel'
1300 summary: Delete subscription of my user
1307 - $ref: '#/components/parameters/subscriptionHandle'
1310 description: successful operation
1312 /users/me/notifications:
1314 summary: List my notifications
1322 description: only list unread notifications
1325 - $ref: '#/components/parameters/start'
1326 - $ref: '#/components/parameters/count'
1327 - $ref: '#/components/parameters/sort'
1330 description: successful operation
1334 $ref: '#/components/schemas/NotificationListResponse'
1336 /users/me/notifications/read:
1338 summary: Mark notifications as read by their id
1351 description: ids of the notifications to mark as read
1358 description: successful operation
1360 /users/me/notifications/read-all:
1362 summary: Mark all my notification as read
1369 description: successful operation
1371 /users/me/notification-settings:
1373 summary: Update my notification settings
1384 newVideoFromSubscription:
1385 $ref: '#/components/schemas/NotificationSettingValue'
1386 newCommentOnMyVideo:
1387 $ref: '#/components/schemas/NotificationSettingValue'
1389 $ref: '#/components/schemas/NotificationSettingValue'
1390 videoAutoBlacklistAsModerator:
1391 $ref: '#/components/schemas/NotificationSettingValue'
1393 $ref: '#/components/schemas/NotificationSettingValue'
1395 $ref: '#/components/schemas/NotificationSettingValue'
1396 myVideoImportFinished:
1397 $ref: '#/components/schemas/NotificationSettingValue'
1399 $ref: '#/components/schemas/NotificationSettingValue'
1400 newUserRegistration:
1401 $ref: '#/components/schemas/NotificationSettingValue'
1403 $ref: '#/components/schemas/NotificationSettingValue'
1404 newInstanceFollower:
1405 $ref: '#/components/schemas/NotificationSettingValue'
1406 autoInstanceFollowing:
1407 $ref: '#/components/schemas/NotificationSettingValue'
1410 description: successful operation
1412 /users/me/history/videos:
1414 summary: List watched videos history
1420 - $ref: '#/components/parameters/start'
1421 - $ref: '#/components/parameters/count'
1422 - $ref: '#/components/parameters/search'
1425 description: successful operation
1429 $ref: '#/components/schemas/VideoListResponse'
1431 /users/me/history/videos/remove:
1433 summary: Clear video history
1440 multipart/form-data:
1445 description: history before this date will be deleted
1450 description: successful operation
1452 /users/me/avatar/pick:
1454 summary: Update my user avatar
1461 description: successful operation
1468 $ref: '#/components/schemas/ActorImage'
1470 description: image file too large
1472 X-File-Maximum-Size:
1476 description: Maximum file size for the avatar
1479 multipart/form-data:
1484 description: The file to upload
1489 contentType: image/png, image/jpeg
1493 summary: Delete my avatar
1500 description: successful operation
1504 summary: List video ownership changes
1506 - Video Ownership Change
1511 description: successful operation
1513 '/videos/ownership/{id}/accept':
1515 summary: Accept ownership change request
1517 - Video Ownership Change
1521 - $ref: '#/components/parameters/idOrUUID'
1524 description: successful operation
1526 description: cannot terminate an ownership change of another user
1528 description: video owneship change not found
1530 '/videos/ownership/{id}/refuse':
1532 summary: Refuse ownership change request
1534 - Video Ownership Change
1538 - $ref: '#/components/parameters/idOrUUID'
1541 description: successful operation
1543 description: cannot terminate an ownership change of another user
1545 description: video owneship change not found
1547 '/videos/{id}/give-ownership':
1549 summary: Request ownership change
1551 - Video Ownership Change
1555 - $ref: '#/components/parameters/idOrUUID'
1559 application/x-www-form-urlencoded:
1569 description: successful operation
1571 description: changing video ownership to a remote account is not supported yet
1573 description: video not found
1577 summary: List videos
1578 operationId: getVideos
1582 - $ref: '#/components/parameters/categoryOneOf'
1583 - $ref: '#/components/parameters/isLive'
1584 - $ref: '#/components/parameters/tagsOneOf'
1585 - $ref: '#/components/parameters/tagsAllOf'
1586 - $ref: '#/components/parameters/licenceOneOf'
1587 - $ref: '#/components/parameters/languageOneOf'
1588 - $ref: '#/components/parameters/nsfw'
1589 - $ref: '#/components/parameters/filter'
1590 - $ref: '#/components/parameters/skipCount'
1591 - $ref: '#/components/parameters/start'
1592 - $ref: '#/components/parameters/count'
1593 - $ref: '#/components/parameters/videosSort'
1596 description: successful operation
1600 $ref: '#/components/schemas/VideoListResponse'
1604 summary: List available video categories
1605 operationId: getCategories
1610 description: successful operation
1619 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
1623 summary: List available video licences
1624 operationId: getLicences
1629 description: successful operation
1638 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
1642 summary: List available video languages
1643 operationId: getLanguages
1648 description: successful operation
1657 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
1661 summary: List available video privacy policies
1662 operationId: getPrivacyPolicies
1667 description: successful operation
1676 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
1680 summary: Update a video
1681 operationId: putVideo
1687 - $ref: '#/components/parameters/idOrUUID'
1690 description: successful operation
1693 multipart/form-data:
1698 description: Video thumbnail file
1702 description: Video preview file
1706 $ref: '#/components/schemas/VideoCategorySet'
1708 $ref: '#/components/schemas/VideoLicenceSet'
1710 $ref: '#/components/schemas/VideoLanguageSet'
1712 $ref: '#/components/schemas/VideoPrivacySet'
1714 description: Video description
1717 description: Whether or not we wait transcoding before publish the video
1720 description: A text tell the audience how to support the video creator
1721 example: Please support our work on https://soutenir.framasoft.org/en/ <3
1724 description: Whether or not this video contains sensitive content
1727 description: Video name
1732 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1741 description: Enable or disable comments for this video
1743 originallyPublishedAt:
1744 description: Date when the content was originally published
1748 $ref: '#/components/schemas/VideoScheduledUpdate'
1751 contentType: image/jpeg
1753 contentType: image/jpeg
1755 summary: Get a video
1756 operationId: getVideo
1760 - $ref: '#/components/parameters/idOrUUID'
1763 description: successful operation
1767 $ref: '#/components/schemas/VideoDetails'
1769 summary: Delete a video
1770 operationId: delVideo
1776 - $ref: '#/components/parameters/idOrUUID'
1779 description: successful operation
1781 '/videos/{id}/description':
1783 summary: Get complete video description
1784 operationId: getVideoDesc
1788 - $ref: '#/components/parameters/idOrUUID'
1791 description: successful operation
1800 **[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)**
1802 '/videos/{id}/views':
1804 summary: Add a view to a video
1805 operationId: addView
1809 - $ref: '#/components/parameters/idOrUUID'
1812 description: successful operation
1814 '/videos/{id}/watching':
1816 summary: Set watching progress of a video
1817 operationId: setProgress
1823 - $ref: '#/components/parameters/idOrUUID'
1828 $ref: '#/components/schemas/UserWatchingVideo'
1832 description: successful operation
1836 summary: Upload a video
1837 description: Uses a single request to upload a video.
1838 operationId: uploadLegacy
1846 description: successful operation
1850 $ref: '#/components/schemas/VideoUploadResponse'
1852 description: video didn't pass upload filter
1854 description: upload has timed out
1856 x-summary: video file too large, due to quota or max body size limit set by the reverse-proxy
1858 If the response has no body, it means the reverse-proxy didn't let it through. Otherwise disambiguate via `type`:
1859 - `quota_reached` for quota limits wether daily or global
1861 X-File-Maximum-Size:
1865 description: Maximum file size for the video
1867 description: video type unsupported
1869 description: video unreadable
1872 multipart/form-data:
1874 $ref: '#/components/schemas/VideoUploadRequestLegacy'
1877 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1879 contentType: image/jpeg
1881 contentType: image/jpeg
1886 USERNAME="<your_username>"
1887 PASSWORD="<your_password>"
1888 FILE_PATH="<your_file_path>"
1889 CHANNEL_ID="<your_channel_id>"
1891 API="https://peertube2.cpy.re/api/v1"
1894 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
1895 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
1896 token=$(curl -s "$API/users/token" \
1897 --data client_id="$client_id" \
1898 --data client_secret="$client_secret" \
1899 --data grant_type=password \
1900 --data username="$USERNAME" \
1901 --data password="$PASSWORD" \
1902 | jq -r ".access_token")
1905 curl -s "$API/videos/upload" \
1906 -H "Authorization: Bearer $token" \
1908 --form videofile=@"$FILE_PATH" \
1909 --form channelId=$CHANNEL_ID \
1912 /videos/upload-resumable:
1914 summary: Initialize the resumable upload of a video
1915 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video
1916 operationId: uploadResumableInit
1923 - name: X-Upload-Content-Length
1929 description: Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading.
1930 - name: X-Upload-Content-Type
1937 description: MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.
1942 $ref: '#/components/schemas/VideoUploadRequestResumable'
1945 description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead
1947 description: created
1953 example: /api/v1/videos/upload-resumable?upload_id=471e97554f21dec3b8bb5d4602939c51
1959 x-summary: video file too large, due to quota, absolute max file size or concurrent partial upload limit
1961 Disambiguate via `type`:
1962 - `max_file_size_reached` for the absolute file size limit
1963 - `quota_reached` for quota limits whether daily or global
1965 description: video type unsupported
1967 summary: Send chunk for the resumable upload of a video
1968 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
1969 operationId: uploadResumable
1980 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
1981 not valid anymore and you need to initialize a new upload.
1984 - name: Content-Range
1988 example: bytes 0-262143/2469036
1991 Specifies the bytes in the file that the request is uploading.
1993 For example, a value of `bytes 0-262143/1000000` shows that the request is sending the first
1994 262144 bytes (256 x 1024) in a 2,469,036 byte file.
1995 - name: Content-Length
2002 Size of the chunk that the request is sending.
2004 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)
2005 doesn't mandate for chunks to have the same size throughout the upload sequence.
2007 Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from
2008 1048576 bytes (~1MB) and increases or reduces size depending on connection health.
2011 application/octet-stream:
2017 description: last chunk received
2025 $ref: '#/components/schemas/VideoUploadResponse'
2027 description: resume incomplete
2032 example: bytes=0-262143
2038 description: video didn't pass upload filter
2040 description: upload not found
2042 description: chunk doesn't match range
2044 description: video unreadable
2046 description: too many concurrent requests
2048 summary: Cancel the resumable upload of a video, deleting any data uploaded so far
2049 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video
2050 operationId: uploadResumableCancel
2061 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
2062 not valid anymore and the upload session has already been deleted with its data ;-)
2065 - name: Content-Length
2073 description: upload cancelled
2080 description: upload not found
2084 summary: Import a video
2085 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
2086 operationId: importVideo
2094 multipart/form-data:
2096 $ref: '#/components/schemas/VideoCreateImport'
2099 contentType: application/x-bittorrent
2101 contentType: image/jpeg
2103 contentType: image/jpeg
2106 description: successful operation
2110 $ref: '#/components/schemas/VideoUploadResponse'
2112 description: '`magnetUri` or `targetUrl` or a torrent file missing'
2114 description: video didn't pass pre-import filter
2116 description: HTTP or Torrent/magnetURI import not enabled
2120 summary: Create a live
2121 operationId: addLive
2129 description: successful operation
2133 $ref: '#/components/schemas/VideoUploadResponse'
2135 x-summary: validation error, or conflicting `saveReplay` and `permanentLive` parameter set
2137 Disambiguate via `type`:
2138 - default type for a validation error
2139 - `live_conflicting_permanent_and_save_replay` for conflicting parameters set
2141 x-summary: live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
2143 Disambiguate via `type`:
2144 - `live_not_enabled` for a disabled live feature
2145 - `live_not_allowing_replay` for a disabled replay feature
2146 - `max_instance_lives_limit_reached` for the absolute concurrent live limit
2147 - `max_user_lives_limit_reached` for the user concurrent live limit
2150 multipart/form-data:
2155 description: Channel id that will contain this live video
2160 description: User can stream multiple times in a permanent live
2163 description: Live video/replay thumbnail file
2167 description: Live video/replay preview file
2171 $ref: '#/components/schemas/VideoPrivacySet'
2173 $ref: '#/components/schemas/VideoCategorySet'
2175 $ref: '#/components/schemas/VideoLicenceSet'
2177 $ref: '#/components/schemas/VideoLanguageSet'
2179 description: Live video/replay description
2182 description: A text tell the audience how to support the creator
2183 example: Please support our work on https://soutenir.framasoft.org/en/ <3
2186 description: Whether or not this live video/replay contains sensitive content
2189 description: Live video/replay name
2194 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
2203 description: Enable or disable comments for this live video/replay
2206 description: Enable or disable downloading for the replay of this live
2213 contentType: image/jpeg
2215 contentType: image/jpeg
2219 summary: Get information about a live
2220 operationId: getLiveId
2227 - $ref: '#/components/parameters/idOrUUID'
2230 description: successful operation
2234 $ref: '#/components/schemas/LiveVideoResponse'
2236 summary: Update information about a live
2237 operationId: updateLiveId
2244 - $ref: '#/components/parameters/idOrUUID'
2249 $ref: '#/components/schemas/LiveVideoUpdate'
2252 description: successful operation
2254 description: bad parameters or trying to update a live that has already started
2256 description: trying to save replay of the live but saving replay is not enabled on the instance
2260 summary: List my abuses
2261 operationId: getMyAbuses
2270 description: only list the report with this id
2276 $ref: '#/components/schemas/AbuseStateSet'
2277 - $ref: '#/components/parameters/abusesSort'
2278 - $ref: '#/components/parameters/start'
2279 - $ref: '#/components/parameters/count'
2282 description: successful operation
2294 $ref: '#/components/schemas/Abuse'
2298 summary: List abuses
2299 operationId: getAbuses
2309 description: only list the report with this id
2312 - name: predefinedReason
2314 description: predefined reason the listed reports should contain
2316 $ref: '#/components/schemas/PredefinedAbuseReasons'
2319 description: plain search that will match with video titles, reporter names and more
2325 $ref: '#/components/schemas/AbuseStateSet'
2326 - name: searchReporter
2328 description: only list reports of a specific reporter
2331 - name: searchReportee
2332 description: only list reports of a specific reportee
2338 description: only list reports of a specific video
2341 - name: searchVideoChannel
2343 description: only list reports of a specific video channel
2348 description: only list deleted or blocklisted videos
2356 description: only list account, comment or video reports
2363 - $ref: '#/components/parameters/start'
2364 - $ref: '#/components/parameters/count'
2365 - $ref: '#/components/parameters/abusesSort'
2368 description: successful operation
2380 $ref: '#/components/schemas/Abuse'
2382 summary: Report an abuse
2395 description: Reason why the user reports this video
2400 $ref: '#/components/schemas/PredefinedAbuseReasons'
2405 description: Video id to report
2407 - $ref: '#/components/schemas/Video/properties/id'
2411 description: Timestamp in the video that marks the beginning of the report
2416 description: Timestamp in the video that marks the ending of the report
2422 description: Comment id to report
2424 - $ref: '#/components/schemas/VideoComment/properties/id'
2429 description: Account id to report
2435 description: successful operation
2445 $ref: '#/components/schemas/id'
2447 description: incorrect request parameters
2449 '/abuses/{abuseId}':
2451 summary: Update an abuse
2459 - $ref: '#/components/parameters/abuseId'
2467 $ref: '#/components/schemas/AbuseStateSet'
2470 description: Update the report comment visible only to the moderation team
2475 description: successful operation
2477 description: abuse not found
2481 summary: Delete an abuse
2487 - $ref: '#/components/parameters/abuseId'
2490 description: successful operation
2492 description: block not found
2494 '/abuses/{abuseId}/messages':
2496 summary: List messages of an abuse
2502 - $ref: '#/components/parameters/abuseId'
2505 description: successful operation
2517 $ref: '#/components/schemas/AbuseMessage'
2519 summary: Add message to an abuse
2525 - $ref: '#/components/parameters/abuseId'
2534 description: Message to send
2542 description: successful operation
2544 description: incorrect request parameters
2546 '/abuses/{abuseId}/messages/{abuseMessageId}':
2548 summary: Delete an abuse message
2554 - $ref: '#/components/parameters/abuseId'
2555 - $ref: '#/components/parameters/abuseMessageId'
2558 description: successful operation
2560 '/videos/{id}/blacklist':
2562 summary: Block a video
2563 operationId: addVideoBlock
2571 - $ref: '#/components/parameters/idOrUUID'
2574 description: successful operation
2576 summary: Unblock a video by its id
2577 operationId: delVideoBlock
2585 - $ref: '#/components/parameters/idOrUUID'
2588 description: successful operation
2590 description: block not found
2596 summary: List video blocks
2597 operationId: getVideoBlocks
2606 list only blocks that match this type:
2610 - `2`: automatic block that needs review
2618 description: plain search that will match with video titles, and more
2621 - $ref: '#/components/parameters/start'
2622 - $ref: '#/components/parameters/count'
2623 - $ref: '#/components/parameters/blacklistsSort'
2626 description: successful operation
2638 $ref: '#/components/schemas/VideoBlacklist'
2640 /videos/{id}/captions:
2642 summary: List captions of a video
2643 operationId: getVideoCaptions
2647 - $ref: '#/components/parameters/idOrUUID'
2650 description: successful operation
2662 $ref: '#/components/schemas/VideoCaption'
2664 /videos/{id}/captions/{captionLanguage}:
2666 summary: Add or replace a video caption
2667 operationId: addVideoCaption
2674 - $ref: '#/components/parameters/idOrUUID'
2675 - $ref: '#/components/parameters/captionLanguage'
2678 multipart/form-data:
2683 description: The file to upload.
2688 contentType: text/vtt, application/x-subrip, text/plain
2691 description: successful operation
2693 description: video or language not found
2695 summary: Delete a video caption
2696 operationId: delVideoCaption
2703 - $ref: '#/components/parameters/idOrUUID'
2704 - $ref: '#/components/parameters/captionLanguage'
2707 description: successful operation
2709 description: video or language or caption for that language not found
2713 summary: List video channels
2714 operationId: getVideoChannels
2718 - $ref: '#/components/parameters/start'
2719 - $ref: '#/components/parameters/count'
2720 - $ref: '#/components/parameters/sort'
2723 description: successful operation
2727 $ref: '#/components/schemas/VideoChannelList'
2729 summary: Create a video channel
2730 operationId: addVideoChannel
2737 description: successful operation
2747 $ref: '#/components/schemas/VideoChannel/properties/id'
2752 $ref: '#/components/schemas/VideoChannelCreate'
2754 '/video-channels/{channelHandle}':
2756 summary: Get a video channel
2757 operationId: getVideoChannel
2761 - $ref: '#/components/parameters/channelHandle'
2764 description: successful operation
2768 $ref: '#/components/schemas/VideoChannel'
2770 summary: Update a video channel
2771 operationId: putVideoChannel
2777 - $ref: '#/components/parameters/channelHandle'
2780 description: successful operation
2785 $ref: '#/components/schemas/VideoChannelUpdate'
2787 summary: Delete a video channel
2788 operationId: delVideoChannel
2794 - $ref: '#/components/parameters/channelHandle'
2797 description: successful operation
2799 '/video-channels/{channelHandle}/videos':
2801 summary: List videos of a video channel
2802 operationId: getVideoChannelVideos
2807 - $ref: '#/components/parameters/channelHandle'
2808 - $ref: '#/components/parameters/categoryOneOf'
2809 - $ref: '#/components/parameters/isLive'
2810 - $ref: '#/components/parameters/tagsOneOf'
2811 - $ref: '#/components/parameters/tagsAllOf'
2812 - $ref: '#/components/parameters/licenceOneOf'
2813 - $ref: '#/components/parameters/languageOneOf'
2814 - $ref: '#/components/parameters/nsfw'
2815 - $ref: '#/components/parameters/filter'
2816 - $ref: '#/components/parameters/skipCount'
2817 - $ref: '#/components/parameters/start'
2818 - $ref: '#/components/parameters/count'
2819 - $ref: '#/components/parameters/videosSort'
2822 description: successful operation
2826 $ref: '#/components/schemas/VideoListResponse'
2828 '/video-channels/{channelHandle}/avatar/pick':
2830 summary: Update channel avatar
2836 - $ref: '#/components/parameters/channelHandle'
2839 description: successful operation
2846 $ref: '#/components/schemas/ActorImage'
2848 description: image file too large
2850 X-File-Maximum-Size:
2854 description: Maximum file size for the avatar
2857 multipart/form-data:
2862 description: The file to upload.
2867 contentType: image/png, image/jpeg
2869 '/video-channels/{channelHandle}/avatar':
2871 summary: Delete channel avatar
2877 - $ref: '#/components/parameters/channelHandle'
2880 description: successful operation
2882 '/video-channels/{channelHandle}/banner/pick':
2884 summary: Update channel banner
2890 - $ref: '#/components/parameters/channelHandle'
2893 description: successful operation
2900 $ref: '#/components/schemas/ActorImage'
2902 description: image file too large
2904 X-File-Maximum-Size:
2908 description: Maximum file size for the banner
2911 multipart/form-data:
2916 description: The file to upload.
2921 contentType: image/png, image/jpeg
2923 '/video-channels/{channelHandle}/banner':
2925 summary: Delete channel banner
2931 - $ref: '#/components/parameters/channelHandle'
2934 description: successful operation
2936 /video-playlists/privacies:
2938 summary: List available playlist privacy policies
2939 operationId: getPlaylistPrivacyPolicies
2944 description: successful operation
2953 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
2957 summary: List video playlists
2958 operationId: getPlaylists
2962 - $ref: '#/components/parameters/start'
2963 - $ref: '#/components/parameters/count'
2964 - $ref: '#/components/parameters/sort'
2967 description: successful operation
2979 $ref: '#/components/schemas/VideoPlaylist'
2981 summary: Create a video playlist
2982 description: If the video playlist is set as public, `videoChannelId` is mandatory.
2983 operationId: addPlaylist
2990 description: successful operation
3000 $ref: '#/components/schemas/VideoPlaylist/properties/id'
3002 $ref: '#/components/schemas/VideoPlaylist/properties/uuid'
3005 multipart/form-data:
3010 description: Video playlist display name
3015 description: Video playlist thumbnail file
3019 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
3021 description: Video playlist description
3027 - $ref: '#/components/schemas/id'
3028 description: Video channel in which the playlist will be published
3033 contentType: image/jpeg
3035 /video-playlists/{playlistId}:
3037 summary: Get a video playlist
3041 - $ref: '#/components/parameters/playlistId'
3044 description: successful operation
3048 $ref: '#/components/schemas/VideoPlaylist'
3050 summary: Update a video playlist
3051 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
3058 description: successful operation
3060 - $ref: '#/components/parameters/playlistId'
3063 multipart/form-data:
3068 description: Video playlist display name
3073 description: Video playlist thumbnail file
3077 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
3079 description: Video playlist description
3083 - $ref: '#/components/schemas/id'
3084 description: Video channel in which the playlist will be published
3087 contentType: image/jpeg
3089 summary: Delete a video playlist
3095 - $ref: '#/components/parameters/playlistId'
3098 description: successful operation
3100 /video-playlists/{playlistId}/videos:
3102 summary: 'List videos of a playlist'
3103 operationId: getVideoPlaylistVideos
3108 - $ref: '#/components/parameters/playlistId'
3111 description: successful operation
3115 $ref: '#/components/schemas/VideoListResponse'
3117 summary: Add a video in a playlist
3118 operationId: addVideoPlaylistVideo
3125 - $ref: '#/components/parameters/playlistId'
3128 description: successful operation
3134 videoPlaylistElement:
3148 - $ref: '#/components/schemas/Video/properties/uuid'
3149 - $ref: '#/components/schemas/Video/properties/id'
3150 description: Video to add in the playlist
3154 description: Start the video at this specific timestamp
3158 description: Stop the video at this specific timestamp
3162 /video-playlists/{playlistId}/videos/reorder:
3164 summary: 'Reorder a playlist'
3165 operationId: reorderVideoPlaylist
3171 - $ref: '#/components/parameters/playlistId'
3174 description: successful operation
3183 description: 'Start position of the element to reorder'
3185 insertAfterPosition:
3187 description: 'New position for the block to reorder, to add the block before the first element'
3191 description: 'How many element from `startPosition` to reorder'
3195 - insertAfterPosition
3197 /video-playlists/{playlistId}/videos/{playlistElementId}:
3199 summary: Update a playlist element
3200 operationId: putVideoPlaylistVideo
3206 - $ref: '#/components/parameters/playlistId'
3207 - $ref: '#/components/parameters/playlistElementId'
3210 description: successful operation
3220 description: Start the video at this specific timestamp
3224 description: Stop the video at this specific timestamp
3226 summary: Delete an element from a playlist
3227 operationId: delVideoPlaylistVideo
3233 - $ref: '#/components/parameters/playlistId'
3234 - $ref: '#/components/parameters/playlistElementId'
3237 description: successful operation
3239 '/users/me/video-playlists/videos-exist':
3241 summary: Check video exists in my playlists
3250 description: The video ids to check
3254 $ref: '#/components/schemas/Video/properties/id'
3257 description: successful operation
3279 '/accounts/{name}/video-channels':
3281 summary: List video channels of an account
3286 - $ref: '#/components/parameters/name'
3289 description: include view statistics for the last 30 days (only if authentified as the account user)
3292 - $ref: '#/components/parameters/start'
3293 - $ref: '#/components/parameters/count'
3294 - $ref: '#/components/parameters/sort'
3297 description: successful operation
3301 $ref: '#/components/schemas/VideoChannelList'
3303 '/accounts/{name}/ratings':
3305 summary: List ratings of an account
3311 - $ref: '#/components/parameters/name'
3312 - $ref: '#/components/parameters/start'
3313 - $ref: '#/components/parameters/count'
3314 - $ref: '#/components/parameters/sort'
3318 description: Optionally filter which ratings to retrieve
3326 description: successful operation
3332 $ref: '#/components/schemas/VideoRating'
3334 '/videos/{id}/comment-threads':
3336 summary: List threads of a video
3340 - $ref: '#/components/parameters/idOrUUID'
3341 - $ref: '#/components/parameters/start'
3342 - $ref: '#/components/parameters/count'
3343 - $ref: '#/components/parameters/commentsSort'
3346 description: successful operation
3350 $ref: '#/components/schemas/CommentThreadResponse'
3352 summary: Create a thread
3358 - $ref: '#/components/parameters/idOrUUID'
3361 description: successful operation
3365 $ref: '#/components/schemas/CommentThreadPostResponse'
3367 description: video does not exist
3376 - $ref: '#/components/schemas/VideoComment/properties/text'
3382 '/videos/{id}/comment-threads/{threadId}':
3384 summary: Get a thread
3388 - $ref: '#/components/parameters/idOrUUID'
3389 - $ref: '#/components/parameters/threadId'
3392 description: successful operation
3396 $ref: '#/components/schemas/VideoCommentThreadTree'
3398 '/videos/{id}/comments/{commentId}':
3400 summary: Reply to a thread of a video
3406 - $ref: '#/components/parameters/idOrUUID'
3407 - $ref: '#/components/parameters/commentId'
3410 description: successful operation
3414 $ref: '#/components/schemas/CommentThreadPostResponse'
3416 description: thread or video does not exist
3425 - $ref: '#/components/schemas/VideoComment/properties/text'
3431 summary: Delete a comment or a reply
3437 - $ref: '#/components/parameters/idOrUUID'
3438 - $ref: '#/components/parameters/commentId'
3441 description: successful operation
3443 description: cannot remove comment of another user
3445 description: comment or video does not exist
3447 description: comment is already deleted
3449 '/videos/{id}/rate':
3451 summary: Like/dislike a video
3457 - $ref: '#/components/parameters/idOrUUID'
3473 description: successful operation
3475 description: video does not exist
3481 summary: Search videos
3482 operationId: searchVideos
3487 allowEmptyValue: false
3489 String to search. If the user can make a remote URI search, and the string is an URI then the
3490 PeerTube instance will fetch the remote object and add it to its database. Then,
3491 you can use the REST API to fetch the complete video information and interact with it.
3494 - $ref: '#/components/parameters/categoryOneOf'
3495 - $ref: '#/components/parameters/isLive'
3496 - $ref: '#/components/parameters/tagsOneOf'
3497 - $ref: '#/components/parameters/tagsAllOf'
3498 - $ref: '#/components/parameters/licenceOneOf'
3499 - $ref: '#/components/parameters/languageOneOf'
3500 - $ref: '#/components/parameters/nsfw'
3501 - $ref: '#/components/parameters/filter'
3502 - $ref: '#/components/parameters/skipCount'
3503 - $ref: '#/components/parameters/start'
3504 - $ref: '#/components/parameters/count'
3505 - $ref: '#/components/parameters/searchTarget'
3506 - $ref: '#/components/parameters/videosSearchSort'
3509 description: Get videos that are published after this date
3515 description: Get videos that are published before this date
3519 - name: originallyPublishedStartDate
3521 description: Get videos that are originally published after this date
3525 - name: originallyPublishedEndDate
3527 description: Get videos that are originally published before this date
3533 description: Get videos that have this minimum duration
3538 description: Get videos that have this maximum duration
3542 'searchTarget === search-index':
3543 $ref: '#/components/callbacks/searchIndex'
3546 description: successful operation
3550 $ref: '#/components/schemas/VideoListResponse'
3552 description: search index unavailable
3554 /search/video-channels:
3558 summary: Search channels
3559 operationId: searchChannels
3565 String to search. If the user can make a remote URI search, and the string is an URI then the
3566 PeerTube instance will fetch the remote object and add it to its database. Then,
3567 you can use the REST API to fetch the complete channel information and interact with it.
3570 - $ref: '#/components/parameters/start'
3571 - $ref: '#/components/parameters/count'
3572 - $ref: '#/components/parameters/searchTarget'
3573 - $ref: '#/components/parameters/sort'
3575 'searchTarget === search-index':
3576 $ref: '#/components/callbacks/searchIndex'
3579 description: successful operation
3583 $ref: '#/components/schemas/VideoChannelList'
3585 description: search index unavailable
3587 /search/video-playlists:
3591 summary: Search playlists
3592 operationId: searchPlaylists
3598 String to search. If the user can make a remote URI search, and the string is an URI then the
3599 PeerTube instance will fetch the remote object and add it to its database. Then,
3600 you can use the REST API to fetch the complete playlist information and interact with it.
3603 - $ref: '#/components/parameters/start'
3604 - $ref: '#/components/parameters/count'
3605 - $ref: '#/components/parameters/searchTarget'
3606 - $ref: '#/components/parameters/sort'
3608 'searchTarget === search-index':
3609 $ref: '#/components/callbacks/searchIndex'
3612 description: successful operation
3624 $ref: '#/components/schemas/VideoPlaylist'
3626 description: search index unavailable
3628 /server/blocklist/accounts:
3632 summary: List account blocks
3637 - $ref: '#/components/parameters/start'
3638 - $ref: '#/components/parameters/count'
3639 - $ref: '#/components/parameters/sort'
3642 description: successful operation
3646 summary: Block an account
3658 example: chocobozzz@example.org
3659 description: account to block, in the form `username@domain`
3664 description: successful operation
3666 description: self-blocking forbidden
3668 '/server/blocklist/accounts/{accountName}':
3672 summary: Unblock an account by its handle
3680 description: account to unblock, in the form `username@domain`
3685 description: successful operation
3687 description: account or account block does not exist
3689 /server/blocklist/servers:
3693 summary: List server blocks
3698 - $ref: '#/components/parameters/start'
3699 - $ref: '#/components/parameters/count'
3700 - $ref: '#/components/parameters/sort'
3703 description: successful operation
3707 summary: Block a server
3720 description: server domain to block
3725 description: successful operation
3727 description: self-blocking forbidden
3729 '/server/blocklist/servers/{host}':
3733 summary: Unblock a server by its domain
3741 description: server domain to unblock
3747 description: successful operation
3749 description: account block does not exist
3751 /server/redundancy/{host}:
3754 - Instance Redundancy
3755 summary: Update a server redundancy policy
3763 description: server domain to mirror
3775 description: allow mirroring of the host's local videos
3780 description: successful operation
3782 description: server is not already known
3784 /server/redundancy/videos:
3788 summary: List videos being mirrored
3789 operationId: getMirroredVideos
3797 description: direction of the mirror
3803 - $ref: '#/components/parameters/start'
3804 - $ref: '#/components/parameters/count'
3805 - $ref: '#/components/parameters/videoRedundanciesSort'
3808 description: successful operation
3814 $ref: '#/components/schemas/VideoRedundancy'
3818 summary: Mirror a video
3819 operationId: putMirroredVideo
3830 $ref: '#/components/schemas/Video/properties/id'
3835 description: successful operation
3837 description: cannot mirror a local video
3839 description: video does not exist
3841 description: video is already mirrored
3843 /server/redundancy/videos/{redundancyId}:
3847 summary: Delete a mirror done on a video
3848 operationId: delMirroredVideo
3853 - name: redundancyId
3856 description: id of an existing redundancy on a video
3861 description: successful operation
3863 description: video redundancy not found
3865 '/feeds/video-comments.{format}':
3869 summary: List comments on videos
3870 operationId: getSyndicatedComments
3875 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3888 description: 'limit listing to a specific video'
3893 description: 'limit listing to a specific account'
3898 description: 'limit listing to a specific account'
3901 - name: videoChannelId
3903 description: 'limit listing to a specific video channel'
3906 - name: videoChannelName
3908 description: 'limit listing to a specific video channel'
3913 description: successful operation
3918 default: 'max-age=900' # 15 min cache
3922 $ref: '#/components/schemas/VideoCommentsForXML'
3925 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3926 application/rss+xml:
3928 $ref: '#/components/schemas/VideoCommentsForXML'
3931 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
3934 $ref: '#/components/schemas/VideoCommentsForXML'
3937 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3938 application/atom+xml:
3940 $ref: '#/components/schemas/VideoCommentsForXML'
3943 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
3949 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
3951 x-summary: field inconsistencies
3954 - videoId filter is mixed with a channel filter
3956 description: video, video channel or account not found
3958 description: accept header unsupported
3960 '/feeds/videos.{format}':
3964 summary: List videos
3965 operationId: getSyndicatedVideos
3970 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3983 description: 'limit listing to a specific account'
3988 description: 'limit listing to a specific account'
3991 - name: videoChannelId
3993 description: 'limit listing to a specific video channel'
3996 - name: videoChannelName
3998 description: 'limit listing to a specific video channel'
4001 - $ref: '#/components/parameters/sort'
4002 - $ref: '#/components/parameters/nsfw'
4003 - $ref: '#/components/parameters/filter'
4006 description: successful operation
4011 default: 'max-age=900' # 15 min cache
4015 $ref: '#/components/schemas/VideosForXML'
4018 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
4019 application/rss+xml:
4021 $ref: '#/components/schemas/VideosForXML'
4024 externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
4027 $ref: '#/components/schemas/VideosForXML'
4030 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
4031 application/atom+xml:
4033 $ref: '#/components/schemas/VideosForXML'
4036 externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
4042 externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
4044 description: video channel or account not found
4046 description: accept header unsupported
4048 '/feeds/subscriptions.{format}':
4053 summary: List videos of subscriptions tied to a token
4054 operationId: getSyndicatedSubscriptionVideos
4059 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
4072 description: limit listing to a specific account
4078 description: private token allowing access
4082 - $ref: '#/components/parameters/sort'
4083 - $ref: '#/components/parameters/nsfw'
4084 - $ref: '#/components/parameters/filter'
4087 description: successful operation
4092 default: 'max-age=900' # 15 min cache
4096 $ref: '#/components/schemas/VideosForXML'
4097 application/rss+xml:
4099 $ref: '#/components/schemas/VideosForXML'
4102 $ref: '#/components/schemas/VideosForXML'
4103 application/atom+xml:
4105 $ref: '#/components/schemas/VideosForXML'
4110 description: accept header unsupported
4116 summary: List plugins
4117 operationId: getPlugins
4130 - $ref: '#/components/parameters/start'
4131 - $ref: '#/components/parameters/count'
4132 - $ref: '#/components/parameters/sort'
4135 description: successful operation
4139 $ref: '#/components/schemas/PluginResponse'
4145 summary: List available plugins
4146 operationId: getAvailablePlugins
4159 - name: currentPeerTubeEngine
4163 - $ref: '#/components/parameters/start'
4164 - $ref: '#/components/parameters/count'
4165 - $ref: '#/components/parameters/sort'
4168 description: successful operation
4172 $ref: '#/components/schemas/PluginResponse'
4174 description: plugin index unavailable
4180 summary: Install a plugin
4181 operationId: addPlugin
4194 example: peertube-plugin-auth-ldap
4197 additionalProperties: false
4204 additionalProperties: false
4207 description: successful operation
4209 description: should have either `npmName` or `path` set
4215 summary: Update a plugin
4216 operationId: updatePlugin
4229 example: peertube-plugin-auth-ldap
4232 additionalProperties: false
4239 additionalProperties: false
4242 description: successful operation
4244 description: should have either `npmName` or `path` set
4246 description: existing plugin not found
4252 summary: Uninstall a plugin
4253 operationId: uninstallPlugin
4265 description: name of the plugin/theme in its package.json
4266 example: peertube-plugin-auth-ldap
4271 description: successful operation
4273 description: existing plugin not found
4279 summary: Get a plugin
4280 operationId: getPlugin
4285 - $ref: '#/components/parameters/npmName'
4288 description: successful operation
4292 $ref: '#/components/schemas/Plugin'
4294 description: plugin not found
4296 /plugins/{npmName}/settings:
4300 summary: Set a plugin's settings
4305 - $ref: '#/components/parameters/npmName'
4314 additionalProperties: true
4317 description: successful operation
4319 description: plugin not found
4321 /plugins/{npmName}/public-settings:
4325 summary: Get a plugin's public settings
4327 - $ref: '#/components/parameters/npmName'
4330 description: successful operation
4335 additionalProperties: true
4337 description: plugin not found
4339 /plugins/{npmName}/registered-settings:
4343 summary: Get a plugin's registered settings
4348 - $ref: '#/components/parameters/npmName'
4351 description: successful operation
4356 additionalProperties: true
4358 description: plugin not found
4361 - url: 'https://peertube2.cpy.re/api/v1'
4362 description: Live Test Server (live data - latest nightly version)
4363 - url: 'https://peertube3.cpy.re/api/v1'
4364 description: Live Test Server (live data - latest RC version)
4365 - url: 'https://peertube.cpy.re/api/v1'
4366 description: Live Test Server (live data - stable version)
4373 description: Offset used to paginate results
4381 description: "Number of items to return"
4391 description: Sort column
4399 description: Plain text search, applied to various parts of the model depending on endpoint
4407 If the administrator enabled search index support, you can override the default search target.
4410 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
4411 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
4412 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
4413 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
4414 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
4415 * 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
4416 the data from the origin instance API
4426 description: Sort videos by criteria
4442 description: Sort videos by criteria
4457 description: Sort comments by criteria
4467 description: Sort blocklists by criteria
4483 description: Plain text search that will match with user usernames or emails
4490 description: Filter results down to (un)banned users
4497 description: Sort users by criteria
4508 description: Sort abuses by criteria
4515 videoRedundanciesSort:
4519 description: Sort abuses by criteria
4528 description: The username or handle of the account
4531 example: chocobozzz | chocobozzz@example.org
4536 description: The user id
4538 $ref: '#/components/schemas/id'
4543 description: The object id or uuid
4546 - $ref: '#/components/schemas/id'
4547 - $ref: '#/components/schemas/UUIDv4'
4552 description: Playlist id
4554 $ref: '#/components/schemas/VideoPlaylist/properties/id'
4556 name: playlistElementId
4559 description: Playlist element id
4561 $ref: '#/components/schemas/id'
4566 description: Abuse id
4568 $ref: '#/components/schemas/Abuse/properties/id'
4570 name: abuseMessageId
4573 description: Abuse message id
4575 $ref: '#/components/schemas/AbuseMessage/properties/id'
4577 name: captionLanguage
4580 description: The caption language
4582 $ref: '#/components/schemas/VideoLanguageSet'
4587 description: The video channel handle
4590 example: my_username | my_username@example.com
4592 name: subscriptionHandle
4595 description: The subscription handle
4598 example: my_username | my_username@example.com
4603 description: The thread id (root comment id)
4610 description: The comment id
4612 $ref: '#/components/schemas/VideoComment/properties/id'
4617 description: whether or not the video is a live
4624 description: category id of the video (see [/videos/categories](#operation/getCategories))
4627 - $ref: '#/components/schemas/VideoCategorySet'
4630 $ref: '#/components/schemas/VideoCategorySet'
4637 description: tag(s) of the video
4651 description: tag(s) of the video, where all should be present in the video
4664 description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language
4667 - $ref: '#/components/schemas/VideoLanguageSet'
4670 $ref: '#/components/schemas/VideoLanguageSet'
4677 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4680 - $ref: '#/components/schemas/VideoLicenceSet'
4683 $ref: '#/components/schemas/VideoLicenceSet'
4690 description: if you don't need the `total` in the response
4701 description: whether to include nsfw videos, if any
4712 Special filters which might require special rights:
4713 * `local` - only videos local to the instance
4714 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
4715 * `all` - all videos, showing private and unlisted videos (requires Admin privileges)
4725 description: list of uris to check if each is part of the user subscriptions
4735 description: name of the plugin/theme on npmjs.com or in its package.json
4738 example: peertube-plugin-auth-ldap
4743 description: job type
4747 - activitypub-follow
4748 - activitypub-http-broadcast
4749 - activitypub-http-fetcher
4750 - activitypub-http-unicast
4756 - activitypub-refresher
4781 Authenticating via OAuth requires the following steps:
4782 - Have an activated account
4783 - [Generate] an access token for that account at `/api/v1/users/token`.
4784 - Make requests with the *Authorization: Bearer <token\>* header
4785 - Profit, depending on the role assigned to the account
4787 Note that the __access token is valid for 1 day__ and is given
4788 along with a __refresh token valid for 2 weeks__.
4790 [Generate]: https://docs.joinpeertube.org/api-rest-getting-started
4794 tokenUrl: /api/v1/users/token
4797 moderator: Moderator scope
4800 # Resuable core properties
4808 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4809 pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
4814 description: immutable name of the user, used to find or mention its actor
4816 pattern: '/^[a-z0-9._]+$/'
4821 description: immutable name of the channel, used to interact with its actor
4822 example: framasoft_videos
4823 pattern: '/^[a-zA-Z0-9\\-_.:]+$/'
4834 description: category id of the video (see [/videos/categories](#operation/getCategories))
4836 VideoConstantNumber-Category:
4839 $ref: '#/components/schemas/VideoCategorySet'
4842 example: Science & Technology
4846 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4848 VideoConstantNumber-Licence:
4851 $ref: '#/components/schemas/VideoLicenceSet'
4854 example: Attribution - Share Alike
4858 description: language id of the video (see [/videos/languages](#operation/getLanguages))
4860 VideoConstantString-Language:
4863 $ref: '#/components/schemas/VideoLanguageSet'
4868 VideoPlaylistPrivacySet:
4874 description: Video playlist privacy policy (see [/video-playlists/privacies])
4875 VideoPlaylistPrivacyConstant:
4878 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4882 VideoPlaylistTypeSet:
4887 description: The video playlist type (Regular = `1`, Watch Later = `2`)
4888 VideoPlaylistTypeConstant:
4891 $ref: '#/components/schemas/VideoPlaylistTypeSet'
4902 description: privacy id of the video (see [/videos/privacies](#operation/getPrivacyPolicies))
4903 VideoPrivacyConstant:
4906 $ref: '#/components/schemas/VideoPrivacySet'
4923 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
4930 description: 'Admin flags for the user (None = `0`, Bypass video blocklist = `1`)'
4941 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
4951 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
4955 $ref: '#/components/schemas/AbuseStateSet'
4958 AbusePredefinedReasons:
4971 example: [spamOrMisleading]
4976 Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`)
4978 `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos.
4980 VideoResolutionConstant:
4981 description: resolutions and their labels for the video
4984 $ref: '#/components/schemas/VideoResolutionSet'
4988 VideoScheduledUpdate:
4991 $ref: '#/components/schemas/VideoPrivacySet'
4995 description: When to update the video
5015 - $ref: '#/components/schemas/ActorImage'
5016 VideoChannelSummary:
5019 $ref: '#/components/schemas/id'
5033 - $ref: '#/components/schemas/ActorImage'
5047 - $ref: '#/components/schemas/Video'
5054 description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file
5055 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
5056 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5058 $ref: '#/components/schemas/VideoResolutionConstant'
5061 description: Video file size in bytes
5064 description: Direct URL of the torrent file
5068 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
5072 description: Direct URL of the video
5076 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
5080 description: Frames per second of the video file
5084 description: URL dereferencing the output of ffprobe on the file
5085 VideoStreamingPlaylists:
5090 $ref: '#/components/schemas/id'
5098 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS'
5099 VideoStreamingPlaylists-HLS:
5110 Video files associated to this playlist.
5112 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.)
5114 $ref: '#/components/schemas/VideoFile'
5126 $ref: '#/components/schemas/Video/properties/id'
5128 $ref: '#/components/schemas/Video/properties/uuid'
5130 $ref: '#/components/schemas/Video/properties/name'
5134 description: object id for the video
5136 - $ref: '#/components/schemas/id'
5138 description: universal identifier for the video, that can be used across instances
5140 - $ref: '#/components/schemas/UUIDv4'
5146 example: 2017-10-01T10:52:46.396Z
5147 description: time at which the video object was first drafted
5151 example: 2018-10-01T10:52:46.396Z
5152 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
5156 example: 2021-05-04T08:01:01.502Z
5157 description: last time the video's metadata was modified
5158 originallyPublishedAt:
5161 example: 2010-10-01T10:52:46.396Z
5162 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
5165 - $ref: '#/components/schemas/VideoConstantNumber-Category'
5166 description: category in which the video is classified
5169 - $ref: '#/components/schemas/VideoConstantNumber-Licence'
5170 description: licence under which the video is distributed
5173 - $ref: '#/components/schemas/VideoConstantString-Language'
5174 description: main language used in the video
5177 - $ref: '#/components/schemas/VideoPrivacyConstant'
5178 description: privacy policy used to distribute the video
5182 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n
5183 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr...
5187 truncated description of the video, written in Markdown.
5188 Resolve `descriptionPath` to get the full description of maximum `10000` characters.
5193 description: duration of the video in seconds
5198 description: title of the video
5199 example: What is PeerTube?
5204 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5207 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5210 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
5227 - $ref: '#/components/schemas/VideoStateConstant'
5228 description: represents the internal state of the video processing within the PeerTube instance
5232 - $ref: '#/components/schemas/VideoScheduledUpdate'
5240 $ref: '#/components/schemas/AccountSummary'
5242 $ref: '#/components/schemas/VideoChannelSummary'
5251 - $ref: '#/components/schemas/Video'
5256 example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description
5257 description: path at which to get the full description of maximum `10000` characters
5260 description: A text tell the audience how to support the video creator
5261 example: Please support our work on https://soutenir.framasoft.org/en/ <3
5265 $ref: '#/components/schemas/VideoChannel'
5267 $ref: '#/components/schemas/Account'
5269 example: [flowers, gardening]
5287 - https://peertube2.cpy.re/tracker/announce
5288 - wss://peertube2.cpy.re/tracker/socket
5292 $ref: '#/components/schemas/VideoFile'
5294 WebTorrent/raw video files. If WebTorrent is disabled on the server:
5296 - field will be empty
5297 - video files will be found in `streamingPlaylists[].files` field
5301 $ref: '#/components/schemas/VideoStreamingPlaylists'
5303 HLS playlists/manifest files. If HLS is disabled on the server:
5305 - field will be empty
5306 - video files will be found in `files` field
5307 FileRedundancyInformation:
5310 $ref: '#/components/schemas/id'
5335 $ref: '#/components/schemas/id'
5342 $ref: '#/components/schemas/UUIDv4'
5349 $ref: '#/components/schemas/FileRedundancyInformation'
5353 $ref: '#/components/schemas/FileRedundancyInformation'
5354 VideoImportStateConstant:
5362 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
5369 additionalProperties: false
5373 $ref: '#/components/schemas/VideoImport/properties/targetUrl'
5374 required: [targetUrl]
5377 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
5378 required: [magnetUri]
5381 $ref: '#/components/schemas/VideoImport/properties/torrentfile'
5382 required: [torrentfile]
5383 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5392 - $ref: '#/components/schemas/id'
5396 description: remote URL where to find the import's source video
5397 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
5401 description: magnet URI allowing to resolve the import's source video
5402 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
5403 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5408 description: Torrent file containing only the video file
5415 - $ref: '#/components/schemas/VideoImportStateConstant'
5431 - $ref: '#/components/schemas/Video'
5441 $ref: '#/components/schemas/VideoImport'
5445 $ref: '#/components/schemas/id'
5448 example: The video is a spam
5452 $ref: '#/components/schemas/AbusePredefinedReasons'
5454 $ref: '#/components/schemas/Account'
5456 $ref: '#/components/schemas/AbuseStateConstant'
5459 example: Decided to ban the server since it spams us regularly
5463 $ref: '#/components/schemas/VideoInfo'
5470 $ref: '#/components/schemas/id'
5481 $ref: '#/components/schemas/AccountSummary'
5485 $ref: '#/components/schemas/id'
5487 $ref: '#/components/schemas/Video/properties/id'
5499 $ref: '#/components/schemas/UUIDv4'
5517 $ref: '#/components/schemas/id'
5519 $ref: '#/components/schemas/UUIDv4'
5542 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
5544 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
5546 $ref: '#/components/schemas/AccountSummary'
5548 $ref: '#/components/schemas/VideoChannelSummary'
5552 $ref: '#/components/schemas/id'
5559 description: Text of the comment
5561 example: This video is wonderful!
5563 $ref: '#/components/schemas/id'
5567 - $ref: '#/components/schemas/id'
5569 $ref: '#/components/schemas/Video/properties/id'
5584 totalRepliesFromVideoAuthor:
5591 $ref: '#/components/schemas/Account'
5592 VideoCommentThreadTree:
5595 $ref: '#/components/schemas/VideoComment'
5599 $ref: '#/components/schemas/VideoCommentThreadTree'
5603 $ref: '#/components/schemas/VideoConstantString-Language'
5619 $ref: '#/components/schemas/id'
5636 $ref: '#/components/schemas/id'
5641 description: immutable name of the actor, used to find or mention it
5643 - $ref: '#/components/schemas/username'
5647 description: server on which the actor is resident
5648 hostRedundancyAllowed:
5650 description: whether this actor's host allows redundancy of its videos
5654 description: number of actors subscribed to by this actor, as seen by this instance
5658 description: number of followers of this actor, as seen by this instance
5666 $ref: '#/components/schemas/ActorImage'
5669 - $ref: '#/components/schemas/Actor'
5672 description: object id for the user tied to this account
5674 - $ref: '#/components/schemas/User/properties/id'
5677 description: editable name of the account, displayed in its representations
5682 description: text or bio displayed on the account's profile
5688 description: timestamp within the video, in seconds
5755 allowedForCurrentIP:
5757 requiresEmailVerification:
5775 $ref: '#/components/schemas/VideoResolutionSet'
5860 example: 16810141515
5969 requiresEmailVerification:
5984 description: Settings that apply to new users, if registration is enabled
5988 example: 16810141515
5994 description: Settings pertaining to transcoding jobs
5998 allowAdditionalExtensions:
6000 description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos
6003 description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
6006 description: Amount of threads used by ffmpeg for 1 transcoding job
6009 description: Amount of transcoding jobs to execute in parallel
6015 New profiles can be added by plugins ; available in core PeerTube: 'default'.
6018 description: Resolutions to transcode _new videos_ to
6038 description: WebTorrent-specific settings
6044 description: HLS-specific settings
6094 $ref: '#/components/schemas/id'
6096 $ref: '#/components/schemas/Actor'
6098 $ref: '#/components/schemas/Actor'
6101 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
6114 PredefinedAbuseReasons:
6115 description: Reason categories that help triage reports
6133 $ref: '#/components/schemas/id'
6145 - activitypub-http-unicast
6146 - activitypub-http-broadcast
6147 - activitypub-http-fetcher
6148 - activitypub-follow
6154 - activitypub-refresher
6158 additionalProperties: true
6161 additionalProperties: true
6177 $ref: '#/components/schemas/id'
6182 $ref: '#/components/schemas/id'
6183 VideoUploadRequestCommon:
6186 description: Video name
6188 example: What is PeerTube?
6192 description: Channel id that will contain this video
6197 $ref: '#/components/schemas/VideoPrivacySet'
6199 $ref: '#/components/schemas/VideoCategorySet'
6201 $ref: '#/components/schemas/VideoLicenceSet'
6203 $ref: '#/components/schemas/VideoLanguageSet'
6205 description: Video description
6208 **[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)**
6210 description: Whether or not we wait transcoding before publish the video
6213 description: A text tell the audience how to support the video creator
6214 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6217 description: Whether or not this video contains sensitive content
6220 description: Video tags (maximum 5 tags each between 2 and 30 characters)
6233 description: Enable or disable comments for this video
6236 description: Enable or disable downloading for this video
6238 originallyPublishedAt:
6239 description: Date when the content was originally published
6243 $ref: '#/components/schemas/VideoScheduledUpdate'
6245 description: Video thumbnail file
6249 description: Video preview file
6255 VideoUploadRequestLegacy:
6257 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6263 description: Video file
6266 VideoUploadRequestResumable:
6268 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6274 description: Video filename including extension
6277 example: what_is_peertube.mp4
6279 description: Video thumbnail file
6283 description: Video preview file
6286 VideoUploadResponse:
6292 $ref: '#/components/schemas/Video/properties/id'
6294 $ref: '#/components/schemas/Video/properties/uuid'
6295 CommentThreadResponse:
6304 $ref: '#/components/schemas/VideoComment'
6305 CommentThreadPostResponse:
6308 $ref: '#/components/schemas/VideoComment'
6318 $ref: '#/components/schemas/Video'
6322 $ref: '#/components/schemas/Account'
6325 description: Automatically start playing the upcoming video after the currently playing video
6326 autoPlayNextVideoPlaylist:
6328 description: Automatically start playing the video on the playlist after the currently playing video
6331 description: Automatically start playing the video on the watch page
6341 description: The user email
6344 description: Has the user confirmed their email address?
6347 - $ref: '#/components/schemas/id'
6351 description: Auth plugin to use to authenticate the user
6355 noInstanceConfigWarningModal:
6360 $ref: '#/components/schemas/NSFWPolicy'
6362 $ref: '#/components/schemas/UserRole'
6371 description: Theme enabled by this user
6373 $ref: '#/components/schemas/username'
6377 $ref: '#/components/schemas/VideoChannel'
6380 description: The user video quota in bytes
6384 description: The user daily video quota in bytes
6388 description: Enable P2P in the player
6391 - $ref: '#/components/schemas/User'
6393 # optionally present fields: they require WITH_STATS scope
6396 description: Count of videos published
6399 description: Count of reports/abuses of which the user is a target
6400 abusesAcceptedCount:
6402 description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team
6405 description: Count of reports/abuses created by the user
6408 description: Count of comments published
6412 $ref: '#/components/schemas/username'
6414 $ref: '#/components/schemas/password'
6418 description: The user email
6421 description: The user video quota in bytes
6425 description: The user daily video quota in bytes
6428 $ref: '#/components/schemas/usernameChannel'
6430 $ref: '#/components/schemas/UserRole'
6432 $ref: '#/components/schemas/UserAdminFlags'
6443 description: The updated email of the user
6445 - $ref: '#/components/schemas/User/properties/email'
6448 description: Set the email as verified
6451 description: The updated video quota of the user in bytes
6454 description: The updated daily video quota of the user in bytes
6458 description: The auth plugin to use to authenticate the user
6459 example: 'peertube-plugin-auth-saml2'
6461 $ref: '#/components/schemas/UserRole'
6463 $ref: '#/components/schemas/UserAdminFlags'
6465 # see shared/models/users/user-update-me.model.ts:
6468 $ref: '#/components/schemas/password'
6470 $ref: '#/components/schemas/password'
6472 description: new email used for login and service communications
6474 - $ref: '#/components/schemas/User/properties/email'
6477 description: new name of the user in its representations
6482 description: new NSFW display policy
6489 description: whether to enable P2P in the player or not
6492 description: new preference regarding playing videos automatically
6495 description: new preference regarding playing following videos automatically
6496 autoPlayNextVideoPlaylist:
6498 description: new preference regarding playing following playlist videos automatically
6499 videosHistoryEnabled:
6501 description: whether to keep track of watched history or not
6506 description: list of languages to filter videos down to
6509 noInstanceConfigWarningModal:
6516 $ref: '#/components/schemas/id'
6523 description: Rating of the video
6530 $ref: '#/components/schemas/Video'
6537 description: Rating of the video
6544 description: immutable name of the user, used to find or mention its actor
6546 - $ref: '#/components/schemas/username'
6548 $ref: '#/components/schemas/password'
6552 description: email of the user, used for login or service communications
6555 description: editable name of the user, displayed in its representations
6560 description: channel base information used to create the first channel of the user
6563 $ref: '#/components/schemas/usernameChannel'
6565 $ref: '#/components/schemas/VideoChannel/properties/displayName'
6575 pattern: /^[a-z0-9]$/
6578 example: v1ikx5hnfop4mdpnci8nsqh93c45rldf
6581 pattern: /^[a-zA-Z0-9]$/
6584 example: AjWiOapPltI6EnsWQwlFarRtLh4u8tDt
6585 OAuthToken-password:
6587 - $ref: '#/components/schemas/OAuthClient'
6597 $ref: '#/components/schemas/User/properties/username'
6599 $ref: '#/components/schemas/password'
6606 OAuthToken-refresh_token:
6608 - $ref: '#/components/schemas/OAuthClient'
6619 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
6628 # GET/POST/PUT properties
6631 description: editable name of the channel, displayed in its representations
6632 example: Videos of Framasoft
6637 example: Videos made with <3 by Framasoft
6642 description: text shown by default on all videos of this channel, to tell the audience how to support it
6643 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6646 # GET-only properties
6650 - $ref: '#/components/schemas/id'
6666 $ref: '#/components/schemas/UUIDv4'
6669 - $ref: '#/components/schemas/VideoChannel'
6672 description: username of the channel to create
6674 - $ref: '#/components/schemas/usernameChannel'
6680 - $ref: '#/components/schemas/VideoChannel'
6682 bulkVideosSupportUpdate:
6684 description: Update the support field for all videos of this channel
6694 - $ref: '#/components/schemas/VideoChannel'
6695 - $ref: '#/components/schemas/Actor'
6700 name: 'media:peerLink'
6709 - application/x-bittorrent
6715 name: 'media:content'
6746 VideoCommentsForXML:
6781 description: video watch page URL
6784 description: video canonical URL
6788 description: video publication date
6791 description: video description
6794 description: video description
6797 description: publisher user name
6800 description: video category (MRSS)
6803 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
6818 description: video embed path, relative to the canonical URL domain (MRSS)
6827 description: video watch path, relative to the canonical URL domain (MRSS)
6848 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
6849 'media:description':
6856 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
6859 description: main streamable file for the video
6869 - application/x-bittorrent
6878 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)
6881 - $ref: '#/components/schemas/MRSSPeerLink'
6882 - $ref: '#/components/schemas/MRSSGroupContent'
6883 NotificationSettingValue:
6900 $ref: '#/components/schemas/id'
6904 Notification type, following the `UserNotificationType` enum:
6906 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
6908 - `2` NEW_COMMENT_ON_MY_VIDEO
6910 - `3` NEW_ABUSE_FOR_MODERATORS
6912 - `4` BLACKLIST_ON_MY_VIDEO
6914 - `5` UNBLACKLIST_ON_MY_VIDEO
6916 - `6` MY_VIDEO_PUBLISHED
6918 - `7` MY_VIDEO_IMPORT_SUCCESS
6920 - `8` MY_VIDEO_IMPORT_ERROR
6922 - `9` NEW_USER_REGISTRATION
6926 - `11` COMMENT_MENTION
6928 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
6930 - `13` NEW_INSTANCE_FOLLOWER
6932 - `14` AUTO_INSTANCE_FOLLOWING
6938 - $ref: '#/components/schemas/VideoInfo'
6942 $ref: '#/components/schemas/ActorInfo'
6948 $ref: '#/components/schemas/id'
6951 $ref: '#/components/schemas/VideoInfo'
6956 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
6966 $ref: '#/components/schemas/id'
6970 $ref: '#/components/schemas/VideoInfo'
6972 $ref: '#/components/schemas/ActorInfo'
6978 $ref: '#/components/schemas/id'
6981 - $ref: '#/components/schemas/VideoInfo'
6987 $ref: '#/components/schemas/id'
6990 - $ref: '#/components/schemas/VideoInfo'
6994 - $ref: '#/components/schemas/ActorInfo'
7000 $ref: '#/components/schemas/id'
7002 $ref: '#/components/schemas/ActorInfo'
7030 NotificationListResponse:
7039 $ref: '#/components/schemas/Notification'
7044 example: peertube-plugin-auth-ldap
7072 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
7075 additionalProperties: true
7091 $ref: '#/components/schemas/Plugin'
7098 description: User can stream multiple times in a permanent live
7107 description: RTMP stream key to use to stream into this live video
7111 description: User can stream multiple times in a permanent live
7118 'https://search.example.org/api/v1/search/videos':
7120 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
7123 description: successful operation
7127 $ref: '#/components/schemas/VideoListResponse'