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 /server/blocklist/accounts:
3591 summary: List account blocks
3596 - $ref: '#/components/parameters/start'
3597 - $ref: '#/components/parameters/count'
3598 - $ref: '#/components/parameters/sort'
3601 description: successful operation
3605 summary: Block an account
3617 example: chocobozzz@example.org
3618 description: account to block, in the form `username@domain`
3623 description: successful operation
3625 description: self-blocking forbidden
3627 '/server/blocklist/accounts/{accountName}':
3631 summary: Unblock an account by its handle
3639 description: account to unblock, in the form `username@domain`
3644 description: successful operation
3646 description: account or account block does not exist
3648 /server/blocklist/servers:
3652 summary: List server blocks
3657 - $ref: '#/components/parameters/start'
3658 - $ref: '#/components/parameters/count'
3659 - $ref: '#/components/parameters/sort'
3662 description: successful operation
3666 summary: Block a server
3679 description: server domain to block
3684 description: successful operation
3686 description: self-blocking forbidden
3688 '/server/blocklist/servers/{host}':
3692 summary: Unblock a server by its domain
3700 description: server domain to unblock
3706 description: successful operation
3708 description: account block does not exist
3710 /server/redundancy/{host}:
3713 - Instance Redundancy
3714 summary: Update a server redundancy policy
3722 description: server domain to mirror
3734 description: allow mirroring of the host's local videos
3739 description: successful operation
3741 description: server is not already known
3743 /server/redundancy/videos:
3747 summary: List videos being mirrored
3748 operationId: getMirroredVideos
3756 description: direction of the mirror
3762 - $ref: '#/components/parameters/start'
3763 - $ref: '#/components/parameters/count'
3764 - $ref: '#/components/parameters/videoRedundanciesSort'
3767 description: successful operation
3773 $ref: '#/components/schemas/VideoRedundancy'
3777 summary: Mirror a video
3778 operationId: putMirroredVideo
3789 $ref: '#/components/schemas/Video/properties/id'
3794 description: successful operation
3796 description: cannot mirror a local video
3798 description: video does not exist
3800 description: video is already mirrored
3802 /server/redundancy/videos/{redundancyId}:
3806 summary: Delete a mirror done on a video
3807 operationId: delMirroredVideo
3812 - name: redundancyId
3815 description: id of an existing redundancy on a video
3820 description: successful operation
3822 description: video redundancy not found
3824 '/feeds/video-comments.{format}':
3828 summary: List comments on videos
3829 operationId: getSyndicatedComments
3834 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3847 description: 'limit listing to a specific video'
3852 description: 'limit listing to a specific account'
3857 description: 'limit listing to a specific account'
3860 - name: videoChannelId
3862 description: 'limit listing to a specific video channel'
3865 - name: videoChannelName
3867 description: 'limit listing to a specific video channel'
3872 description: successful operation
3877 default: 'max-age=900' # 15 min cache
3881 $ref: '#/components/schemas/VideoCommentsForXML'
3884 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3885 application/rss+xml:
3887 $ref: '#/components/schemas/VideoCommentsForXML'
3890 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
3893 $ref: '#/components/schemas/VideoCommentsForXML'
3896 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3897 application/atom+xml:
3899 $ref: '#/components/schemas/VideoCommentsForXML'
3902 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
3908 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
3910 x-summary: field inconsistencies
3913 - videoId filter is mixed with a channel filter
3915 description: video, video channel or account not found
3917 description: accept header unsupported
3919 '/feeds/videos.{format}':
3923 summary: List videos
3924 operationId: getSyndicatedVideos
3929 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3942 description: 'limit listing to a specific account'
3947 description: 'limit listing to a specific account'
3950 - name: videoChannelId
3952 description: 'limit listing to a specific video channel'
3955 - name: videoChannelName
3957 description: 'limit listing to a specific video channel'
3960 - $ref: '#/components/parameters/sort'
3961 - $ref: '#/components/parameters/nsfw'
3962 - $ref: '#/components/parameters/filter'
3965 description: successful operation
3970 default: 'max-age=900' # 15 min cache
3974 $ref: '#/components/schemas/VideosForXML'
3977 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
3978 application/rss+xml:
3980 $ref: '#/components/schemas/VideosForXML'
3983 externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
3986 $ref: '#/components/schemas/VideosForXML'
3989 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
3990 application/atom+xml:
3992 $ref: '#/components/schemas/VideosForXML'
3995 externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
4001 externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
4003 description: video channel or account not found
4005 description: accept header unsupported
4007 '/feeds/subscriptions.{format}':
4012 summary: List videos of subscriptions tied to a token
4013 operationId: getSyndicatedSubscriptionVideos
4018 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
4031 description: limit listing to a specific account
4037 description: private token allowing access
4041 - $ref: '#/components/parameters/sort'
4042 - $ref: '#/components/parameters/nsfw'
4043 - $ref: '#/components/parameters/filter'
4046 description: successful operation
4051 default: 'max-age=900' # 15 min cache
4055 $ref: '#/components/schemas/VideosForXML'
4056 application/rss+xml:
4058 $ref: '#/components/schemas/VideosForXML'
4061 $ref: '#/components/schemas/VideosForXML'
4062 application/atom+xml:
4064 $ref: '#/components/schemas/VideosForXML'
4069 description: accept header unsupported
4075 summary: List plugins
4076 operationId: getPlugins
4089 - $ref: '#/components/parameters/start'
4090 - $ref: '#/components/parameters/count'
4091 - $ref: '#/components/parameters/sort'
4094 description: successful operation
4098 $ref: '#/components/schemas/PluginResponse'
4104 summary: List available plugins
4105 operationId: getAvailablePlugins
4118 - name: currentPeerTubeEngine
4122 - $ref: '#/components/parameters/start'
4123 - $ref: '#/components/parameters/count'
4124 - $ref: '#/components/parameters/sort'
4127 description: successful operation
4131 $ref: '#/components/schemas/PluginResponse'
4133 description: plugin index unavailable
4139 summary: Install a plugin
4140 operationId: addPlugin
4153 example: peertube-plugin-auth-ldap
4156 additionalProperties: false
4163 additionalProperties: false
4166 description: successful operation
4168 description: should have either `npmName` or `path` set
4174 summary: Update a plugin
4175 operationId: updatePlugin
4188 example: peertube-plugin-auth-ldap
4191 additionalProperties: false
4198 additionalProperties: false
4201 description: successful operation
4203 description: should have either `npmName` or `path` set
4205 description: existing plugin not found
4211 summary: Uninstall a plugin
4212 operationId: uninstallPlugin
4224 description: name of the plugin/theme in its package.json
4225 example: peertube-plugin-auth-ldap
4230 description: successful operation
4232 description: existing plugin not found
4238 summary: Get a plugin
4239 operationId: getPlugin
4244 - $ref: '#/components/parameters/npmName'
4247 description: successful operation
4251 $ref: '#/components/schemas/Plugin'
4253 description: plugin not found
4255 /plugins/{npmName}/settings:
4259 summary: Set a plugin's settings
4264 - $ref: '#/components/parameters/npmName'
4273 additionalProperties: true
4276 description: successful operation
4278 description: plugin not found
4280 /plugins/{npmName}/public-settings:
4284 summary: Get a plugin's public settings
4286 - $ref: '#/components/parameters/npmName'
4289 description: successful operation
4294 additionalProperties: true
4296 description: plugin not found
4298 /plugins/{npmName}/registered-settings:
4302 summary: Get a plugin's registered settings
4307 - $ref: '#/components/parameters/npmName'
4310 description: successful operation
4315 additionalProperties: true
4317 description: plugin not found
4320 - url: 'https://peertube2.cpy.re/api/v1'
4321 description: Live Test Server (live data - latest nightly version)
4322 - url: 'https://peertube3.cpy.re/api/v1'
4323 description: Live Test Server (live data - latest RC version)
4324 - url: 'https://peertube.cpy.re/api/v1'
4325 description: Live Test Server (live data - stable version)
4332 description: Offset used to paginate results
4340 description: "Number of items to return"
4350 description: Sort column
4358 description: Plain text search, applied to various parts of the model depending on endpoint
4366 If the administrator enabled search index support, you can override the default search target.
4369 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
4370 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
4371 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
4372 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
4373 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
4374 * 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
4375 the data from the origin instance API
4385 description: Sort videos by criteria
4401 description: Sort videos by criteria
4416 description: Sort comments by criteria
4426 description: Sort blocklists by criteria
4442 description: Plain text search that will match with user usernames or emails
4449 description: Filter results down to (un)banned users
4456 description: Sort users by criteria
4467 description: Sort abuses by criteria
4474 videoRedundanciesSort:
4478 description: Sort abuses by criteria
4487 description: The username or handle of the account
4490 example: chocobozzz | chocobozzz@example.org
4495 description: The user id
4497 $ref: '#/components/schemas/id'
4502 description: The object id or uuid
4505 - $ref: '#/components/schemas/id'
4506 - $ref: '#/components/schemas/UUIDv4'
4511 description: Playlist id
4513 $ref: '#/components/schemas/VideoPlaylist/properties/id'
4515 name: playlistElementId
4518 description: Playlist element id
4520 $ref: '#/components/schemas/id'
4525 description: Abuse id
4527 $ref: '#/components/schemas/Abuse/properties/id'
4529 name: abuseMessageId
4532 description: Abuse message id
4534 $ref: '#/components/schemas/AbuseMessage/properties/id'
4536 name: captionLanguage
4539 description: The caption language
4541 $ref: '#/components/schemas/VideoLanguageSet'
4546 description: The video channel handle
4549 example: my_username | my_username@example.com
4551 name: subscriptionHandle
4554 description: The subscription handle
4557 example: my_username | my_username@example.com
4562 description: The thread id (root comment id)
4569 description: The comment id
4571 $ref: '#/components/schemas/VideoComment/properties/id'
4576 description: whether or not the video is a live
4583 description: category id of the video (see [/videos/categories](#operation/getCategories))
4586 - $ref: '#/components/schemas/VideoCategorySet'
4589 $ref: '#/components/schemas/VideoCategorySet'
4596 description: tag(s) of the video
4610 description: tag(s) of the video, where all should be present in the video
4623 description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language
4626 - $ref: '#/components/schemas/VideoLanguageSet'
4629 $ref: '#/components/schemas/VideoLanguageSet'
4636 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4639 - $ref: '#/components/schemas/VideoLicenceSet'
4642 $ref: '#/components/schemas/VideoLicenceSet'
4649 description: if you don't need the `total` in the response
4660 description: whether to include nsfw videos, if any
4671 Special filters which might require special rights:
4672 * `local` - only videos local to the instance
4673 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
4674 * `all` - all videos, showing private and unlisted videos (requires Admin privileges)
4684 description: list of uris to check if each is part of the user subscriptions
4694 description: name of the plugin/theme on npmjs.com or in its package.json
4697 example: peertube-plugin-auth-ldap
4702 description: job type
4706 - activitypub-follow
4707 - activitypub-http-broadcast
4708 - activitypub-http-fetcher
4709 - activitypub-http-unicast
4715 - activitypub-refresher
4740 Authenticating via OAuth requires the following steps:
4741 - Have an activated account
4742 - [Generate] an access token for that account at `/api/v1/users/token`.
4743 - Make requests with the *Authorization: Bearer <token\>* header
4744 - Profit, depending on the role assigned to the account
4746 Note that the __access token is valid for 1 day__ and is given
4747 along with a __refresh token valid for 2 weeks__.
4749 [Generate]: https://docs.joinpeertube.org/api-rest-getting-started
4753 tokenUrl: /api/v1/users/token
4756 moderator: Moderator scope
4759 # Resuable core properties
4767 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4768 pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
4773 description: immutable name of the user, used to find or mention its actor
4775 pattern: '/^[a-z0-9._]+$/'
4780 description: immutable name of the channel, used to interact with its actor
4781 example: framasoft_videos
4782 pattern: '/^[a-zA-Z0-9\\-_.:]+$/'
4793 description: category id of the video (see [/videos/categories](#operation/getCategories))
4795 VideoConstantNumber-Category:
4798 $ref: '#/components/schemas/VideoCategorySet'
4801 example: Science & Technology
4805 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4807 VideoConstantNumber-Licence:
4810 $ref: '#/components/schemas/VideoLicenceSet'
4813 example: Attribution - Share Alike
4817 description: language id of the video (see [/videos/languages](#operation/getLanguages))
4819 VideoConstantString-Language:
4822 $ref: '#/components/schemas/VideoLanguageSet'
4827 VideoPlaylistPrivacySet:
4833 description: Video playlist privacy policy (see [/video-playlists/privacies])
4834 VideoPlaylistPrivacyConstant:
4837 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4841 VideoPlaylistTypeSet:
4846 description: The video playlist type (Regular = `1`, Watch Later = `2`)
4847 VideoPlaylistTypeConstant:
4850 $ref: '#/components/schemas/VideoPlaylistTypeSet'
4861 description: privacy id of the video (see [/videos/privacies](#operation/getPrivacyPolicies))
4862 VideoPrivacyConstant:
4865 $ref: '#/components/schemas/VideoPrivacySet'
4882 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
4889 description: 'Admin flags for the user (None = `0`, Bypass video blocklist = `1`)'
4900 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
4910 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
4914 $ref: '#/components/schemas/AbuseStateSet'
4917 AbusePredefinedReasons:
4930 example: [spamOrMisleading]
4935 Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`)
4937 `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos.
4939 VideoResolutionConstant:
4940 description: resolutions and their labels for the video
4943 $ref: '#/components/schemas/VideoResolutionSet'
4947 VideoScheduledUpdate:
4950 $ref: '#/components/schemas/VideoPrivacySet'
4954 description: When to update the video
4974 - $ref: '#/components/schemas/ActorImage'
4975 VideoChannelSummary:
4978 $ref: '#/components/schemas/id'
4992 - $ref: '#/components/schemas/ActorImage'
5006 - $ref: '#/components/schemas/Video'
5013 description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file
5014 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
5015 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5017 $ref: '#/components/schemas/VideoResolutionConstant'
5020 description: Video file size in bytes
5023 description: Direct URL of the torrent file
5027 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
5031 description: Direct URL of the video
5035 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
5039 description: Frames per second of the video file
5043 description: URL dereferencing the output of ffprobe on the file
5044 VideoStreamingPlaylists:
5049 $ref: '#/components/schemas/id'
5057 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS'
5058 VideoStreamingPlaylists-HLS:
5069 Video files associated to this playlist.
5071 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.)
5073 $ref: '#/components/schemas/VideoFile'
5085 $ref: '#/components/schemas/Video/properties/id'
5087 $ref: '#/components/schemas/Video/properties/uuid'
5089 $ref: '#/components/schemas/Video/properties/name'
5093 description: object id for the video
5095 - $ref: '#/components/schemas/id'
5097 description: universal identifier for the video, that can be used across instances
5099 - $ref: '#/components/schemas/UUIDv4'
5105 example: 2017-10-01T10:52:46.396Z
5106 description: time at which the video object was first drafted
5110 example: 2018-10-01T10:52:46.396Z
5111 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
5115 example: 2021-05-04T08:01:01.502Z
5116 description: last time the video's metadata was modified
5117 originallyPublishedAt:
5120 example: 2010-10-01T10:52:46.396Z
5121 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
5124 - $ref: '#/components/schemas/VideoConstantNumber-Category'
5125 description: category in which the video is classified
5128 - $ref: '#/components/schemas/VideoConstantNumber-Licence'
5129 description: licence under which the video is distributed
5132 - $ref: '#/components/schemas/VideoConstantString-Language'
5133 description: main language used in the video
5136 - $ref: '#/components/schemas/VideoPrivacyConstant'
5137 description: privacy policy used to distribute the video
5141 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n
5142 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr...
5146 truncated description of the video, written in Markdown.
5147 Resolve `descriptionPath` to get the full description of maximum `10000` characters.
5152 description: duration of the video in seconds
5157 description: title of the video
5158 example: What is PeerTube?
5163 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5166 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5169 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
5186 - $ref: '#/components/schemas/VideoStateConstant'
5187 description: represents the internal state of the video processing within the PeerTube instance
5191 - $ref: '#/components/schemas/VideoScheduledUpdate'
5199 $ref: '#/components/schemas/AccountSummary'
5201 $ref: '#/components/schemas/VideoChannelSummary'
5210 - $ref: '#/components/schemas/Video'
5215 example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description
5216 description: path at which to get the full description of maximum `10000` characters
5219 description: A text tell the audience how to support the video creator
5220 example: Please support our work on https://soutenir.framasoft.org/en/ <3
5224 $ref: '#/components/schemas/VideoChannel'
5226 $ref: '#/components/schemas/Account'
5228 example: [flowers, gardening]
5246 - https://peertube2.cpy.re/tracker/announce
5247 - wss://peertube2.cpy.re/tracker/socket
5251 $ref: '#/components/schemas/VideoFile'
5253 WebTorrent/raw video files. If WebTorrent is disabled on the server:
5255 - field will be empty
5256 - video files will be found in `streamingPlaylists[].files` field
5260 $ref: '#/components/schemas/VideoStreamingPlaylists'
5262 HLS playlists/manifest files. If HLS is disabled on the server:
5264 - field will be empty
5265 - video files will be found in `files` field
5266 FileRedundancyInformation:
5269 $ref: '#/components/schemas/id'
5294 $ref: '#/components/schemas/id'
5301 $ref: '#/components/schemas/UUIDv4'
5308 $ref: '#/components/schemas/FileRedundancyInformation'
5312 $ref: '#/components/schemas/FileRedundancyInformation'
5313 VideoImportStateConstant:
5321 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
5328 additionalProperties: false
5332 $ref: '#/components/schemas/VideoImport/properties/targetUrl'
5333 required: [targetUrl]
5336 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
5337 required: [magnetUri]
5340 $ref: '#/components/schemas/VideoImport/properties/torrentfile'
5341 required: [torrentfile]
5342 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5351 - $ref: '#/components/schemas/id'
5355 description: remote URL where to find the import's source video
5356 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
5360 description: magnet URI allowing to resolve the import's source video
5361 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
5362 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5367 description: Torrent file containing only the video file
5374 - $ref: '#/components/schemas/VideoImportStateConstant'
5390 - $ref: '#/components/schemas/Video'
5400 $ref: '#/components/schemas/VideoImport'
5404 $ref: '#/components/schemas/id'
5407 example: The video is a spam
5411 $ref: '#/components/schemas/AbusePredefinedReasons'
5413 $ref: '#/components/schemas/Account'
5415 $ref: '#/components/schemas/AbuseStateConstant'
5418 example: Decided to ban the server since it spams us regularly
5422 $ref: '#/components/schemas/VideoInfo'
5429 $ref: '#/components/schemas/id'
5440 $ref: '#/components/schemas/AccountSummary'
5444 $ref: '#/components/schemas/id'
5446 $ref: '#/components/schemas/Video/properties/id'
5458 $ref: '#/components/schemas/UUIDv4'
5476 $ref: '#/components/schemas/id'
5478 $ref: '#/components/schemas/UUIDv4'
5501 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
5503 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
5505 $ref: '#/components/schemas/AccountSummary'
5507 $ref: '#/components/schemas/VideoChannelSummary'
5511 $ref: '#/components/schemas/id'
5518 description: Text of the comment
5520 example: This video is wonderful!
5522 $ref: '#/components/schemas/id'
5526 - $ref: '#/components/schemas/id'
5528 $ref: '#/components/schemas/Video/properties/id'
5543 totalRepliesFromVideoAuthor:
5550 $ref: '#/components/schemas/Account'
5551 VideoCommentThreadTree:
5554 $ref: '#/components/schemas/VideoComment'
5558 $ref: '#/components/schemas/VideoCommentThreadTree'
5562 $ref: '#/components/schemas/VideoConstantString-Language'
5578 $ref: '#/components/schemas/id'
5595 $ref: '#/components/schemas/id'
5600 description: immutable name of the actor, used to find or mention it
5602 - $ref: '#/components/schemas/username'
5606 description: server on which the actor is resident
5607 hostRedundancyAllowed:
5609 description: whether this actor's host allows redundancy of its videos
5613 description: number of actors subscribed to by this actor, as seen by this instance
5617 description: number of followers of this actor, as seen by this instance
5625 $ref: '#/components/schemas/ActorImage'
5628 - $ref: '#/components/schemas/Actor'
5631 description: object id for the user tied to this account
5633 - $ref: '#/components/schemas/User/properties/id'
5636 description: editable name of the account, displayed in its representations
5641 description: text or bio displayed on the account's profile
5647 description: timestamp within the video, in seconds
5714 allowedForCurrentIP:
5716 requiresEmailVerification:
5734 $ref: '#/components/schemas/VideoResolutionSet'
5819 example: 16810141515
5928 requiresEmailVerification:
5943 description: Settings that apply to new users, if registration is enabled
5947 example: 16810141515
5953 description: Settings pertaining to transcoding jobs
5957 allowAdditionalExtensions:
5959 description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos
5962 description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
5965 description: Amount of threads used by ffmpeg for 1 transcoding job
5968 description: Amount of transcoding jobs to execute in parallel
5974 New profiles can be added by plugins ; available in core PeerTube: 'default'.
5977 description: Resolutions to transcode _new videos_ to
5997 description: WebTorrent-specific settings
6003 description: HLS-specific settings
6053 $ref: '#/components/schemas/id'
6055 $ref: '#/components/schemas/Actor'
6057 $ref: '#/components/schemas/Actor'
6060 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
6073 PredefinedAbuseReasons:
6074 description: Reason categories that help triage reports
6092 $ref: '#/components/schemas/id'
6104 - activitypub-http-unicast
6105 - activitypub-http-broadcast
6106 - activitypub-http-fetcher
6107 - activitypub-follow
6113 - activitypub-refresher
6117 additionalProperties: true
6120 additionalProperties: true
6136 $ref: '#/components/schemas/id'
6141 $ref: '#/components/schemas/id'
6142 VideoUploadRequestCommon:
6145 description: Video name
6147 example: What is PeerTube?
6151 description: Channel id that will contain this video
6156 $ref: '#/components/schemas/VideoPrivacySet'
6158 $ref: '#/components/schemas/VideoCategorySet'
6160 $ref: '#/components/schemas/VideoLicenceSet'
6162 $ref: '#/components/schemas/VideoLanguageSet'
6164 description: Video description
6167 **[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)**
6169 description: Whether or not we wait transcoding before publish the video
6172 description: A text tell the audience how to support the video creator
6173 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6176 description: Whether or not this video contains sensitive content
6179 description: Video tags (maximum 5 tags each between 2 and 30 characters)
6192 description: Enable or disable comments for this video
6195 description: Enable or disable downloading for this video
6197 originallyPublishedAt:
6198 description: Date when the content was originally published
6202 $ref: '#/components/schemas/VideoScheduledUpdate'
6204 description: Video thumbnail file
6208 description: Video preview file
6214 VideoUploadRequestLegacy:
6216 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6222 description: Video file
6225 VideoUploadRequestResumable:
6227 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6233 description: Video filename including extension
6236 example: what_is_peertube.mp4
6238 description: Video thumbnail file
6242 description: Video preview file
6245 VideoUploadResponse:
6251 $ref: '#/components/schemas/Video/properties/id'
6253 $ref: '#/components/schemas/Video/properties/uuid'
6254 CommentThreadResponse:
6263 $ref: '#/components/schemas/VideoComment'
6264 CommentThreadPostResponse:
6267 $ref: '#/components/schemas/VideoComment'
6277 $ref: '#/components/schemas/Video'
6281 $ref: '#/components/schemas/Account'
6284 description: Automatically start playing the upcoming video after the currently playing video
6285 autoPlayNextVideoPlaylist:
6287 description: Automatically start playing the video on the playlist after the currently playing video
6290 description: Automatically start playing the video on the watch page
6300 description: The user email
6303 description: Has the user confirmed their email address?
6306 - $ref: '#/components/schemas/id'
6310 description: Auth plugin to use to authenticate the user
6314 noInstanceConfigWarningModal:
6319 $ref: '#/components/schemas/NSFWPolicy'
6321 $ref: '#/components/schemas/UserRole'
6330 description: Theme enabled by this user
6332 $ref: '#/components/schemas/username'
6336 $ref: '#/components/schemas/VideoChannel'
6339 description: The user video quota in bytes
6343 description: The user daily video quota in bytes
6347 description: Enable P2P in the player
6350 - $ref: '#/components/schemas/User'
6352 # optionally present fields: they require WITH_STATS scope
6355 description: Count of videos published
6358 description: Count of reports/abuses of which the user is a target
6359 abusesAcceptedCount:
6361 description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team
6364 description: Count of reports/abuses created by the user
6367 description: Count of comments published
6371 $ref: '#/components/schemas/username'
6373 $ref: '#/components/schemas/password'
6377 description: The user email
6380 description: The user video quota in bytes
6384 description: The user daily video quota in bytes
6387 $ref: '#/components/schemas/usernameChannel'
6389 $ref: '#/components/schemas/UserRole'
6391 $ref: '#/components/schemas/UserAdminFlags'
6402 description: The updated email of the user
6404 - $ref: '#/components/schemas/User/properties/email'
6407 description: Set the email as verified
6410 description: The updated video quota of the user in bytes
6413 description: The updated daily video quota of the user in bytes
6417 description: The auth plugin to use to authenticate the user
6418 example: 'peertube-plugin-auth-saml2'
6420 $ref: '#/components/schemas/UserRole'
6422 $ref: '#/components/schemas/UserAdminFlags'
6424 # see shared/models/users/user-update-me.model.ts:
6427 $ref: '#/components/schemas/password'
6429 $ref: '#/components/schemas/password'
6431 description: new email used for login and service communications
6433 - $ref: '#/components/schemas/User/properties/email'
6436 description: new name of the user in its representations
6441 description: new NSFW display policy
6448 description: whether to enable P2P in the player or not
6451 description: new preference regarding playing videos automatically
6454 description: new preference regarding playing following videos automatically
6455 autoPlayNextVideoPlaylist:
6457 description: new preference regarding playing following playlist videos automatically
6458 videosHistoryEnabled:
6460 description: whether to keep track of watched history or not
6465 description: list of languages to filter videos down to
6468 noInstanceConfigWarningModal:
6475 $ref: '#/components/schemas/id'
6482 description: Rating of the video
6489 $ref: '#/components/schemas/Video'
6496 description: Rating of the video
6503 description: immutable name of the user, used to find or mention its actor
6505 - $ref: '#/components/schemas/username'
6507 $ref: '#/components/schemas/password'
6511 description: email of the user, used for login or service communications
6514 description: editable name of the user, displayed in its representations
6519 description: channel base information used to create the first channel of the user
6522 $ref: '#/components/schemas/usernameChannel'
6524 $ref: '#/components/schemas/VideoChannel/properties/displayName'
6534 pattern: /^[a-z0-9]$/
6537 example: v1ikx5hnfop4mdpnci8nsqh93c45rldf
6540 pattern: /^[a-zA-Z0-9]$/
6543 example: AjWiOapPltI6EnsWQwlFarRtLh4u8tDt
6544 OAuthToken-password:
6546 - $ref: '#/components/schemas/OAuthClient'
6556 $ref: '#/components/schemas/User/properties/username'
6558 $ref: '#/components/schemas/password'
6565 OAuthToken-refresh_token:
6567 - $ref: '#/components/schemas/OAuthClient'
6578 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
6587 # GET/POST/PUT properties
6590 description: editable name of the channel, displayed in its representations
6591 example: Videos of Framasoft
6596 example: Videos made with <3 by Framasoft
6601 description: text shown by default on all videos of this channel, to tell the audience how to support it
6602 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6605 # GET-only properties
6609 - $ref: '#/components/schemas/id'
6625 $ref: '#/components/schemas/UUIDv4'
6628 - $ref: '#/components/schemas/VideoChannel'
6631 description: username of the channel to create
6633 - $ref: '#/components/schemas/usernameChannel'
6639 - $ref: '#/components/schemas/VideoChannel'
6641 bulkVideosSupportUpdate:
6643 description: Update the support field for all videos of this channel
6653 - $ref: '#/components/schemas/VideoChannel'
6654 - $ref: '#/components/schemas/Actor'
6659 name: 'media:peerLink'
6668 - application/x-bittorrent
6674 name: 'media:content'
6705 VideoCommentsForXML:
6740 description: video watch page URL
6743 description: video canonical URL
6747 description: video publication date
6750 description: video description
6753 description: video description
6756 description: publisher user name
6759 description: video category (MRSS)
6762 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
6777 description: video embed path, relative to the canonical URL domain (MRSS)
6786 description: video watch path, relative to the canonical URL domain (MRSS)
6807 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
6808 'media:description':
6815 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
6818 description: main streamable file for the video
6828 - application/x-bittorrent
6837 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)
6840 - $ref: '#/components/schemas/MRSSPeerLink'
6841 - $ref: '#/components/schemas/MRSSGroupContent'
6842 NotificationSettingValue:
6859 $ref: '#/components/schemas/id'
6863 Notification type, following the `UserNotificationType` enum:
6865 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
6867 - `2` NEW_COMMENT_ON_MY_VIDEO
6869 - `3` NEW_ABUSE_FOR_MODERATORS
6871 - `4` BLACKLIST_ON_MY_VIDEO
6873 - `5` UNBLACKLIST_ON_MY_VIDEO
6875 - `6` MY_VIDEO_PUBLISHED
6877 - `7` MY_VIDEO_IMPORT_SUCCESS
6879 - `8` MY_VIDEO_IMPORT_ERROR
6881 - `9` NEW_USER_REGISTRATION
6885 - `11` COMMENT_MENTION
6887 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
6889 - `13` NEW_INSTANCE_FOLLOWER
6891 - `14` AUTO_INSTANCE_FOLLOWING
6897 - $ref: '#/components/schemas/VideoInfo'
6901 $ref: '#/components/schemas/ActorInfo'
6907 $ref: '#/components/schemas/id'
6910 $ref: '#/components/schemas/VideoInfo'
6915 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
6925 $ref: '#/components/schemas/id'
6929 $ref: '#/components/schemas/VideoInfo'
6931 $ref: '#/components/schemas/ActorInfo'
6937 $ref: '#/components/schemas/id'
6940 - $ref: '#/components/schemas/VideoInfo'
6946 $ref: '#/components/schemas/id'
6949 - $ref: '#/components/schemas/VideoInfo'
6953 - $ref: '#/components/schemas/ActorInfo'
6959 $ref: '#/components/schemas/id'
6961 $ref: '#/components/schemas/ActorInfo'
6989 NotificationListResponse:
6998 $ref: '#/components/schemas/Notification'
7003 example: peertube-plugin-auth-ldap
7031 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
7034 additionalProperties: true
7050 $ref: '#/components/schemas/Plugin'
7057 description: User can stream multiple times in a permanent live
7066 description: RTMP stream key to use to stream into this live video
7070 description: User can stream multiple times in a permanent live
7077 'https://search.example.org/api/v1/search/videos':
7079 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
7082 description: successful operation
7086 $ref: '#/components/schemas/VideoListResponse'