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")
417 '/accounts/{name}/followers':
421 summary: 'List followers of an account'
424 operationId: getAccountFollowers
426 - $ref: '#/components/parameters/name'
427 - $ref: '#/components/parameters/start'
428 - $ref: '#/components/parameters/count'
429 - $ref: '#/components/parameters/followersSort'
430 - $ref: '#/components/parameters/search'
433 description: successful operation
445 $ref: '#/components/schemas/Follow'
451 summary: List accounts
452 operationId: getAccounts
454 - $ref: '#/components/parameters/start'
455 - $ref: '#/components/parameters/count'
456 - $ref: '#/components/parameters/sort'
459 description: successful operation
465 $ref: '#/components/schemas/Account'
471 summary: Get instance public configuration
472 operationId: getConfig
475 description: successful operation
479 $ref: '#/components/schemas/ServerConfig'
482 externalValue: https://peertube2.cpy.re/api/v1/config
486 summary: Get instance "About" information
487 operationId: getAbout
492 description: successful operation
496 $ref: '#/components/schemas/ServerConfigAbout'
499 externalValue: https://peertube2.cpy.re/api/v1/config/about
503 summary: Get instance runtime configuration
504 operationId: getCustomConfig
512 description: successful operation
516 $ref: '#/components/schemas/ServerConfigCustom'
518 summary: Set instance runtime configuration
519 operationId: putCustomConfig
527 description: successful operation
529 x-summary: field inconsistencies
532 - the emailer is disabled and the instance is open to registrations
533 - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
535 summary: Delete instance runtime configuration
536 operationId: delCustomConfig
544 description: successful operation
546 /custom-pages/homepage/instance:
548 summary: Get instance custom homepage
553 description: No homepage set
555 description: successful operation
559 $ref: '#/components/schemas/CustomHomepage'
561 summary: Set instance custom homepage
575 description: content of the homepage, that will be injected in the client
578 description: successful operation
582 summary: List instance jobs
593 description: The state of the job ('' for for no filter)
603 - $ref: '#/components/parameters/jobType'
604 - $ref: '#/components/parameters/start'
605 - $ref: '#/components/parameters/count'
606 - $ref: '#/components/parameters/sort'
609 description: successful operation
622 $ref: '#/components/schemas/Job'
628 summary: List instances following the server
630 - $ref: '#/components/parameters/followState'
631 - $ref: '#/components/parameters/actorType'
632 - $ref: '#/components/parameters/start'
633 - $ref: '#/components/parameters/count'
634 - $ref: '#/components/parameters/sort'
637 description: successful operation
649 $ref: '#/components/schemas/Follow'
651 '/server/followers/{nameWithHost}':
653 summary: Remove or reject a follower to your server
663 description: The remote actor handle to remove from your followers
669 description: successful operation
671 description: follower not found
673 '/server/followers/{nameWithHost}/reject':
675 summary: Reject a pending follower to your server
685 description: The remote actor handle to remove from your followers
691 description: successful operation
693 description: follower not found
695 '/server/followers/{nameWithHost}/accept':
697 summary: Accept a pending follower to your server
707 description: The remote actor handle to remove from your followers
713 description: successful operation
715 description: follower not found
721 summary: List instances followed by the server
723 - $ref: '#/components/parameters/followState'
724 - $ref: '#/components/parameters/actorType'
725 - $ref: '#/components/parameters/start'
726 - $ref: '#/components/parameters/count'
727 - $ref: '#/components/parameters/sort'
730 description: successful operation
742 $ref: '#/components/schemas/Follow'
749 summary: Follow a list of actors (PeerTube instance, channel or account)
752 description: successful operation
754 description: cannot follow a non-HTTPS server
773 '/server/following/{hostOrHandle}':
775 summary: Unfollow an actor (PeerTube instance, channel or account)
785 description: The hostOrHandle to unfollow
790 description: successful operation
792 description: host or handle not found
796 summary: Create a user
805 description: user created
809 $ref: '#/components/schemas/AddUserResponse'
815 id: '$response.body#/user/id'
820 id: '$response.body#/user/id'
825 id: '$response.body#/user/id'
827 description: insufficient authority to create an admin or moderator
832 $ref: '#/components/schemas/AddUser'
834 If the smtp server is configured, you can leave the password empty and an email will be sent
835 asking the user to set it first.
839 operationId: getUsers
846 - $ref: '#/components/parameters/usersSearch'
847 - $ref: '#/components/parameters/usersBlocked'
848 - $ref: '#/components/parameters/start'
849 - $ref: '#/components/parameters/count'
850 - $ref: '#/components/parameters/usersSort'
853 description: successful operation
859 $ref: '#/components/schemas/User'
863 - $ref: '#/components/parameters/id'
865 summary: Delete a user
874 description: successful operation
885 description: include statistics about the user (only available as a moderator/admin)
890 x-summary: successful operation
892 As an admin/moderator, you can request a response augmented with statistics about the user's
893 moderation relations and videos usage, by using the `withStats` parameter.
898 - $ref: '#/components/schemas/User'
899 - $ref: '#/components/schemas/UserWithStats'
901 summary: Update a user
909 description: successful operation
914 $ref: '#/components/schemas/UpdateUser'
917 /oauth-clients/local:
919 summary: Login prerequisite
920 description: You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken).
921 operationId: getOAuthClient
926 description: successful operation
930 $ref: '#/components/schemas/OAuthClient'
932 UseOAuthClientToLogin:
933 operationId: getOAuthToken
935 client_id: '$response.body#/client_id'
936 client_secret: '$response.body#/client_secret'
940 API="https://peertube2.cpy.re/api/v1"
943 curl -s "$API/oauth-clients/local"
948 operationId: getOAuthToken
949 description: With your [client id and secret](#operation/getOAuthClient), you can retrieve an access and refresh tokens.
954 application/x-www-form-urlencoded:
957 - $ref: '#/components/schemas/OAuthToken-password'
958 - $ref: '#/components/schemas/OAuthToken-refresh_token'
960 propertyName: grant_type
962 password: '#/components/schemas/OAuthToken-password'
963 refresh_token: '#/components/schemas/OAuthToken-refresh_token'
966 description: successful operation
977 example: 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0
978 description: valid for 1 day
981 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
982 description: valid for 2 weeks
987 refresh_token_expires_in:
992 x-summary: client or credentials are invalid
994 Disambiguate via `type`:
995 - `invalid_client` for an unmatched `client_id`
996 - `invalid_grant` for unmatched credentials
998 x-summary: token expired
1000 Disambiguate via `type`:
1001 - default value for a regular authentication failure
1002 - `invalid_token` for an expired token
1007 API="https://peertube2.cpy.re/api/v1"
1008 USERNAME="<your_username>"
1009 PASSWORD="<your_password>"
1012 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
1013 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
1014 curl -s "$API/users/token" \
1015 --data client_id="$client_id" \
1016 --data client_secret="$client_secret" \
1017 --data grant_type=password \
1018 --data username="$USERNAME" \
1019 --data password="$PASSWORD" \
1020 | jq -r ".access_token"
1022 /users/revoke-token:
1025 description: Revokes your access token and its associated refresh token, destroying your current session.
1026 operationId: revokeOAuthToken
1033 description: successful operation
1037 summary: Register a user
1038 operationId: registerUser
1044 description: successful operation
1049 $ref: '#/components/schemas/RegisterUser'
1052 /users/{id}/verify-email:
1054 summary: Verify a user
1055 operationId: verifyUser
1057 Following a user registration, the new user will receive an email asking to click a link
1058 containing a secret.
1063 - $ref: '#/components/parameters/id'
1076 - verificationString
1079 description: successful operation
1081 description: invalid verification string
1083 description: user not found
1085 /users/ask-send-verify-email:
1087 summary: Resend user verification link
1088 operationId: resendEmailToVerifyUser
1094 description: successful operation
1098 summary: Get my user information
1099 operationId: getUserInfo
1107 description: successful operation
1113 $ref: '#/components/schemas/User'
1115 summary: Update my user information
1116 operationId: putUserInfo
1124 description: successful operation
1129 $ref: '#/components/schemas/UpdateMe'
1132 /users/me/videos/imports:
1134 summary: Get video imports of my user
1142 - $ref: '#/components/parameters/start'
1143 - $ref: '#/components/parameters/count'
1144 - $ref: '#/components/parameters/sort'
1147 description: successful operation
1151 $ref: '#/components/schemas/VideoImportsList'
1153 /users/me/video-quota-used:
1155 summary: Get my user used quota
1163 description: successful operation
1171 description: The user video quota used so far in bytes
1172 example: 16810141515
1173 videoQuotaUsedDaily:
1175 description: The user video quota used today in bytes
1178 '/users/me/videos/{videoId}/rating':
1180 summary: Get rate of my user for a video
1190 description: The video id
1192 $ref: '#/components/schemas/Video/properties/id'
1195 description: successful operation
1199 $ref: '#/components/schemas/GetMeVideoRating'
1203 summary: Get videos of my user
1211 - $ref: '#/components/parameters/start'
1212 - $ref: '#/components/parameters/count'
1213 - $ref: '#/components/parameters/sort'
1216 description: successful operation
1220 $ref: '#/components/schemas/VideoListResponse'
1222 /users/me/subscriptions:
1224 summary: Get my user subscriptions
1231 - $ref: '#/components/parameters/start'
1232 - $ref: '#/components/parameters/count'
1233 - $ref: '#/components/parameters/sort'
1236 description: successful operation
1240 $ref: '#/components/schemas/VideoChannelList'
1244 summary: Add subscription to my user
1257 description: uri of the video channels to subscribe to
1263 uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr
1266 description: successful operation
1268 /users/me/subscriptions/exist:
1270 summary: Get if subscriptions exist for my user
1277 - $ref: '#/components/parameters/subscriptionsUris'
1280 description: successful operation
1286 /users/me/subscriptions/videos:
1288 summary: List videos of subscriptions of my user
1296 - $ref: '#/components/parameters/categoryOneOf'
1297 - $ref: '#/components/parameters/isLive'
1298 - $ref: '#/components/parameters/tagsOneOf'
1299 - $ref: '#/components/parameters/tagsAllOf'
1300 - $ref: '#/components/parameters/licenceOneOf'
1301 - $ref: '#/components/parameters/languageOneOf'
1302 - $ref: '#/components/parameters/nsfw'
1303 - $ref: '#/components/parameters/filter'
1304 - $ref: '#/components/parameters/skipCount'
1305 - $ref: '#/components/parameters/start'
1306 - $ref: '#/components/parameters/count'
1307 - $ref: '#/components/parameters/videosSort'
1310 description: successful operation
1314 $ref: '#/components/schemas/VideoListResponse'
1316 '/users/me/subscriptions/{subscriptionHandle}':
1318 summary: Get subscription of my user
1325 - $ref: '#/components/parameters/subscriptionHandle'
1328 description: successful operation
1332 $ref: '#/components/schemas/VideoChannel'
1334 summary: Delete subscription of my user
1341 - $ref: '#/components/parameters/subscriptionHandle'
1344 description: successful operation
1346 /users/me/notifications:
1348 summary: List my notifications
1356 description: only list unread notifications
1359 - $ref: '#/components/parameters/start'
1360 - $ref: '#/components/parameters/count'
1361 - $ref: '#/components/parameters/sort'
1364 description: successful operation
1368 $ref: '#/components/schemas/NotificationListResponse'
1370 /users/me/notifications/read:
1372 summary: Mark notifications as read by their id
1385 description: ids of the notifications to mark as read
1392 description: successful operation
1394 /users/me/notifications/read-all:
1396 summary: Mark all my notification as read
1403 description: successful operation
1405 /users/me/notification-settings:
1407 summary: Update my notification settings
1418 newVideoFromSubscription:
1419 $ref: '#/components/schemas/NotificationSettingValue'
1420 newCommentOnMyVideo:
1421 $ref: '#/components/schemas/NotificationSettingValue'
1423 $ref: '#/components/schemas/NotificationSettingValue'
1424 videoAutoBlacklistAsModerator:
1425 $ref: '#/components/schemas/NotificationSettingValue'
1427 $ref: '#/components/schemas/NotificationSettingValue'
1429 $ref: '#/components/schemas/NotificationSettingValue'
1430 myVideoImportFinished:
1431 $ref: '#/components/schemas/NotificationSettingValue'
1433 $ref: '#/components/schemas/NotificationSettingValue'
1434 newUserRegistration:
1435 $ref: '#/components/schemas/NotificationSettingValue'
1437 $ref: '#/components/schemas/NotificationSettingValue'
1438 newInstanceFollower:
1439 $ref: '#/components/schemas/NotificationSettingValue'
1440 autoInstanceFollowing:
1441 $ref: '#/components/schemas/NotificationSettingValue'
1444 description: successful operation
1446 /users/me/history/videos:
1448 summary: List watched videos history
1454 - $ref: '#/components/parameters/start'
1455 - $ref: '#/components/parameters/count'
1456 - $ref: '#/components/parameters/search'
1459 description: successful operation
1463 $ref: '#/components/schemas/VideoListResponse'
1465 /users/me/history/videos/remove:
1467 summary: Clear video history
1474 multipart/form-data:
1479 description: history before this date will be deleted
1484 description: successful operation
1486 /users/me/avatar/pick:
1488 summary: Update my user avatar
1495 description: successful operation
1502 $ref: '#/components/schemas/ActorImage'
1504 description: image file too large
1506 X-File-Maximum-Size:
1510 description: Maximum file size for the avatar
1513 multipart/form-data:
1518 description: The file to upload
1523 contentType: image/png, image/jpeg
1527 summary: Delete my avatar
1534 description: successful operation
1538 summary: List video ownership changes
1540 - Video Ownership Change
1545 description: successful operation
1547 '/videos/ownership/{id}/accept':
1549 summary: Accept ownership change request
1551 - Video Ownership Change
1555 - $ref: '#/components/parameters/idOrUUID'
1558 description: successful operation
1560 description: cannot terminate an ownership change of another user
1562 description: video owneship change not found
1564 '/videos/ownership/{id}/refuse':
1566 summary: Refuse ownership change request
1568 - Video Ownership Change
1572 - $ref: '#/components/parameters/idOrUUID'
1575 description: successful operation
1577 description: cannot terminate an ownership change of another user
1579 description: video owneship change not found
1581 '/videos/{id}/give-ownership':
1583 summary: Request ownership change
1585 - Video Ownership Change
1589 - $ref: '#/components/parameters/idOrUUID'
1593 application/x-www-form-urlencoded:
1603 description: successful operation
1605 description: changing video ownership to a remote account is not supported yet
1607 description: video not found
1611 summary: List videos
1612 operationId: getVideos
1616 - $ref: '#/components/parameters/categoryOneOf'
1617 - $ref: '#/components/parameters/isLive'
1618 - $ref: '#/components/parameters/tagsOneOf'
1619 - $ref: '#/components/parameters/tagsAllOf'
1620 - $ref: '#/components/parameters/licenceOneOf'
1621 - $ref: '#/components/parameters/languageOneOf'
1622 - $ref: '#/components/parameters/nsfw'
1623 - $ref: '#/components/parameters/filter'
1624 - $ref: '#/components/parameters/skipCount'
1625 - $ref: '#/components/parameters/start'
1626 - $ref: '#/components/parameters/count'
1627 - $ref: '#/components/parameters/videosSort'
1630 description: successful operation
1634 $ref: '#/components/schemas/VideoListResponse'
1638 summary: List available video categories
1639 operationId: getCategories
1644 description: successful operation
1653 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
1657 summary: List available video licences
1658 operationId: getLicences
1663 description: successful operation
1672 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
1676 summary: List available video languages
1677 operationId: getLanguages
1682 description: successful operation
1691 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
1695 summary: List available video privacy policies
1696 operationId: getPrivacyPolicies
1701 description: successful operation
1710 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
1714 summary: Update a video
1715 operationId: putVideo
1721 - $ref: '#/components/parameters/idOrUUID'
1724 description: successful operation
1727 multipart/form-data:
1732 description: Video thumbnail file
1736 description: Video preview file
1740 $ref: '#/components/schemas/VideoCategorySet'
1742 $ref: '#/components/schemas/VideoLicenceSet'
1744 $ref: '#/components/schemas/VideoLanguageSet'
1746 $ref: '#/components/schemas/VideoPrivacySet'
1748 description: Video description
1751 description: Whether or not we wait transcoding before publish the video
1754 description: A text tell the audience how to support the video creator
1755 example: Please support our work on https://soutenir.framasoft.org/en/ <3
1758 description: Whether or not this video contains sensitive content
1761 description: Video name
1766 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1775 description: Enable or disable comments for this video
1778 description: Enable or disable downloading for this video
1780 originallyPublishedAt:
1781 description: Date when the content was originally published
1785 $ref: '#/components/schemas/VideoScheduledUpdate'
1788 contentType: image/jpeg
1790 contentType: image/jpeg
1792 summary: Get a video
1793 operationId: getVideo
1797 - $ref: '#/components/parameters/idOrUUID'
1800 description: successful operation
1804 $ref: '#/components/schemas/VideoDetails'
1806 summary: Delete a video
1807 operationId: delVideo
1813 - $ref: '#/components/parameters/idOrUUID'
1816 description: successful operation
1818 '/videos/{id}/description':
1820 summary: Get complete video description
1821 operationId: getVideoDesc
1825 - $ref: '#/components/parameters/idOrUUID'
1828 description: successful operation
1837 **[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)**
1839 '/videos/{id}/views':
1841 summary: Add a view to a video
1842 operationId: addView
1846 - $ref: '#/components/parameters/idOrUUID'
1849 description: successful operation
1851 '/videos/{id}/watching':
1853 summary: Set watching progress of a video
1854 operationId: setProgress
1860 - $ref: '#/components/parameters/idOrUUID'
1865 $ref: '#/components/schemas/UserWatchingVideo'
1869 description: successful operation
1873 summary: Upload a video
1874 description: Uses a single request to upload a video.
1875 operationId: uploadLegacy
1883 description: successful operation
1887 $ref: '#/components/schemas/VideoUploadResponse'
1889 description: video didn't pass upload filter
1891 description: upload has timed out
1893 x-summary: video file too large, due to quota or max body size limit set by the reverse-proxy
1895 If the response has no body, it means the reverse-proxy didn't let it through. Otherwise disambiguate via `type`:
1896 - `quota_reached` for quota limits wether daily or global
1898 X-File-Maximum-Size:
1902 description: Maximum file size for the video
1904 description: video type unsupported
1906 description: video unreadable
1909 multipart/form-data:
1911 $ref: '#/components/schemas/VideoUploadRequestLegacy'
1914 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1916 contentType: image/jpeg
1918 contentType: image/jpeg
1923 USERNAME="<your_username>"
1924 PASSWORD="<your_password>"
1925 FILE_PATH="<your_file_path>"
1926 CHANNEL_ID="<your_channel_id>"
1928 API="https://peertube2.cpy.re/api/v1"
1931 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
1932 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
1933 token=$(curl -s "$API/users/token" \
1934 --data client_id="$client_id" \
1935 --data client_secret="$client_secret" \
1936 --data grant_type=password \
1937 --data username="$USERNAME" \
1938 --data password="$PASSWORD" \
1939 | jq -r ".access_token")
1942 curl -s "$API/videos/upload" \
1943 -H "Authorization: Bearer $token" \
1945 --form videofile=@"$FILE_PATH" \
1946 --form channelId=$CHANNEL_ID \
1949 /videos/upload-resumable:
1951 summary: Initialize the resumable upload of a video
1952 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video
1953 operationId: uploadResumableInit
1960 - name: X-Upload-Content-Length
1966 description: Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading.
1967 - name: X-Upload-Content-Type
1974 description: MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.
1979 $ref: '#/components/schemas/VideoUploadRequestResumable'
1982 description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead
1984 description: created
1990 example: /api/v1/videos/upload-resumable?upload_id=471e97554f21dec3b8bb5d4602939c51
1996 x-summary: video file too large, due to quota, absolute max file size or concurrent partial upload limit
1998 Disambiguate via `type`:
1999 - `max_file_size_reached` for the absolute file size limit
2000 - `quota_reached` for quota limits whether daily or global
2002 description: video type unsupported
2004 summary: Send chunk for the resumable upload of a video
2005 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
2006 operationId: uploadResumable
2017 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
2018 not valid anymore and you need to initialize a new upload.
2021 - name: Content-Range
2025 example: bytes 0-262143/2469036
2028 Specifies the bytes in the file that the request is uploading.
2030 For example, a value of `bytes 0-262143/1000000` shows that the request is sending the first
2031 262144 bytes (256 x 1024) in a 2,469,036 byte file.
2032 - name: Content-Length
2039 Size of the chunk that the request is sending.
2041 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)
2042 doesn't mandate for chunks to have the same size throughout the upload sequence.
2044 Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from
2045 1048576 bytes (~1MB) and increases or reduces size depending on connection health.
2048 application/octet-stream:
2054 description: last chunk received
2062 $ref: '#/components/schemas/VideoUploadResponse'
2064 description: resume incomplete
2069 example: bytes=0-262143
2075 description: video didn't pass upload filter
2077 description: upload not found
2079 description: chunk doesn't match range
2081 description: video unreadable
2083 description: too many concurrent requests
2085 summary: Cancel the resumable upload of a video, deleting any data uploaded so far
2086 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video
2087 operationId: uploadResumableCancel
2098 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
2099 not valid anymore and the upload session has already been deleted with its data ;-)
2102 - name: Content-Length
2110 description: upload cancelled
2117 description: upload not found
2121 summary: Import a video
2122 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
2123 operationId: importVideo
2131 multipart/form-data:
2133 $ref: '#/components/schemas/VideoCreateImport'
2136 contentType: application/x-bittorrent
2138 contentType: image/jpeg
2140 contentType: image/jpeg
2143 description: successful operation
2147 $ref: '#/components/schemas/VideoUploadResponse'
2149 description: '`magnetUri` or `targetUrl` or a torrent file missing'
2151 description: video didn't pass pre-import filter
2153 description: HTTP or Torrent/magnetURI import not enabled
2157 summary: Create a live
2158 operationId: addLive
2166 description: successful operation
2170 $ref: '#/components/schemas/VideoUploadResponse'
2172 x-summary: validation error, or conflicting `saveReplay` and `permanentLive` parameter set
2174 Disambiguate via `type`:
2175 - default type for a validation error
2176 - `live_conflicting_permanent_and_save_replay` for conflicting parameters set
2178 x-summary: live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
2180 Disambiguate via `type`:
2181 - `live_not_enabled` for a disabled live feature
2182 - `live_not_allowing_replay` for a disabled replay feature
2183 - `max_instance_lives_limit_reached` for the absolute concurrent live limit
2184 - `max_user_lives_limit_reached` for the user concurrent live limit
2187 multipart/form-data:
2192 description: Channel id that will contain this live video
2197 description: User can stream multiple times in a permanent live
2200 description: Live video/replay thumbnail file
2204 description: Live video/replay preview file
2208 $ref: '#/components/schemas/VideoPrivacySet'
2210 $ref: '#/components/schemas/VideoCategorySet'
2212 $ref: '#/components/schemas/VideoLicenceSet'
2214 $ref: '#/components/schemas/VideoLanguageSet'
2216 description: Live video/replay description
2219 description: A text tell the audience how to support the creator
2220 example: Please support our work on https://soutenir.framasoft.org/en/ <3
2223 description: Whether or not this live video/replay contains sensitive content
2226 description: Live video/replay name
2231 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
2240 description: Enable or disable comments for this live video/replay
2243 description: Enable or disable downloading for the replay of this live video
2250 contentType: image/jpeg
2252 contentType: image/jpeg
2256 summary: Get information about a live
2257 operationId: getLiveId
2264 - $ref: '#/components/parameters/idOrUUID'
2267 description: successful operation
2271 $ref: '#/components/schemas/LiveVideoResponse'
2273 summary: Update information about a live
2274 operationId: updateLiveId
2281 - $ref: '#/components/parameters/idOrUUID'
2286 $ref: '#/components/schemas/LiveVideoUpdate'
2289 description: successful operation
2291 description: bad parameters or trying to update a live that has already started
2293 description: trying to save replay of the live but saving replay is not enabled on the instance
2297 summary: List my abuses
2298 operationId: getMyAbuses
2307 description: only list the report with this id
2313 $ref: '#/components/schemas/AbuseStateSet'
2314 - $ref: '#/components/parameters/abusesSort'
2315 - $ref: '#/components/parameters/start'
2316 - $ref: '#/components/parameters/count'
2319 description: successful operation
2331 $ref: '#/components/schemas/Abuse'
2335 summary: List abuses
2336 operationId: getAbuses
2346 description: only list the report with this id
2349 - name: predefinedReason
2351 description: predefined reason the listed reports should contain
2353 $ref: '#/components/schemas/PredefinedAbuseReasons'
2356 description: plain search that will match with video titles, reporter names and more
2362 $ref: '#/components/schemas/AbuseStateSet'
2363 - name: searchReporter
2365 description: only list reports of a specific reporter
2368 - name: searchReportee
2369 description: only list reports of a specific reportee
2375 description: only list reports of a specific video
2378 - name: searchVideoChannel
2380 description: only list reports of a specific video channel
2385 description: only list deleted or blocklisted videos
2393 description: only list account, comment or video reports
2400 - $ref: '#/components/parameters/start'
2401 - $ref: '#/components/parameters/count'
2402 - $ref: '#/components/parameters/abusesSort'
2405 description: successful operation
2417 $ref: '#/components/schemas/Abuse'
2419 summary: Report an abuse
2432 description: Reason why the user reports this video
2437 $ref: '#/components/schemas/PredefinedAbuseReasons'
2442 description: Video id to report
2444 - $ref: '#/components/schemas/Video/properties/id'
2448 description: Timestamp in the video that marks the beginning of the report
2453 description: Timestamp in the video that marks the ending of the report
2459 description: Comment id to report
2461 - $ref: '#/components/schemas/VideoComment/properties/id'
2466 description: Account id to report
2472 description: successful operation
2482 $ref: '#/components/schemas/id'
2484 description: incorrect request parameters
2486 '/abuses/{abuseId}':
2488 summary: Update an abuse
2496 - $ref: '#/components/parameters/abuseId'
2504 $ref: '#/components/schemas/AbuseStateSet'
2507 description: Update the report comment visible only to the moderation team
2512 description: successful operation
2514 description: abuse not found
2518 summary: Delete an abuse
2524 - $ref: '#/components/parameters/abuseId'
2527 description: successful operation
2529 description: block not found
2531 '/abuses/{abuseId}/messages':
2533 summary: List messages of an abuse
2539 - $ref: '#/components/parameters/abuseId'
2542 description: successful operation
2554 $ref: '#/components/schemas/AbuseMessage'
2556 summary: Add message to an abuse
2562 - $ref: '#/components/parameters/abuseId'
2571 description: Message to send
2579 description: successful operation
2581 description: incorrect request parameters
2583 '/abuses/{abuseId}/messages/{abuseMessageId}':
2585 summary: Delete an abuse message
2591 - $ref: '#/components/parameters/abuseId'
2592 - $ref: '#/components/parameters/abuseMessageId'
2595 description: successful operation
2597 '/videos/{id}/blacklist':
2599 summary: Block a video
2600 operationId: addVideoBlock
2608 - $ref: '#/components/parameters/idOrUUID'
2611 description: successful operation
2613 summary: Unblock a video by its id
2614 operationId: delVideoBlock
2622 - $ref: '#/components/parameters/idOrUUID'
2625 description: successful operation
2627 description: block not found
2633 summary: List video blocks
2634 operationId: getVideoBlocks
2643 list only blocks that match this type:
2647 - `2`: automatic block that needs review
2655 description: plain search that will match with video titles, and more
2658 - $ref: '#/components/parameters/start'
2659 - $ref: '#/components/parameters/count'
2660 - $ref: '#/components/parameters/blacklistsSort'
2663 description: successful operation
2675 $ref: '#/components/schemas/VideoBlacklist'
2677 /videos/{id}/captions:
2679 summary: List captions of a video
2680 operationId: getVideoCaptions
2684 - $ref: '#/components/parameters/idOrUUID'
2687 description: successful operation
2699 $ref: '#/components/schemas/VideoCaption'
2701 /videos/{id}/captions/{captionLanguage}:
2703 summary: Add or replace a video caption
2704 operationId: addVideoCaption
2711 - $ref: '#/components/parameters/idOrUUID'
2712 - $ref: '#/components/parameters/captionLanguage'
2715 multipart/form-data:
2720 description: The file to upload.
2725 contentType: text/vtt, application/x-subrip, text/plain
2728 description: successful operation
2730 description: video or language not found
2732 summary: Delete a video caption
2733 operationId: delVideoCaption
2740 - $ref: '#/components/parameters/idOrUUID'
2741 - $ref: '#/components/parameters/captionLanguage'
2744 description: successful operation
2746 description: video or language or caption for that language not found
2750 summary: List video channels
2751 operationId: getVideoChannels
2755 - $ref: '#/components/parameters/start'
2756 - $ref: '#/components/parameters/count'
2757 - $ref: '#/components/parameters/sort'
2760 description: successful operation
2764 $ref: '#/components/schemas/VideoChannelList'
2766 summary: Create a video channel
2767 operationId: addVideoChannel
2774 description: successful operation
2784 $ref: '#/components/schemas/VideoChannel/properties/id'
2789 $ref: '#/components/schemas/VideoChannelCreate'
2791 '/video-channels/{channelHandle}':
2793 summary: Get a video channel
2794 operationId: getVideoChannel
2798 - $ref: '#/components/parameters/channelHandle'
2801 description: successful operation
2805 $ref: '#/components/schemas/VideoChannel'
2807 summary: Update a video channel
2808 operationId: putVideoChannel
2814 - $ref: '#/components/parameters/channelHandle'
2817 description: successful operation
2822 $ref: '#/components/schemas/VideoChannelUpdate'
2824 summary: Delete a video channel
2825 operationId: delVideoChannel
2831 - $ref: '#/components/parameters/channelHandle'
2834 description: successful operation
2836 '/video-channels/{channelHandle}/videos':
2838 summary: List videos of a video channel
2839 operationId: getVideoChannelVideos
2844 - $ref: '#/components/parameters/channelHandle'
2845 - $ref: '#/components/parameters/categoryOneOf'
2846 - $ref: '#/components/parameters/isLive'
2847 - $ref: '#/components/parameters/tagsOneOf'
2848 - $ref: '#/components/parameters/tagsAllOf'
2849 - $ref: '#/components/parameters/licenceOneOf'
2850 - $ref: '#/components/parameters/languageOneOf'
2851 - $ref: '#/components/parameters/nsfw'
2852 - $ref: '#/components/parameters/filter'
2853 - $ref: '#/components/parameters/skipCount'
2854 - $ref: '#/components/parameters/start'
2855 - $ref: '#/components/parameters/count'
2856 - $ref: '#/components/parameters/videosSort'
2859 description: successful operation
2863 $ref: '#/components/schemas/VideoListResponse'
2865 '/video-channels/{channelHandle}/followers':
2869 summary: 'List followers of a video channel'
2872 operationId: getVideoChannelFollowers
2874 - $ref: '#/components/parameters/channelHandle'
2875 - $ref: '#/components/parameters/start'
2876 - $ref: '#/components/parameters/count'
2877 - $ref: '#/components/parameters/followersSort'
2878 - $ref: '#/components/parameters/search'
2881 description: successful operation
2893 $ref: '#/components/schemas/Follow'
2895 '/video-channels/{channelHandle}/avatar/pick':
2897 summary: Update channel avatar
2903 - $ref: '#/components/parameters/channelHandle'
2906 description: successful operation
2913 $ref: '#/components/schemas/ActorImage'
2915 description: image file too large
2917 X-File-Maximum-Size:
2921 description: Maximum file size for the avatar
2924 multipart/form-data:
2929 description: The file to upload.
2934 contentType: image/png, image/jpeg
2936 '/video-channels/{channelHandle}/avatar':
2938 summary: Delete channel avatar
2944 - $ref: '#/components/parameters/channelHandle'
2947 description: successful operation
2949 '/video-channels/{channelHandle}/banner/pick':
2951 summary: Update channel banner
2957 - $ref: '#/components/parameters/channelHandle'
2960 description: successful operation
2967 $ref: '#/components/schemas/ActorImage'
2969 description: image file too large
2971 X-File-Maximum-Size:
2975 description: Maximum file size for the banner
2978 multipart/form-data:
2983 description: The file to upload.
2988 contentType: image/png, image/jpeg
2990 '/video-channels/{channelHandle}/banner':
2992 summary: Delete channel banner
2998 - $ref: '#/components/parameters/channelHandle'
3001 description: successful operation
3003 /video-playlists/privacies:
3005 summary: List available playlist privacy policies
3006 operationId: getPlaylistPrivacyPolicies
3011 description: successful operation
3020 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
3024 summary: List video playlists
3025 operationId: getPlaylists
3029 - $ref: '#/components/parameters/start'
3030 - $ref: '#/components/parameters/count'
3031 - $ref: '#/components/parameters/sort'
3034 description: successful operation
3046 $ref: '#/components/schemas/VideoPlaylist'
3048 summary: Create a video playlist
3049 description: If the video playlist is set as public, `videoChannelId` is mandatory.
3050 operationId: addPlaylist
3057 description: successful operation
3067 $ref: '#/components/schemas/VideoPlaylist/properties/id'
3069 $ref: '#/components/schemas/VideoPlaylist/properties/uuid'
3071 $ref: '#/components/schemas/VideoPlaylist/properties/shortUUID'
3074 multipart/form-data:
3079 description: Video playlist display name
3084 description: Video playlist thumbnail file
3088 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
3090 description: Video playlist description
3096 - $ref: '#/components/schemas/id'
3097 description: Video channel in which the playlist will be published
3102 contentType: image/jpeg
3104 /video-playlists/{playlistId}:
3106 summary: Get a video playlist
3110 - $ref: '#/components/parameters/playlistId'
3113 description: successful operation
3117 $ref: '#/components/schemas/VideoPlaylist'
3119 summary: Update a video playlist
3120 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
3127 description: successful operation
3129 - $ref: '#/components/parameters/playlistId'
3132 multipart/form-data:
3137 description: Video playlist display name
3142 description: Video playlist thumbnail file
3146 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
3148 description: Video playlist description
3152 - $ref: '#/components/schemas/id'
3153 description: Video channel in which the playlist will be published
3156 contentType: image/jpeg
3158 summary: Delete a video playlist
3164 - $ref: '#/components/parameters/playlistId'
3167 description: successful operation
3169 /video-playlists/{playlistId}/videos:
3171 summary: 'List videos of a playlist'
3172 operationId: getVideoPlaylistVideos
3177 - $ref: '#/components/parameters/playlistId'
3178 - $ref: '#/components/parameters/start'
3179 - $ref: '#/components/parameters/count'
3182 description: successful operation
3186 $ref: '#/components/schemas/VideoListResponse'
3188 summary: Add a video in a playlist
3189 operationId: addVideoPlaylistVideo
3196 - $ref: '#/components/parameters/playlistId'
3199 description: successful operation
3205 videoPlaylistElement:
3219 - $ref: '#/components/schemas/Video/properties/uuid'
3220 - $ref: '#/components/schemas/Video/properties/id'
3221 description: Video to add in the playlist
3225 description: Start the video at this specific timestamp
3229 description: Stop the video at this specific timestamp
3233 /video-playlists/{playlistId}/videos/reorder:
3235 summary: 'Reorder a playlist'
3236 operationId: reorderVideoPlaylist
3242 - $ref: '#/components/parameters/playlistId'
3245 description: successful operation
3254 description: 'Start position of the element to reorder'
3256 insertAfterPosition:
3258 description: 'New position for the block to reorder, to add the block before the first element'
3262 description: 'How many element from `startPosition` to reorder'
3266 - insertAfterPosition
3268 /video-playlists/{playlistId}/videos/{playlistElementId}:
3270 summary: Update a playlist element
3271 operationId: putVideoPlaylistVideo
3277 - $ref: '#/components/parameters/playlistId'
3278 - $ref: '#/components/parameters/playlistElementId'
3281 description: successful operation
3291 description: Start the video at this specific timestamp
3295 description: Stop the video at this specific timestamp
3297 summary: Delete an element from a playlist
3298 operationId: delVideoPlaylistVideo
3304 - $ref: '#/components/parameters/playlistId'
3305 - $ref: '#/components/parameters/playlistElementId'
3308 description: successful operation
3310 '/users/me/video-playlists/videos-exist':
3312 summary: Check video exists in my playlists
3321 description: The video ids to check
3325 $ref: '#/components/schemas/Video/properties/id'
3328 description: successful operation
3350 '/accounts/{name}/video-channels':
3352 summary: List video channels of an account
3357 - $ref: '#/components/parameters/name'
3360 description: include view statistics for the last 30 days (only if authentified as the account user)
3363 - $ref: '#/components/parameters/start'
3364 - $ref: '#/components/parameters/count'
3365 - $ref: '#/components/parameters/sort'
3368 description: successful operation
3372 $ref: '#/components/schemas/VideoChannelList'
3374 '/accounts/{name}/ratings':
3376 summary: List ratings of an account
3382 - $ref: '#/components/parameters/name'
3383 - $ref: '#/components/parameters/start'
3384 - $ref: '#/components/parameters/count'
3385 - $ref: '#/components/parameters/sort'
3389 description: Optionally filter which ratings to retrieve
3397 description: successful operation
3403 $ref: '#/components/schemas/VideoRating'
3405 '/videos/{id}/comment-threads':
3407 summary: List threads of a video
3411 - $ref: '#/components/parameters/idOrUUID'
3412 - $ref: '#/components/parameters/start'
3413 - $ref: '#/components/parameters/count'
3414 - $ref: '#/components/parameters/commentsSort'
3417 description: successful operation
3421 $ref: '#/components/schemas/CommentThreadResponse'
3423 summary: Create a thread
3429 - $ref: '#/components/parameters/idOrUUID'
3432 description: successful operation
3436 $ref: '#/components/schemas/CommentThreadPostResponse'
3438 description: video does not exist
3447 - $ref: '#/components/schemas/VideoComment/properties/text'
3453 '/videos/{id}/comment-threads/{threadId}':
3455 summary: Get a thread
3459 - $ref: '#/components/parameters/idOrUUID'
3460 - $ref: '#/components/parameters/threadId'
3463 description: successful operation
3467 $ref: '#/components/schemas/VideoCommentThreadTree'
3469 '/videos/{id}/comments/{commentId}':
3471 summary: Reply to a thread of a video
3477 - $ref: '#/components/parameters/idOrUUID'
3478 - $ref: '#/components/parameters/commentId'
3481 description: successful operation
3485 $ref: '#/components/schemas/CommentThreadPostResponse'
3487 description: thread or video does not exist
3496 - $ref: '#/components/schemas/VideoComment/properties/text'
3502 summary: Delete a comment or a reply
3508 - $ref: '#/components/parameters/idOrUUID'
3509 - $ref: '#/components/parameters/commentId'
3512 description: successful operation
3514 description: cannot remove comment of another user
3516 description: comment or video does not exist
3518 description: comment is already deleted
3520 '/videos/{id}/rate':
3522 summary: Like/dislike a video
3528 - $ref: '#/components/parameters/idOrUUID'
3544 description: successful operation
3546 description: video does not exist
3552 summary: Search videos
3553 operationId: searchVideos
3558 allowEmptyValue: false
3560 String to search. If the user can make a remote URI search, and the string is an URI then the
3561 PeerTube instance will fetch the remote object and add it to its database. Then,
3562 you can use the REST API to fetch the complete video information and interact with it.
3565 - $ref: '#/components/parameters/categoryOneOf'
3566 - $ref: '#/components/parameters/isLive'
3567 - $ref: '#/components/parameters/tagsOneOf'
3568 - $ref: '#/components/parameters/tagsAllOf'
3569 - $ref: '#/components/parameters/licenceOneOf'
3570 - $ref: '#/components/parameters/languageOneOf'
3571 - $ref: '#/components/parameters/nsfw'
3572 - $ref: '#/components/parameters/filter'
3573 - $ref: '#/components/parameters/skipCount'
3574 - $ref: '#/components/parameters/start'
3575 - $ref: '#/components/parameters/count'
3576 - $ref: '#/components/parameters/searchTarget'
3577 - $ref: '#/components/parameters/videosSearchSort'
3580 description: Get videos that are published after this date
3586 description: Get videos that are published before this date
3590 - name: originallyPublishedStartDate
3592 description: Get videos that are originally published after this date
3596 - name: originallyPublishedEndDate
3598 description: Get videos that are originally published before this date
3604 description: Get videos that have this minimum duration
3609 description: Get videos that have this maximum duration
3613 'searchTarget === search-index':
3614 $ref: '#/components/callbacks/searchIndex'
3617 description: successful operation
3621 $ref: '#/components/schemas/VideoListResponse'
3623 description: search index unavailable
3625 /search/video-channels:
3629 summary: Search channels
3630 operationId: searchChannels
3636 String to search. If the user can make a remote URI search, and the string is an URI then the
3637 PeerTube instance will fetch the remote object and add it to its database. Then,
3638 you can use the REST API to fetch the complete channel information and interact with it.
3641 - $ref: '#/components/parameters/start'
3642 - $ref: '#/components/parameters/count'
3643 - $ref: '#/components/parameters/searchTarget'
3644 - $ref: '#/components/parameters/sort'
3646 'searchTarget === search-index':
3647 $ref: '#/components/callbacks/searchIndex'
3650 description: successful operation
3654 $ref: '#/components/schemas/VideoChannelList'
3656 description: search index unavailable
3658 /search/video-playlists:
3662 summary: Search playlists
3663 operationId: searchPlaylists
3669 String to search. If the user can make a remote URI search, and the string is an URI then the
3670 PeerTube instance will fetch the remote object and add it to its database. Then,
3671 you can use the REST API to fetch the complete playlist information and interact with it.
3674 - $ref: '#/components/parameters/start'
3675 - $ref: '#/components/parameters/count'
3676 - $ref: '#/components/parameters/searchTarget'
3677 - $ref: '#/components/parameters/sort'
3679 'searchTarget === search-index':
3680 $ref: '#/components/callbacks/searchIndex'
3683 description: successful operation
3695 $ref: '#/components/schemas/VideoPlaylist'
3697 description: search index unavailable
3699 /server/blocklist/accounts:
3703 summary: List account blocks
3708 - $ref: '#/components/parameters/start'
3709 - $ref: '#/components/parameters/count'
3710 - $ref: '#/components/parameters/sort'
3713 description: successful operation
3717 summary: Block an account
3729 example: chocobozzz@example.org
3730 description: account to block, in the form `username@domain`
3735 description: successful operation
3737 description: self-blocking forbidden
3739 '/server/blocklist/accounts/{accountName}':
3743 summary: Unblock an account by its handle
3751 description: account to unblock, in the form `username@domain`
3756 description: successful operation
3758 description: account or account block does not exist
3760 /server/blocklist/servers:
3764 summary: List server blocks
3769 - $ref: '#/components/parameters/start'
3770 - $ref: '#/components/parameters/count'
3771 - $ref: '#/components/parameters/sort'
3774 description: successful operation
3778 summary: Block a server
3791 description: server domain to block
3796 description: successful operation
3798 description: self-blocking forbidden
3800 '/server/blocklist/servers/{host}':
3804 summary: Unblock a server by its domain
3812 description: server domain to unblock
3818 description: successful operation
3820 description: account block does not exist
3822 /server/redundancy/{host}:
3825 - Instance Redundancy
3826 summary: Update a server redundancy policy
3834 description: server domain to mirror
3846 description: allow mirroring of the host's local videos
3851 description: successful operation
3853 description: server is not already known
3855 /server/redundancy/videos:
3859 summary: List videos being mirrored
3860 operationId: getMirroredVideos
3868 description: direction of the mirror
3874 - $ref: '#/components/parameters/start'
3875 - $ref: '#/components/parameters/count'
3876 - $ref: '#/components/parameters/videoRedundanciesSort'
3879 description: successful operation
3885 $ref: '#/components/schemas/VideoRedundancy'
3889 summary: Mirror a video
3890 operationId: putMirroredVideo
3901 $ref: '#/components/schemas/Video/properties/id'
3906 description: successful operation
3908 description: cannot mirror a local video
3910 description: video does not exist
3912 description: video is already mirrored
3914 /server/redundancy/videos/{redundancyId}:
3918 summary: Delete a mirror done on a video
3919 operationId: delMirroredVideo
3924 - name: redundancyId
3927 description: id of an existing redundancy on a video
3932 description: successful operation
3934 description: video redundancy not found
3936 '/feeds/video-comments.{format}':
3940 summary: List comments on videos
3941 operationId: getSyndicatedComments
3946 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3959 description: 'limit listing to a specific video'
3964 description: 'limit listing to a specific account'
3969 description: 'limit listing to a specific account'
3972 - name: videoChannelId
3974 description: 'limit listing to a specific video channel'
3977 - name: videoChannelName
3979 description: 'limit listing to a specific video channel'
3984 description: successful operation
3989 default: 'max-age=900' # 15 min cache
3993 $ref: '#/components/schemas/VideoCommentsForXML'
3996 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3997 application/rss+xml:
3999 $ref: '#/components/schemas/VideoCommentsForXML'
4002 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
4005 $ref: '#/components/schemas/VideoCommentsForXML'
4008 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
4009 application/atom+xml:
4011 $ref: '#/components/schemas/VideoCommentsForXML'
4014 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
4020 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
4022 x-summary: field inconsistencies
4025 - videoId filter is mixed with a channel filter
4027 description: video, video channel or account not found
4029 description: accept header unsupported
4031 '/feeds/videos.{format}':
4035 summary: List videos
4036 operationId: getSyndicatedVideos
4041 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
4054 description: 'limit listing to a specific account'
4059 description: 'limit listing to a specific account'
4062 - name: videoChannelId
4064 description: 'limit listing to a specific video channel'
4067 - name: videoChannelName
4069 description: 'limit listing to a specific video channel'
4072 - $ref: '#/components/parameters/sort'
4073 - $ref: '#/components/parameters/nsfw'
4074 - $ref: '#/components/parameters/filter'
4077 description: successful operation
4082 default: 'max-age=900' # 15 min cache
4086 $ref: '#/components/schemas/VideosForXML'
4089 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
4090 application/rss+xml:
4092 $ref: '#/components/schemas/VideosForXML'
4095 externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
4098 $ref: '#/components/schemas/VideosForXML'
4101 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
4102 application/atom+xml:
4104 $ref: '#/components/schemas/VideosForXML'
4107 externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
4113 externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
4115 description: video channel or account not found
4117 description: accept header unsupported
4119 '/feeds/subscriptions.{format}':
4124 summary: List videos of subscriptions tied to a token
4125 operationId: getSyndicatedSubscriptionVideos
4130 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
4143 description: limit listing to a specific account
4149 description: private token allowing access
4153 - $ref: '#/components/parameters/sort'
4154 - $ref: '#/components/parameters/nsfw'
4155 - $ref: '#/components/parameters/filter'
4158 description: successful operation
4163 default: 'max-age=900' # 15 min cache
4167 $ref: '#/components/schemas/VideosForXML'
4168 application/rss+xml:
4170 $ref: '#/components/schemas/VideosForXML'
4173 $ref: '#/components/schemas/VideosForXML'
4174 application/atom+xml:
4176 $ref: '#/components/schemas/VideosForXML'
4181 description: accept header unsupported
4187 summary: List plugins
4188 operationId: getPlugins
4201 - $ref: '#/components/parameters/start'
4202 - $ref: '#/components/parameters/count'
4203 - $ref: '#/components/parameters/sort'
4206 description: successful operation
4210 $ref: '#/components/schemas/PluginResponse'
4216 summary: List available plugins
4217 operationId: getAvailablePlugins
4230 - name: currentPeerTubeEngine
4234 - $ref: '#/components/parameters/start'
4235 - $ref: '#/components/parameters/count'
4236 - $ref: '#/components/parameters/sort'
4239 description: successful operation
4243 $ref: '#/components/schemas/PluginResponse'
4245 description: plugin index unavailable
4251 summary: Install a plugin
4252 operationId: addPlugin
4265 example: peertube-plugin-auth-ldap
4268 additionalProperties: false
4275 additionalProperties: false
4278 description: successful operation
4280 description: should have either `npmName` or `path` set
4286 summary: Update a plugin
4287 operationId: updatePlugin
4300 example: peertube-plugin-auth-ldap
4303 additionalProperties: false
4310 additionalProperties: false
4313 description: successful operation
4315 description: should have either `npmName` or `path` set
4317 description: existing plugin not found
4323 summary: Uninstall a plugin
4324 operationId: uninstallPlugin
4336 description: name of the plugin/theme in its package.json
4337 example: peertube-plugin-auth-ldap
4342 description: successful operation
4344 description: existing plugin not found
4350 summary: Get a plugin
4351 operationId: getPlugin
4356 - $ref: '#/components/parameters/npmName'
4359 description: successful operation
4363 $ref: '#/components/schemas/Plugin'
4365 description: plugin not found
4367 /plugins/{npmName}/settings:
4371 summary: Set a plugin's settings
4376 - $ref: '#/components/parameters/npmName'
4385 additionalProperties: true
4388 description: successful operation
4390 description: plugin not found
4392 /plugins/{npmName}/public-settings:
4396 summary: Get a plugin's public settings
4398 - $ref: '#/components/parameters/npmName'
4401 description: successful operation
4406 additionalProperties: true
4408 description: plugin not found
4410 /plugins/{npmName}/registered-settings:
4414 summary: Get a plugin's registered settings
4419 - $ref: '#/components/parameters/npmName'
4422 description: successful operation
4427 additionalProperties: true
4429 description: plugin not found
4432 - url: 'https://peertube2.cpy.re/api/v1'
4433 description: Live Test Server (live data - latest nightly version)
4434 - url: 'https://peertube3.cpy.re/api/v1'
4435 description: Live Test Server (live data - latest RC version)
4436 - url: 'https://peertube.cpy.re/api/v1'
4437 description: Live Test Server (live data - stable version)
4444 description: Offset used to paginate results
4452 description: "Number of items to return"
4462 description: Sort column
4470 description: Plain text search, applied to various parts of the model depending on endpoint
4478 If the administrator enabled search index support, you can override the default search target.
4481 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
4482 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
4483 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
4484 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
4485 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
4486 * 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
4487 the data from the origin instance API
4497 description: Sort videos by criteria
4513 description: Sort videos by criteria
4528 description: Sort comments by criteria
4538 description: Sort blocklists by criteria
4554 description: Plain text search that will match with user usernames or emails
4561 description: Filter results down to (un)banned users
4568 description: Sort users by criteria
4579 description: Sort abuses by criteria
4586 videoRedundanciesSort:
4590 description: Sort abuses by criteria
4599 description: Sort followers by criteria
4608 description: The username or handle of the account
4611 example: chocobozzz | chocobozzz@example.org
4616 description: The user id
4618 $ref: '#/components/schemas/id'
4623 description: The object id, uuid or short uuid
4626 - $ref: '#/components/schemas/id'
4627 - $ref: '#/components/schemas/UUIDv4'
4628 - $ref: '#/components/schemas/shortUUID'
4633 description: Playlist id
4635 $ref: '#/components/schemas/VideoPlaylist/properties/id'
4637 name: playlistElementId
4640 description: Playlist element id
4642 $ref: '#/components/schemas/id'
4647 description: Abuse id
4649 $ref: '#/components/schemas/Abuse/properties/id'
4651 name: abuseMessageId
4654 description: Abuse message id
4656 $ref: '#/components/schemas/AbuseMessage/properties/id'
4658 name: captionLanguage
4661 description: The caption language
4663 $ref: '#/components/schemas/VideoLanguageSet'
4668 description: The video channel handle
4671 example: my_username | my_username@example.com
4673 name: subscriptionHandle
4676 description: The subscription handle
4679 example: my_username | my_username@example.com
4684 description: The thread id (root comment id)
4691 description: The comment id
4693 $ref: '#/components/schemas/VideoComment/properties/id'
4698 description: whether or not the video is a live
4705 description: category id of the video (see [/videos/categories](#operation/getCategories))
4708 - $ref: '#/components/schemas/VideoCategorySet'
4711 $ref: '#/components/schemas/VideoCategorySet'
4718 description: tag(s) of the video
4732 description: tag(s) of the video, where all should be present in the video
4745 description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language
4748 - $ref: '#/components/schemas/VideoLanguageSet'
4751 $ref: '#/components/schemas/VideoLanguageSet'
4758 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4761 - $ref: '#/components/schemas/VideoLicenceSet'
4764 $ref: '#/components/schemas/VideoLicenceSet'
4771 description: if you don't need the `total` in the response
4782 description: whether to include nsfw videos, if any
4793 Special filters which might require special rights:
4794 * `local` - only videos local to the instance
4795 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
4796 * `all` - all videos, showing private and unlisted videos (requires Admin privileges)
4806 description: list of uris to check if each is part of the user subscriptions
4816 description: name of the plugin/theme on npmjs.com or in its package.json
4819 example: peertube-plugin-auth-ldap
4824 description: job type
4828 - activitypub-follow
4829 - activitypub-http-broadcast
4830 - activitypub-http-fetcher
4831 - activitypub-http-unicast
4837 - activitypub-refresher
4862 Authenticating via OAuth requires the following steps:
4863 - Have an activated account
4864 - [Generate] an access token for that account at `/api/v1/users/token`.
4865 - Make requests with the *Authorization: Bearer <token\>* header
4866 - Profit, depending on the role assigned to the account
4868 Note that the __access token is valid for 1 day__ and is given
4869 along with a __refresh token valid for 2 weeks__.
4871 [Generate]: https://docs.joinpeertube.org/api-rest-getting-started
4875 tokenUrl: /api/v1/users/token
4878 moderator: Moderator scope
4881 # Resuable core properties
4889 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4890 pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
4895 description: translation of a uuid v4 with a bigger alphabet to have a shorter uuid
4896 example: 2y84q2MQUMWPbiEcxNXMgC
4899 description: immutable name of the user, used to find or mention its actor
4901 pattern: '/^[a-z0-9._]+$/'
4906 description: immutable name of the channel, used to interact with its actor
4907 example: framasoft_videos
4908 pattern: '/^[a-zA-Z0-9\\-_.:]+$/'
4919 description: category id of the video (see [/videos/categories](#operation/getCategories))
4921 VideoConstantNumber-Category:
4924 $ref: '#/components/schemas/VideoCategorySet'
4927 example: Science & Technology
4931 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4933 VideoConstantNumber-Licence:
4936 $ref: '#/components/schemas/VideoLicenceSet'
4939 example: Attribution - Share Alike
4943 description: language id of the video (see [/videos/languages](#operation/getLanguages))
4945 VideoConstantString-Language:
4948 $ref: '#/components/schemas/VideoLanguageSet'
4953 VideoPlaylistPrivacySet:
4959 description: Video playlist privacy policy (see [/video-playlists/privacies])
4960 VideoPlaylistPrivacyConstant:
4963 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4967 VideoPlaylistTypeSet:
4972 description: The video playlist type (Regular = `1`, Watch Later = `2`)
4973 VideoPlaylistTypeConstant:
4976 $ref: '#/components/schemas/VideoPlaylistTypeSet'
4987 description: privacy id of the video (see [/videos/privacies](#operation/getPrivacyPolicies))
4988 VideoPrivacyConstant:
4991 $ref: '#/components/schemas/VideoPrivacySet'
5008 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
5015 description: 'Admin flags for the user (None = `0`, Bypass video blocklist = `1`)'
5026 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
5036 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
5040 $ref: '#/components/schemas/AbuseStateSet'
5043 AbusePredefinedReasons:
5056 example: [spamOrMisleading]
5061 Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`)
5063 `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos.
5065 VideoResolutionConstant:
5066 description: resolutions and their labels for the video
5069 $ref: '#/components/schemas/VideoResolutionSet'
5073 VideoScheduledUpdate:
5076 $ref: '#/components/schemas/VideoPrivacySet'
5080 description: When to update the video
5100 - $ref: '#/components/schemas/ActorImage'
5101 VideoChannelSummary:
5104 $ref: '#/components/schemas/id'
5118 - $ref: '#/components/schemas/ActorImage'
5132 - $ref: '#/components/schemas/Video'
5139 description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file
5140 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5142 $ref: '#/components/schemas/VideoResolutionConstant'
5145 description: Video file size in bytes
5148 description: Direct URL of the torrent file
5152 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
5156 description: Direct URL of the video
5160 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
5164 description: Frames per second of the video file
5168 description: URL dereferencing the output of ffprobe on the file
5169 VideoStreamingPlaylists:
5174 $ref: '#/components/schemas/id'
5182 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS'
5183 VideoStreamingPlaylists-HLS:
5194 Video files associated to this playlist.
5196 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.)
5198 $ref: '#/components/schemas/VideoFile'
5210 $ref: '#/components/schemas/Video/properties/id'
5212 $ref: '#/components/schemas/Video/properties/uuid'
5214 $ref: '#/components/schemas/Video/properties/name'
5218 description: object id for the video
5220 - $ref: '#/components/schemas/id'
5222 description: universal identifier for the video, that can be used across instances
5224 - $ref: '#/components/schemas/UUIDv4'
5227 - $ref: '#/components/schemas/shortUUID'
5233 example: 2017-10-01T10:52:46.396Z
5234 description: time at which the video object was first drafted
5238 example: 2018-10-01T10:52:46.396Z
5239 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
5243 example: 2021-05-04T08:01:01.502Z
5244 description: last time the video's metadata was modified
5245 originallyPublishedAt:
5248 example: 2010-10-01T10:52:46.396Z
5249 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
5252 - $ref: '#/components/schemas/VideoConstantNumber-Category'
5253 description: category in which the video is classified
5256 - $ref: '#/components/schemas/VideoConstantNumber-Licence'
5257 description: licence under which the video is distributed
5260 - $ref: '#/components/schemas/VideoConstantString-Language'
5261 description: main language used in the video
5264 - $ref: '#/components/schemas/VideoPrivacyConstant'
5265 description: privacy policy used to distribute the video
5269 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n
5270 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr...
5274 truncated description of the video, written in Markdown.
5275 Resolve `descriptionPath` to get the full description of maximum `10000` characters.
5280 description: duration of the video in seconds
5285 description: title of the video
5286 example: What is PeerTube?
5291 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5294 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5297 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
5314 - $ref: '#/components/schemas/VideoStateConstant'
5315 description: represents the internal state of the video processing within the PeerTube instance
5319 - $ref: '#/components/schemas/VideoScheduledUpdate'
5327 $ref: '#/components/schemas/AccountSummary'
5329 $ref: '#/components/schemas/VideoChannelSummary'
5338 - $ref: '#/components/schemas/Video'
5343 example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description
5344 description: path at which to get the full description of maximum `10000` characters
5347 description: A text tell the audience how to support the video creator
5348 example: Please support our work on https://soutenir.framasoft.org/en/ <3
5352 $ref: '#/components/schemas/VideoChannel'
5354 $ref: '#/components/schemas/Account'
5356 example: [flowers, gardening]
5374 - https://peertube2.cpy.re/tracker/announce
5375 - wss://peertube2.cpy.re/tracker/socket
5379 $ref: '#/components/schemas/VideoFile'
5381 WebTorrent/raw video files. If WebTorrent is disabled on the server:
5383 - field will be empty
5384 - video files will be found in `streamingPlaylists[].files` field
5388 $ref: '#/components/schemas/VideoStreamingPlaylists'
5390 HLS playlists/manifest files. If HLS is disabled on the server:
5392 - field will be empty
5393 - video files will be found in `files` field
5394 FileRedundancyInformation:
5397 $ref: '#/components/schemas/id'
5422 $ref: '#/components/schemas/id'
5429 $ref: '#/components/schemas/UUIDv4'
5436 $ref: '#/components/schemas/FileRedundancyInformation'
5440 $ref: '#/components/schemas/FileRedundancyInformation'
5441 VideoImportStateConstant:
5449 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
5456 additionalProperties: false
5460 $ref: '#/components/schemas/VideoImport/properties/targetUrl'
5461 required: [targetUrl]
5464 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
5465 required: [magnetUri]
5468 $ref: '#/components/schemas/VideoImport/properties/torrentfile'
5469 required: [torrentfile]
5470 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5479 - $ref: '#/components/schemas/id'
5483 description: remote URL where to find the import's source video
5484 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
5488 description: magnet URI allowing to resolve the import's source video
5489 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5494 description: Torrent file containing only the video file
5501 - $ref: '#/components/schemas/VideoImportStateConstant'
5517 - $ref: '#/components/schemas/Video'
5527 $ref: '#/components/schemas/VideoImport'
5531 $ref: '#/components/schemas/id'
5534 example: The video is a spam
5538 $ref: '#/components/schemas/AbusePredefinedReasons'
5540 $ref: '#/components/schemas/Account'
5542 $ref: '#/components/schemas/AbuseStateConstant'
5545 example: Decided to ban the server since it spams us regularly
5549 $ref: '#/components/schemas/VideoInfo'
5556 $ref: '#/components/schemas/id'
5567 $ref: '#/components/schemas/AccountSummary'
5571 $ref: '#/components/schemas/id'
5573 $ref: '#/components/schemas/Video/properties/id'
5585 $ref: '#/components/schemas/UUIDv4'
5603 $ref: '#/components/schemas/id'
5605 $ref: '#/components/schemas/UUIDv4'
5608 - $ref: '#/components/schemas/shortUUID'
5631 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
5633 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
5635 $ref: '#/components/schemas/AccountSummary'
5637 $ref: '#/components/schemas/VideoChannelSummary'
5641 $ref: '#/components/schemas/id'
5648 description: Text of the comment
5650 example: This video is wonderful!
5652 $ref: '#/components/schemas/id'
5656 - $ref: '#/components/schemas/id'
5658 $ref: '#/components/schemas/Video/properties/id'
5673 totalRepliesFromVideoAuthor:
5680 $ref: '#/components/schemas/Account'
5681 VideoCommentThreadTree:
5684 $ref: '#/components/schemas/VideoComment'
5688 $ref: '#/components/schemas/VideoCommentThreadTree'
5692 $ref: '#/components/schemas/VideoConstantString-Language'
5708 $ref: '#/components/schemas/id'
5725 $ref: '#/components/schemas/id'
5730 description: immutable name of the actor, used to find or mention it
5732 - $ref: '#/components/schemas/username'
5736 description: server on which the actor is resident
5737 hostRedundancyAllowed:
5739 description: whether this actor's host allows redundancy of its videos
5743 description: number of actors subscribed to by this actor, as seen by this instance
5747 description: number of followers of this actor, as seen by this instance
5755 $ref: '#/components/schemas/ActorImage'
5758 - $ref: '#/components/schemas/Actor'
5761 description: object id for the user tied to this account
5763 - $ref: '#/components/schemas/User/properties/id'
5766 description: editable name of the account, displayed in its representations
5771 description: text or bio displayed on the account's profile
5777 description: timestamp within the video, in seconds
5844 allowedForCurrentIP:
5846 requiresEmailVerification:
5864 $ref: '#/components/schemas/VideoResolutionSet'
5949 example: 16810141515
6058 requiresEmailVerification:
6073 description: Settings that apply to new users, if registration is enabled
6077 example: 16810141515
6083 description: Settings pertaining to transcoding jobs
6087 allowAdditionalExtensions:
6089 description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos
6092 description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
6095 description: Amount of threads used by ffmpeg for 1 transcoding job
6098 description: Amount of transcoding jobs to execute in parallel
6104 New profiles can be added by plugins ; available in core PeerTube: 'default'.
6107 description: Resolutions to transcode _new videos_ to
6127 description: WebTorrent-specific settings
6133 description: HLS-specific settings
6183 $ref: '#/components/schemas/id'
6185 $ref: '#/components/schemas/Actor'
6187 $ref: '#/components/schemas/Actor'
6190 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
6203 PredefinedAbuseReasons:
6204 description: Reason categories that help triage reports
6222 $ref: '#/components/schemas/id'
6234 - activitypub-http-unicast
6235 - activitypub-http-broadcast
6236 - activitypub-http-fetcher
6237 - activitypub-follow
6243 - activitypub-refresher
6247 additionalProperties: true
6250 additionalProperties: true
6266 $ref: '#/components/schemas/id'
6271 $ref: '#/components/schemas/id'
6272 VideoUploadRequestCommon:
6275 description: Video name
6277 example: What is PeerTube?
6281 description: Channel id that will contain this video
6286 $ref: '#/components/schemas/VideoPrivacySet'
6288 $ref: '#/components/schemas/VideoCategorySet'
6290 $ref: '#/components/schemas/VideoLicenceSet'
6292 $ref: '#/components/schemas/VideoLanguageSet'
6294 description: Video description
6297 **[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)**
6299 description: Whether or not we wait transcoding before publish the video
6302 description: A text tell the audience how to support the video creator
6303 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6306 description: Whether or not this video contains sensitive content
6309 description: Video tags (maximum 5 tags each between 2 and 30 characters)
6322 description: Enable or disable comments for this video
6325 description: Enable or disable downloading for this video
6327 originallyPublishedAt:
6328 description: Date when the content was originally published
6332 $ref: '#/components/schemas/VideoScheduledUpdate'
6334 description: Video thumbnail file
6338 description: Video preview file
6344 VideoUploadRequestLegacy:
6346 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6352 description: Video file
6355 VideoUploadRequestResumable:
6357 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6363 description: Video filename including extension
6366 example: what_is_peertube.mp4
6368 description: Video thumbnail file
6372 description: Video preview file
6375 VideoUploadResponse:
6381 $ref: '#/components/schemas/Video/properties/id'
6383 $ref: '#/components/schemas/Video/properties/uuid'
6385 $ref: '#/components/schemas/Video/properties/shortUUID'
6386 CommentThreadResponse:
6395 $ref: '#/components/schemas/VideoComment'
6396 CommentThreadPostResponse:
6399 $ref: '#/components/schemas/VideoComment'
6409 $ref: '#/components/schemas/Video'
6413 $ref: '#/components/schemas/Account'
6416 description: Automatically start playing the upcoming video after the currently playing video
6417 autoPlayNextVideoPlaylist:
6419 description: Automatically start playing the video on the playlist after the currently playing video
6422 description: Automatically start playing the video on the watch page
6432 description: The user email
6435 description: Has the user confirmed their email address?
6438 - $ref: '#/components/schemas/id'
6442 description: Auth plugin to use to authenticate the user
6446 noInstanceConfigWarningModal:
6448 noAccountSetupWarningModal:
6453 $ref: '#/components/schemas/NSFWPolicy'
6455 $ref: '#/components/schemas/UserRole'
6464 description: Theme enabled by this user
6466 $ref: '#/components/schemas/username'
6470 $ref: '#/components/schemas/VideoChannel'
6473 description: The user video quota in bytes
6477 description: The user daily video quota in bytes
6481 description: Enable P2P in the player
6484 - $ref: '#/components/schemas/User'
6486 # optionally present fields: they require WITH_STATS scope
6489 description: Count of videos published
6492 description: Count of reports/abuses of which the user is a target
6493 abusesAcceptedCount:
6495 description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team
6498 description: Count of reports/abuses created by the user
6501 description: Count of comments published
6505 $ref: '#/components/schemas/username'
6507 $ref: '#/components/schemas/password'
6511 description: The user email
6514 description: The user video quota in bytes
6518 description: The user daily video quota in bytes
6521 $ref: '#/components/schemas/usernameChannel'
6523 $ref: '#/components/schemas/UserRole'
6525 $ref: '#/components/schemas/UserAdminFlags'
6536 description: The updated email of the user
6538 - $ref: '#/components/schemas/User/properties/email'
6541 description: Set the email as verified
6544 description: The updated video quota of the user in bytes
6547 description: The updated daily video quota of the user in bytes
6551 description: The auth plugin to use to authenticate the user
6552 example: 'peertube-plugin-auth-saml2'
6554 $ref: '#/components/schemas/UserRole'
6556 $ref: '#/components/schemas/UserAdminFlags'
6558 # see shared/models/users/user-update-me.model.ts:
6561 $ref: '#/components/schemas/password'
6563 $ref: '#/components/schemas/password'
6565 description: new email used for login and service communications
6567 - $ref: '#/components/schemas/User/properties/email'
6570 description: new name of the user in its representations
6575 description: new NSFW display policy
6582 description: whether to enable P2P in the player or not
6585 description: new preference regarding playing videos automatically
6588 description: new preference regarding playing following videos automatically
6589 autoPlayNextVideoPlaylist:
6591 description: new preference regarding playing following playlist videos automatically
6592 videosHistoryEnabled:
6594 description: whether to keep track of watched history or not
6599 description: list of languages to filter videos down to
6602 noInstanceConfigWarningModal:
6604 noAccountSetupWarningModal:
6611 $ref: '#/components/schemas/id'
6618 description: Rating of the video
6625 $ref: '#/components/schemas/Video'
6632 description: Rating of the video
6639 description: immutable name of the user, used to find or mention its actor
6641 - $ref: '#/components/schemas/username'
6643 $ref: '#/components/schemas/password'
6647 description: email of the user, used for login or service communications
6650 description: editable name of the user, displayed in its representations
6655 description: channel base information used to create the first channel of the user
6658 $ref: '#/components/schemas/usernameChannel'
6660 $ref: '#/components/schemas/VideoChannel/properties/displayName'
6670 pattern: /^[a-z0-9]$/
6673 example: v1ikx5hnfop4mdpnci8nsqh93c45rldf
6676 pattern: /^[a-zA-Z0-9]$/
6679 example: AjWiOapPltI6EnsWQwlFarRtLh4u8tDt
6680 OAuthToken-password:
6682 - $ref: '#/components/schemas/OAuthClient'
6692 $ref: '#/components/schemas/User/properties/username'
6694 $ref: '#/components/schemas/password'
6701 OAuthToken-refresh_token:
6703 - $ref: '#/components/schemas/OAuthClient'
6714 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
6723 # GET/POST/PUT properties
6726 description: editable name of the channel, displayed in its representations
6727 example: Videos of Framasoft
6732 example: Videos made with <3 by Framasoft
6737 description: text shown by default on all videos of this channel, to tell the audience how to support it
6738 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6741 # GET-only properties
6745 - $ref: '#/components/schemas/id'
6761 $ref: '#/components/schemas/UUIDv4'
6764 - $ref: '#/components/schemas/VideoChannel'
6767 description: username of the channel to create
6769 - $ref: '#/components/schemas/usernameChannel'
6775 - $ref: '#/components/schemas/VideoChannel'
6777 bulkVideosSupportUpdate:
6779 description: Update the support field for all videos of this channel
6789 - $ref: '#/components/schemas/VideoChannel'
6790 - $ref: '#/components/schemas/Actor'
6795 name: 'media:peerLink'
6804 - application/x-bittorrent
6810 name: 'media:content'
6841 VideoCommentsForXML:
6876 description: video watch page URL
6879 description: video canonical URL
6883 description: video publication date
6886 description: video description
6889 description: video description
6892 description: publisher user name
6895 description: video category (MRSS)
6898 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
6913 description: video embed path, relative to the canonical URL domain (MRSS)
6922 description: video watch path, relative to the canonical URL domain (MRSS)
6943 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
6944 'media:description':
6951 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
6954 description: main streamable file for the video
6964 - application/x-bittorrent
6973 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)
6976 - $ref: '#/components/schemas/MRSSPeerLink'
6977 - $ref: '#/components/schemas/MRSSGroupContent'
6978 NotificationSettingValue:
6995 $ref: '#/components/schemas/id'
6999 Notification type, following the `UserNotificationType` enum:
7001 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
7003 - `2` NEW_COMMENT_ON_MY_VIDEO
7005 - `3` NEW_ABUSE_FOR_MODERATORS
7007 - `4` BLACKLIST_ON_MY_VIDEO
7009 - `5` UNBLACKLIST_ON_MY_VIDEO
7011 - `6` MY_VIDEO_PUBLISHED
7013 - `7` MY_VIDEO_IMPORT_SUCCESS
7015 - `8` MY_VIDEO_IMPORT_ERROR
7017 - `9` NEW_USER_REGISTRATION
7021 - `11` COMMENT_MENTION
7023 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
7025 - `13` NEW_INSTANCE_FOLLOWER
7027 - `14` AUTO_INSTANCE_FOLLOWING
7033 - $ref: '#/components/schemas/VideoInfo'
7037 $ref: '#/components/schemas/ActorInfo'
7043 $ref: '#/components/schemas/id'
7046 $ref: '#/components/schemas/VideoInfo'
7051 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
7061 $ref: '#/components/schemas/id'
7065 $ref: '#/components/schemas/VideoInfo'
7067 $ref: '#/components/schemas/ActorInfo'
7073 $ref: '#/components/schemas/id'
7076 - $ref: '#/components/schemas/VideoInfo'
7082 $ref: '#/components/schemas/id'
7085 - $ref: '#/components/schemas/VideoInfo'
7089 - $ref: '#/components/schemas/ActorInfo'
7095 $ref: '#/components/schemas/id'
7097 $ref: '#/components/schemas/ActorInfo'
7125 NotificationListResponse:
7134 $ref: '#/components/schemas/Notification'
7139 example: peertube-plugin-auth-ldap
7167 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
7170 additionalProperties: true
7186 $ref: '#/components/schemas/Plugin'
7193 description: User can stream multiple times in a permanent live
7202 description: RTMP stream key to use to stream into this live video
7206 description: User can stream multiple times in a permanent live
7213 'https://search.example.org/api/v1/search/videos':
7215 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
7218 description: successful operation
7222 $ref: '#/components/schemas/VideoListResponse'