6 name: PeerTube Community
7 url: https://joinpeertube.org
10 url: https://github.com/Chocobozzz/PeerTube/blob/master/LICENSE
12 url: https://joinpeertube.org/img/brand.png
13 altText: PeerTube Project Homepage
15 The PeerTube API is built on HTTP(S) and is RESTful. You can use your favorite
16 HTTP/REST library for your programming language to use PeerTube. The spec API is fully compatible with
17 [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO)
18 which generates a client SDK in the language of your choice - we generate some client SDKs automatically:
20 - [Python](https://framagit.org/framasoft/peertube/clients/python)
21 - [Go](https://framagit.org/framasoft/peertube/clients/go)
22 - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin)
24 See the [REST API quick start](https://docs.joinpeertube.org/api-rest-getting-started) for a few
25 examples of using with the PeerTube API.
29 When you sign up for an account on a PeerTube instance, you are given the possibility
30 to generate sessions on it, and authenticate there using an access token. Only __one
31 access token can currently be used at a time__.
35 Accounts are given permissions based on their role. There are three roles on
36 PeerTube: Administrator, Moderator, and User. See the [roles guide](https://docs.joinpeertube.org/admin-managing-users?id=roles) for a detail of their permissions.
40 The API uses standard HTTP status codes to indicate the success or failure
44 HTTP 1.1 404 Not Found
45 Content-Type: application/json
49 "error": "Account not found"
53 We provide error codes for [a growing number of cases](https://github.com/Chocobozzz/PeerTube/blob/develop/shared/models/server/server-error-code.enum.ts),
54 but it is still optional.
58 Each parameter is evaluated on its own against a set of rules before the route validator
59 proceeds with potential testing involving parameter combinations. Errors coming from Validation
60 errors appear earlier and benefit from a more detailed error type:
63 HTTP 1.1 400 Bad Request
64 Content-Type: application/json
69 "value": "a117eb-c6a9-4756-bb09-2a956239f",
70 "msg": "Should have a valid id",
78 Where `id` is the name of the field concerned by the error, within the route definition.
79 `errors.<field>.location` can be either 'params', 'body', 'header', 'query' or 'cookies', and
80 `errors.<field>.value` reports the value that didn't pass validation whose `errors.<field>.msg`
85 We are rate-limiting all endpoints of PeerTube's API. Custom values can be set by administrators:
87 | Endpoint (prefix: `/api/v1`) | Calls | Time frame |
88 |------------------------------|---------------|--------------|
89 | `/*` | 50 | 10 seconds |
90 | `POST /users/token` | 15 | 5 minutes |
91 | `POST /users/register` | 2<sup>*</sup> | 5 minutes |
92 | `POST /users/ask-send-verify-email` | 3 | 5 minutes |
94 Depending on the endpoint, <sup>*</sup>failed requests are not taken into account. A service
95 limit is announced by a `429 Too Many Requests` status code.
97 You can get details about the current state of your rate limit by reading the
100 | Header | Description |
101 |-------------------------|------------------------------------------------------------|
102 | `X-RateLimit-Limit` | Number of max requests allowed in the current time period |
103 | `X-RateLimit-Remaining` | Number of remaining requests in the current time period |
104 | `X-RateLimit-Reset` | Timestamp of end of current time period as UNIX timestamp |
105 | `Retry-After` | Seconds to delay after the first `429` is received |
109 This API features [Cross-Origin Resource Sharing (CORS)](https://fetch.spec.whatwg.org/),
110 allowing cross-domain communication from the browser for some routes:
113 |------------------------- ---|
117 | `/live/segments-sha256/*` |
118 | `/.well-known/webfinger` |
120 In addition, all routes serving ActivityPub are CORS-enabled for all origins.
122 url: https://docs.joinpeertube.org/api-rest-reference.html
126 As a visitor, you can use this API to open an account (if registrations are open on
127 that PeerTube instance). As an admin, you should use the dedicated [User creation
128 API](#operation/createUser) instead.
130 x-displayName: Login/Logout
132 Sessions deal with access tokens over time. Only __one session token can currently be used at a time__.
135 Accounts encompass remote accounts discovered across the federation,
136 and correspond to the main Actor, along with video channels a user can create, which
139 When a comment is posted, it is done with your Account's Actor.
142 Using some features of PeerTube require authentication, for which User
143 provide different levels of permission as well as associated user
144 information. Each user has a corresponding local Account for federation.
147 Operations related to your own User, when logged-in.
148 - name: My Subscriptions
150 Operations related to your subscriptions to video channels, their
151 new videos, and how to keep up to date with their latest publications!
154 Operations related to your watch history.
155 - name: My Notifications
157 Notifications following new videos, follows or reports. They allow you
158 to keep track of the interactions and overall important information that
159 concerns you. You MAY set per-notification type delivery preference, to
160 receive the info either by mail, by in-browser notification or both.
163 Each server exposes public information regarding supported videos and
167 Jobs are long-running tasks enqueued and processed by the instance
168 itself. No additional worker registration is currently available.
169 - name: Instance Follows
171 Managing servers which the instance interacts with is crucial to the
172 concept of federation in PeerTube and external video indexation. The PeerTube
173 server then deals with inter-server ActivityPub operations and propagates
174 information across its social graph by posting activities to actors' inbox
177 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-follows
178 - name: Instance Redundancy
180 Redundancy is part of the inter-server solidarity that PeerTube fosters.
181 Manage the list of instances you wish to help by seeding their videos according
182 to the policy of video selection of your choice. Note that you have a similar functionality
183 to mirror individual videos, see [video mirroring](#tag/Video-Mirroring).
185 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-redundancy
188 Managing plugins installed from a local path or from NPM, or search for new ones.
190 url: https://docs.joinpeertube.org/api-plugins
193 Abuses deal with reports of local or remote videos/comments/accounts alike.
196 Operations dealing with listing, uploading, fetching or modifying videos.
199 Operations dealing with adding video or audio. PeerTube supports two upload modes, and three import modes.
203 - [_legacy_](#operation/uploadLegacy), where the video file is sent in a single request
204 - [_resumable_](#operation/uploadResumableInit), where the video file is sent in chunks
206 You can upload videos more reliably by using the resumable variant. Its protocol lets
207 you resume an upload operation after a network interruption or other transmission failure,
208 saving time and bandwidth in the event of network failures.
210 Favor using resumable uploads in any of the following cases:
211 - You are transferring large files
212 - The likelihood of a network interruption is high
213 - Uploads are originating from a device with a low-bandwidth or unstable Internet connection,
214 such as a mobile device
218 - _URL_-based: where the URL points to any service supported by [youtube-dl](https://ytdl-org.github.io/youtube-dl/)
219 - _magnet_-based: where the URI resolves to a BitTorrent ressource containing a single supported video file
220 - _torrent_-based: where the metainfo file resolves to a BitTorrent ressource containing a single supported video file
222 The import function is practical when the desired video/audio is available online. It makes PeerTube
223 download it for you, saving you as much bandwidth and avoiding any instability or limitation your network might have.
224 - name: Video Captions
225 description: Operations dealing with listing, adding and removing closed captions of a video.
226 - name: Video Channels
227 description: Operations dealing with the creation, modification and listing of videos within a channel.
228 - name: Video Comments
230 Operations dealing with comments to a video. Comments are organized in threads: adding a
231 comment in response to the video starts a thread, adding a reply to a comment adds it to
232 its root comment thread.
234 description: Operations dealing with blocking videos (removing them from view and preventing interactions).
236 description: Like/dislike a video.
237 - name: Video Playlists
238 description: Operations dealing with playlists of videos. Playlists are bound to users and/or channels.
240 description: Server syndication feeds
243 The search helps to find _videos_ or _channels_ from within the instance and beyond.
244 Videos from other instances federated by the instance (that is, instances
245 followed by the instance) can be found via keywords and other criteria of
248 Administrators can also enable the use of a remote search system, indexing
249 videos and channels not could be not federated by the instance.
250 - name: Video Mirroring
252 PeerTube instances can mirror videos from one another, and help distribute some videos.
254 For importing videos as your own, refer to [video imports](#operation/importVideo).
277 - Video Ownership Change
290 - name: Instance Configuration
294 - Instance Redundancy
304 summary: Get an account
306 - $ref: '#/components/parameters/name'
309 description: successful operation
313 $ref: '#/components/schemas/Account'
315 description: account not found
316 '/accounts/{name}/videos':
321 summary: 'List videos of an account'
323 - $ref: '#/components/parameters/name'
324 - $ref: '#/components/parameters/categoryOneOf'
325 - $ref: '#/components/parameters/isLive'
326 - $ref: '#/components/parameters/tagsOneOf'
327 - $ref: '#/components/parameters/tagsAllOf'
328 - $ref: '#/components/parameters/licenceOneOf'
329 - $ref: '#/components/parameters/languageOneOf'
330 - $ref: '#/components/parameters/nsfw'
331 - $ref: '#/components/parameters/filter'
332 - $ref: '#/components/parameters/skipCount'
333 - $ref: '#/components/parameters/start'
334 - $ref: '#/components/parameters/count'
335 - $ref: '#/components/parameters/videosSort'
338 description: successful operation
342 $ref: '#/components/schemas/VideoListResponse'
346 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
347 .then(function(response) {
348 return response.json()
349 }).then(function(data) {
355 curl -s https://peertube2.cpy.re/api/v1/accounts/{name}/videos | jq
361 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
363 http = Net::HTTP.new(uri.host, uri.port)
366 response = http.get(uri.request_uri)
368 puts JSON.parse(response.read_body)
373 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
381 summary: List accounts
383 - $ref: '#/components/parameters/start'
384 - $ref: '#/components/parameters/count'
385 - $ref: '#/components/parameters/sort'
388 description: successful operation
394 $ref: '#/components/schemas/Account'
399 summary: Get instance public configuration
402 description: successful operation
406 $ref: '#/components/schemas/ServerConfig'
409 externalValue: https://peertube2.cpy.re/api/v1/config
412 summary: Get instance "About" information
417 description: successful operation
421 $ref: '#/components/schemas/ServerConfigAbout'
424 externalValue: https://peertube2.cpy.re/api/v1/config/about
427 summary: Get instance runtime configuration
435 description: successful operation
439 $ref: '#/components/schemas/ServerConfigCustom'
441 summary: Set instance runtime configuration
449 description: successful operation
451 x-summary: field inconsistencies
454 - the emailer is disabled and the instance is open to registrations
455 - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
457 summary: Delete instance runtime configuration
465 description: successful operation
468 summary: List instance jobs
478 description: The state of the job ('' for for no filter)
488 - $ref: '#/components/parameters/jobType'
489 - $ref: '#/components/parameters/start'
490 - $ref: '#/components/parameters/count'
491 - $ref: '#/components/parameters/sort'
494 description: successful operation
507 $ref: '#/components/schemas/Job'
508 '/server/following/{host}':
515 summary: Unfollow a server
520 description: 'The host to unfollow '
526 description: successful operation
531 summary: List instance followers
533 - $ref: '#/components/parameters/start'
534 - $ref: '#/components/parameters/count'
535 - $ref: '#/components/parameters/sort'
538 description: successful operation
544 $ref: '#/components/schemas/Follow'
549 summary: List instances followed by the server
568 - $ref: '#/components/parameters/start'
569 - $ref: '#/components/parameters/count'
570 - $ref: '#/components/parameters/sort'
573 description: successful operation
579 $ref: '#/components/schemas/Follow'
586 summary: Follow a server
589 description: successful operation
591 description: cannot follow a non-HTTPS server
606 summary: Create a user
607 operationId: createUser
615 description: user created
619 $ref: '#/components/schemas/AddUserResponse'
623 operationId: getUserId
625 id: '$response.body#/user/id'
628 operationId: putUserId
630 id: '$response.body#/user/id'
633 operationId: delUserId
635 id: '$response.body#/user/id'
637 description: insufficient authority to create an admin or moderator
642 $ref: '#/components/schemas/AddUser'
644 If the smtp server is configured, you can leave the password empty and an email will be sent
645 asking the user to set it first.
655 - $ref: '#/components/parameters/usersSearch'
656 - $ref: '#/components/parameters/usersBlocked'
657 - $ref: '#/components/parameters/start'
658 - $ref: '#/components/parameters/count'
659 - $ref: '#/components/parameters/usersSort'
662 description: successful operation
668 $ref: '#/components/schemas/User'
671 - $ref: '#/components/parameters/id'
673 summary: Delete a user
679 operationId: delUserId
682 description: successful operation
689 operationId: getUserId
693 description: include statistics about the user (only available as a moderator/admin)
698 x-summary: successful operation
700 As an admin/moderator, you can request a response augmented with statistics about the user's
701 moderation relations and videos usage, by using the `withStats` parameter.
706 - $ref: '#/components/schemas/User'
707 - $ref: '#/components/schemas/UserWithStats'
709 summary: Update a user
714 operationId: putUserId
717 description: successful operation
722 $ref: '#/components/schemas/UpdateUser'
725 /oauth-clients/local:
727 summary: Login prerequisite
728 description: You need to retrieve a client id and secret before [logging in](#operation/getOauthToken).
729 operationId: getOAuthClient
734 description: successful operation
738 $ref: '#/components/schemas/OAuthClient'
740 UseOAuthClientToLogin:
741 operationId: getOAuthToken
743 client_id: '$response.body#/client_id'
744 client_secret: '$response.body#/client_secret'
748 operationId: getOAuthToken
749 description: With your [client id and secret](#operation/getOAuthClient), you can retrieve an access and refresh tokens.
754 application/x-www-form-urlencoded:
757 - $ref: '#/components/schemas/OAuthToken-password'
758 - $ref: '#/components/schemas/OAuthToken-refresh_token'
760 propertyName: grant_type
762 password: '#/components/schemas/OAuthToken-password'
763 refresh_token: '#/components/schemas/OAuthToken-refresh_token'
766 description: successful operation
777 example: 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0
778 description: valid for 1 day
781 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
782 description: valid for 2 weeks
787 refresh_token_expires_in:
794 description: Revokes your access token and its associated refresh token, destroying your current session.
795 operationId: revokeOAuthToken
802 description: successful operation
806 summary: Register a user
812 description: successful operation
817 $ref: '#/components/schemas/RegisterUser'
819 /users/{id}/verify-email:
821 summary: Verify a user
823 Following a user registration, the new user will receive an email asking to click a link
829 - $ref: '#/components/parameters/id'
845 description: successful operation
847 description: invalid verification string
849 description: user not found
850 /users/ask-send-verify-email:
852 summary: Resend user verification link
858 description: successful operation
862 summary: Get my user information
870 description: successful operation
876 $ref: '#/components/schemas/User'
878 summary: Update my user information
886 description: successful operation
891 $ref: '#/components/schemas/UpdateMe'
893 /users/me/videos/imports:
895 summary: Get video imports of my user
903 - $ref: '#/components/parameters/start'
904 - $ref: '#/components/parameters/count'
905 - $ref: '#/components/parameters/sort'
908 description: successful operation
912 $ref: '#/components/schemas/VideoImportsList'
913 /users/me/video-quota-used:
915 summary: Get my user used quota
923 description: successful operation
931 description: The user video quota used so far in bytes
935 description: The user video quota used today in bytes
937 '/users/me/videos/{videoId}/rating':
939 summary: Get rate of my user for a video
949 description: The video id
951 $ref: '#/components/schemas/Video/properties/id'
954 description: successful operation
958 $ref: '#/components/schemas/GetMeVideoRating'
961 summary: Get videos of my user
969 - $ref: '#/components/parameters/start'
970 - $ref: '#/components/parameters/count'
971 - $ref: '#/components/parameters/sort'
974 description: successful operation
978 $ref: '#/components/schemas/VideoListResponse'
979 /users/me/subscriptions:
981 summary: Get my user subscriptions
988 - $ref: '#/components/parameters/start'
989 - $ref: '#/components/parameters/count'
990 - $ref: '#/components/parameters/sort'
993 description: successful operation
997 $ref: '#/components/schemas/VideoChannelList'
1001 summary: Add subscription to my user
1014 description: uri of the video channels to subscribe to
1020 uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr
1023 description: successful operation
1024 /users/me/subscriptions/exist:
1026 summary: Get if subscriptions exist for my user
1033 - $ref: '#/components/parameters/subscriptionsUris'
1036 description: successful operation
1041 /users/me/subscriptions/videos:
1043 summary: List videos of subscriptions of my user
1051 - $ref: '#/components/parameters/categoryOneOf'
1052 - $ref: '#/components/parameters/isLive'
1053 - $ref: '#/components/parameters/tagsOneOf'
1054 - $ref: '#/components/parameters/tagsAllOf'
1055 - $ref: '#/components/parameters/licenceOneOf'
1056 - $ref: '#/components/parameters/languageOneOf'
1057 - $ref: '#/components/parameters/nsfw'
1058 - $ref: '#/components/parameters/filter'
1059 - $ref: '#/components/parameters/skipCount'
1060 - $ref: '#/components/parameters/start'
1061 - $ref: '#/components/parameters/count'
1062 - $ref: '#/components/parameters/videosSort'
1065 description: successful operation
1069 $ref: '#/components/schemas/VideoListResponse'
1070 '/users/me/subscriptions/{subscriptionHandle}':
1072 summary: Get subscription of my user
1079 - $ref: '#/components/parameters/subscriptionHandle'
1082 description: successful operation
1086 $ref: '#/components/schemas/VideoChannel'
1088 summary: Delete subscription of my user
1095 - $ref: '#/components/parameters/subscriptionHandle'
1098 description: successful operation
1099 /users/me/notifications:
1101 summary: List my notifications
1109 description: only list unread notifications
1112 - $ref: '#/components/parameters/start'
1113 - $ref: '#/components/parameters/count'
1114 - $ref: '#/components/parameters/sort'
1117 description: successful operation
1121 $ref: '#/components/schemas/NotificationListResponse'
1122 /users/me/notifications/read:
1124 summary: Mark notifications as read by their id
1137 description: ids of the notifications to mark as read
1144 description: successful operation
1145 /users/me/notifications/read-all:
1147 summary: Mark all my notification as read
1154 description: successful operation
1155 /users/me/notification-settings:
1157 summary: Update my notification settings
1168 newVideoFromSubscription:
1169 $ref: '#/components/schemas/NotificationSettingValue'
1170 newCommentOnMyVideo:
1171 $ref: '#/components/schemas/NotificationSettingValue'
1173 $ref: '#/components/schemas/NotificationSettingValue'
1174 videoAutoBlacklistAsModerator:
1175 $ref: '#/components/schemas/NotificationSettingValue'
1177 $ref: '#/components/schemas/NotificationSettingValue'
1179 $ref: '#/components/schemas/NotificationSettingValue'
1180 myVideoImportFinished:
1181 $ref: '#/components/schemas/NotificationSettingValue'
1183 $ref: '#/components/schemas/NotificationSettingValue'
1184 newUserRegistration:
1185 $ref: '#/components/schemas/NotificationSettingValue'
1187 $ref: '#/components/schemas/NotificationSettingValue'
1188 newInstanceFollower:
1189 $ref: '#/components/schemas/NotificationSettingValue'
1190 autoInstanceFollowing:
1191 $ref: '#/components/schemas/NotificationSettingValue'
1194 description: successful operation
1195 /users/me/history/videos:
1197 summary: List watched videos history
1203 - $ref: '#/components/parameters/start'
1204 - $ref: '#/components/parameters/count'
1205 - $ref: '#/components/parameters/search'
1208 description: successful operation
1212 $ref: '#/components/schemas/VideoListResponse'
1213 /users/me/history/videos/remove:
1215 summary: Clear video history
1222 multipart/form-data:
1227 description: history before this date will be deleted
1232 description: successful operation
1233 /users/me/avatar/pick:
1235 summary: Update my user avatar
1242 description: successful operation
1249 $ref: '#/components/schemas/ActorImage'
1251 description: image file too large
1253 X-File-Maximum-Size:
1257 description: Maximum file size for the avatar
1260 multipart/form-data:
1265 description: The file to upload
1270 contentType: image/png, image/jpeg
1273 summary: Delete my avatar
1280 description: successful operation
1284 summary: List video ownership changes
1286 - Video Ownership Change
1291 description: successful operation
1292 '/videos/ownership/{id}/accept':
1294 summary: Accept ownership change request
1296 - Video Ownership Change
1300 - $ref: '#/components/parameters/idOrUUID'
1303 description: successful operation
1305 description: cannot terminate an ownership change of another user
1307 description: video owneship change not found
1308 '/videos/ownership/{id}/refuse':
1310 summary: Refuse ownership change request
1312 - Video Ownership Change
1316 - $ref: '#/components/parameters/idOrUUID'
1319 description: successful operation
1321 description: cannot terminate an ownership change of another user
1323 description: video owneship change not found
1324 '/videos/{id}/give-ownership':
1326 summary: Request ownership change
1328 - Video Ownership Change
1332 - $ref: '#/components/parameters/idOrUUID'
1336 application/x-www-form-urlencoded:
1346 description: successful operation
1348 description: changing video ownership to a remote account is not supported yet
1350 description: video not found
1353 summary: List videos
1357 - $ref: '#/components/parameters/categoryOneOf'
1358 - $ref: '#/components/parameters/isLive'
1359 - $ref: '#/components/parameters/tagsOneOf'
1360 - $ref: '#/components/parameters/tagsAllOf'
1361 - $ref: '#/components/parameters/licenceOneOf'
1362 - $ref: '#/components/parameters/languageOneOf'
1363 - $ref: '#/components/parameters/nsfw'
1364 - $ref: '#/components/parameters/filter'
1365 - $ref: '#/components/parameters/skipCount'
1366 - $ref: '#/components/parameters/start'
1367 - $ref: '#/components/parameters/count'
1368 - $ref: '#/components/parameters/videosSort'
1371 description: successful operation
1375 $ref: '#/components/schemas/VideoListResponse'
1378 summary: List available video categories
1379 operationId: getCategories
1384 description: successful operation
1393 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
1396 summary: List available video licences
1397 operationId: getLicences
1402 description: successful operation
1411 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
1414 summary: List available video languages
1415 operationId: getLanguages
1420 description: successful operation
1429 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
1432 summary: List available video privacy policies
1433 operationId: getPrivacyPolicies
1438 description: successful operation
1447 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
1450 summary: Update a video
1456 - $ref: '#/components/parameters/idOrUUID'
1459 description: successful operation
1462 multipart/form-data:
1467 description: Video thumbnail file
1471 description: Video preview file
1475 $ref: '#/components/schemas/VideoCategorySet'
1477 $ref: '#/components/schemas/VideoLicenceSet'
1479 $ref: '#/components/schemas/VideoLanguageSet'
1481 $ref: '#/components/schemas/VideoPrivacySet'
1483 description: Video description
1486 description: Whether or not we wait transcoding before publish the video
1489 description: A text tell the audience how to support the video creator
1490 example: Please support our work on https://soutenir.framasoft.org/en/ <3
1493 description: Whether or not this video contains sensitive content
1496 description: Video name
1501 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1510 description: Enable or disable comments for this video
1512 originallyPublishedAt:
1513 description: Date when the content was originally published
1517 $ref: '#/components/schemas/VideoScheduledUpdate'
1520 contentType: image/jpeg
1522 contentType: image/jpeg
1524 summary: Get a video
1528 - $ref: '#/components/parameters/idOrUUID'
1531 description: successful operation
1535 $ref: '#/components/schemas/VideoDetails'
1537 summary: Delete a video
1543 - $ref: '#/components/parameters/idOrUUID'
1546 description: successful operation
1547 '/videos/{id}/description':
1549 summary: Get complete video description
1553 - $ref: '#/components/parameters/idOrUUID'
1556 description: successful operation
1565 **[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)**
1566 '/videos/{id}/views':
1568 summary: Add a view to a video
1572 - $ref: '#/components/parameters/idOrUUID'
1575 description: successful operation
1576 '/videos/{id}/watching':
1578 summary: Set watching progress of a video
1584 - $ref: '#/components/parameters/idOrUUID'
1589 $ref: '#/components/schemas/UserWatchingVideo'
1593 description: successful operation
1596 summary: Upload a video
1597 description: Uses a single request to upload a video.
1598 operationId: uploadLegacy
1606 description: successful operation
1610 $ref: '#/components/schemas/VideoUploadResponse'
1612 description: invalid file field, schedule date or parameter
1614 description: video didn't pass upload filter
1616 description: upload has timed out
1618 description: video file too large, due to quota or max body size limit set by the reverse-proxy
1620 X-File-Maximum-Size:
1624 description: Maximum file size for the video
1626 description: video type unsupported
1628 description: video unreadable
1631 multipart/form-data:
1633 $ref: '#/components/schemas/VideoUploadRequestLegacy'
1636 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1638 contentType: image/jpeg
1640 contentType: image/jpeg
1645 USERNAME="<your_username>"
1646 PASSWORD="<your_password>"
1647 FILE_PATH="<your_file_path>"
1648 CHANNEL_ID="<your_channel_id>"
1651 API_PATH="https://peertube2.cpy.re/api/v1"
1653 client_id=$(curl -s "$API_PATH/oauth-clients/local" | jq -r ".client_id")
1654 client_secret=$(curl -s "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
1655 token=$(curl -s "$API_PATH/users/token" \
1656 --data client_id="$client_id" \
1657 --data client_secret="$client_secret" \
1658 --data grant_type=password \
1659 --data response_type=code \
1660 --data username="$USERNAME" \
1661 --data password="$PASSWORD" \
1662 | jq -r ".access_token")
1664 curl -s "$API_PATH/videos/upload" \
1665 -H "Authorization: Bearer $token" \
1667 --form videofile=@"$FILE_PATH" \
1668 --form channelId=$CHANNEL_ID \
1670 /videos/upload-resumable:
1672 summary: Initialize the resumable upload of a video
1673 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video
1674 operationId: uploadResumableInit
1681 - name: X-Upload-Content-Length
1687 description: Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading.
1688 - name: X-Upload-Content-Type
1695 description: MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.
1700 $ref: '#/components/schemas/VideoUploadRequestResumable'
1703 description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead
1705 description: created
1711 example: /api/v1/videos/upload-resumable?upload_id=471e97554f21dec3b8bb5d4602939c51
1717 description: invalid file field, schedule date or parameter
1719 description: video file too large, due to quota, absolute max file size or concurrent partial upload limit
1721 description: video type unsupported
1723 summary: Send chunk for the resumable upload of a video
1724 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
1725 operationId: uploadResumable
1736 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
1737 not valid anymore and you need to initialize a new upload.
1740 - name: Content-Range
1744 example: bytes 0-262143/2469036
1747 Specifies the bytes in the file that the request is uploading.
1749 For example, a value of `bytes 0-262143/1000000` shows that the request is sending the first
1750 262144 bytes (256 x 1024) in a 2,469,036 byte file.
1751 - name: Content-Length
1758 Size of the chunk that the request is sending.
1760 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)
1761 doesn't mandate for chunks to have the same size throughout the upload sequence.
1763 Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from
1764 1048576 bytes (~1MB) and increases or reduces size depending on connection health.
1767 application/octet-stream:
1773 description: last chunk received
1781 $ref: '#/components/schemas/VideoUploadResponse'
1783 description: resume incomplete
1788 example: bytes=0-262143
1794 description: video didn't pass upload filter
1796 description: video file too large, due to quota or max body size limit set by the reverse-proxy
1798 description: video unreadable
1800 summary: Cancel the resumable upload of a video, deleting any data uploaded so far
1801 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video
1802 operationId: uploadResumableCancel
1813 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
1814 not valid anymore and the upload session has already been deleted with its data ;-)
1817 - name: Content-Length
1825 description: upload cancelled
1833 summary: Import a video
1834 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
1835 operationId: importVideo
1843 multipart/form-data:
1845 $ref: '#/components/schemas/VideoCreateImport'
1848 contentType: application/x-bittorrent
1850 contentType: image/jpeg
1852 contentType: image/jpeg
1855 description: successful operation
1859 $ref: '#/components/schemas/VideoUploadResponse'
1861 description: '`magnetUri` or `targetUrl` or a torrent file missing'
1863 description: video didn't pass pre-import filter
1865 description: HTTP or Torrent/magnetURI import not enabled
1869 summary: Create a live
1870 operationId: createLive
1878 description: successful operation
1882 $ref: '#/components/schemas/VideoUploadResponse'
1884 description: live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
1887 multipart/form-data:
1892 description: Channel id that will contain this live video
1897 description: User can stream multiple times in a permanent live
1900 description: Live video/replay thumbnail file
1904 description: Live video/replay preview file
1908 $ref: '#/components/schemas/VideoPrivacySet'
1910 $ref: '#/components/schemas/VideoCategorySet'
1912 $ref: '#/components/schemas/VideoLicenceSet'
1914 $ref: '#/components/schemas/VideoLanguageSet'
1916 description: Live video/replay description
1919 description: A text tell the audience how to support the creator
1920 example: Please support our work on https://soutenir.framasoft.org/en/ <3
1923 description: Whether or not this live video/replay contains sensitive content
1926 description: Live video/replay name
1931 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
1940 description: Enable or disable comments for this live video/replay
1943 description: Enable or disable downloading for the replay of this live
1950 contentType: image/jpeg
1952 contentType: image/jpeg
1956 summary: Get information about a live
1957 operationId: getLiveId
1964 - $ref: '#/components/parameters/idOrUUID'
1967 description: successful operation
1971 $ref: '#/components/schemas/LiveVideoResponse'
1973 summary: Update information about a live
1974 operationId: updateLiveId
1981 - $ref: '#/components/parameters/idOrUUID'
1986 $ref: '#/components/schemas/LiveVideoUpdate'
1989 description: successful operation
1991 description: bad parameters or trying to update a live that has already started
1993 description: trying to save replay of the live but saving replay is not enabled on the instance
1997 summary: List my abuses
1998 operationId: getMyAbuses
2007 description: only list the report with this id
2013 $ref: '#/components/schemas/AbuseStateSet'
2014 - $ref: '#/components/parameters/abusesSort'
2015 - $ref: '#/components/parameters/start'
2016 - $ref: '#/components/parameters/count'
2019 description: successful operation
2031 $ref: '#/components/schemas/Abuse'
2035 summary: List abuses
2036 operationId: getAbuses
2046 description: only list the report with this id
2049 - name: predefinedReason
2051 description: predefined reason the listed reports should contain
2053 $ref: '#/components/schemas/PredefinedAbuseReasons'
2056 description: plain search that will match with video titles, reporter names and more
2062 $ref: '#/components/schemas/AbuseStateSet'
2063 - name: searchReporter
2065 description: only list reports of a specific reporter
2068 - name: searchReportee
2069 description: only list reports of a specific reportee
2075 description: only list reports of a specific video
2078 - name: searchVideoChannel
2080 description: only list reports of a specific video channel
2085 description: only list blacklisted or deleted videos
2093 description: only list account, comment or video reports
2100 - $ref: '#/components/parameters/start'
2101 - $ref: '#/components/parameters/count'
2102 - $ref: '#/components/parameters/abusesSort'
2105 description: successful operation
2117 $ref: '#/components/schemas/Abuse'
2120 summary: Report an abuse
2133 description: Reason why the user reports this video
2138 $ref: '#/components/schemas/PredefinedAbuseReasons'
2143 description: Video id to report
2145 - $ref: '#/components/schemas/Video/properties/id'
2149 description: Timestamp in the video that marks the beginning of the report
2154 description: Timestamp in the video that marks the ending of the report
2160 description: Comment id to report
2162 - $ref: '#/components/schemas/VideoComment/properties/id'
2167 description: Account id to report
2173 description: successful operation
2175 description: incorrect request parameters
2176 '/abuses/{abuseId}':
2178 summary: Update an abuse
2186 - $ref: '#/components/parameters/abuseId'
2194 $ref: '#/components/schemas/AbuseStateSet'
2197 description: Update the report comment visible only to the moderation team
2202 description: successful operation
2204 description: abuse not found
2208 summary: Delete an abuse
2214 - $ref: '#/components/parameters/abuseId'
2217 description: successful operation
2219 description: block not found
2220 '/abuses/{abuseId}/messages':
2222 summary: List messages of an abuse
2228 - $ref: '#/components/parameters/abuseId'
2231 description: successful operation
2237 $ref: '#/components/schemas/AbuseMessage'
2240 summary: Add message to an abuse
2246 - $ref: '#/components/parameters/abuseId'
2255 description: Message to send
2263 description: successful operation
2265 description: incorrect request parameters
2266 '/abuses/{abuseId}/messages/{abuseMessageId}':
2268 summary: Delete an abuse message
2274 - $ref: '#/components/parameters/abuseId'
2275 - $ref: '#/components/parameters/abuseMessageId'
2278 description: successful operation
2280 '/videos/{id}/blacklist':
2282 summary: Block a video
2290 - $ref: '#/components/parameters/idOrUUID'
2293 description: successful operation
2295 summary: Unblock a video by its id
2303 - $ref: '#/components/parameters/idOrUUID'
2306 description: successful operation
2308 description: block not found
2313 summary: List video blocks
2322 list only blocks that match this type:
2326 - `2`: automatic block that needs review
2334 description: plain search that will match with video titles, and more
2337 - $ref: '#/components/parameters/start'
2338 - $ref: '#/components/parameters/count'
2339 - $ref: '#/components/parameters/blacklistsSort'
2342 description: successful operation
2354 $ref: '#/components/schemas/VideoBlacklist'
2355 /videos/{id}/captions:
2357 summary: List captions of a video
2361 - $ref: '#/components/parameters/idOrUUID'
2364 description: successful operation
2376 $ref: '#/components/schemas/VideoCaption'
2377 /videos/{id}/captions/{captionLanguage}:
2379 summary: Add or replace a video caption
2386 - $ref: '#/components/parameters/idOrUUID'
2387 - $ref: '#/components/parameters/captionLanguage'
2390 multipart/form-data:
2395 description: The file to upload.
2400 contentType: text/vtt, application/x-subrip, text/plain
2403 description: successful operation
2405 description: video or language not found
2407 summary: Delete a video caption
2414 - $ref: '#/components/parameters/idOrUUID'
2415 - $ref: '#/components/parameters/captionLanguage'
2418 description: successful operation
2420 description: video or language or caption for that language not found
2423 summary: List video channels
2424 operationId: getVideoChannels
2428 - $ref: '#/components/parameters/start'
2429 - $ref: '#/components/parameters/count'
2430 - $ref: '#/components/parameters/sort'
2433 description: successful operation
2437 $ref: '#/components/schemas/VideoChannelList'
2439 summary: Create a video channel
2440 operationId: createVideoChannel
2447 description: successful operation
2457 $ref: '#/components/schemas/VideoChannel/properties/id'
2462 $ref: '#/components/schemas/VideoChannelCreate'
2463 '/video-channels/{channelHandle}':
2465 summary: Get a video channel
2466 operationId: getVideoChannel
2470 - $ref: '#/components/parameters/channelHandle'
2473 description: successful operation
2477 $ref: '#/components/schemas/VideoChannel'
2479 summary: Update a video channel
2485 - $ref: '#/components/parameters/channelHandle'
2488 description: successful operation
2493 $ref: '#/components/schemas/VideoChannelUpdate'
2495 summary: Delete a video channel
2501 - $ref: '#/components/parameters/channelHandle'
2504 description: successful operation
2505 '/video-channels/{channelHandle}/videos':
2507 summary: List videos of a video channel
2512 - $ref: '#/components/parameters/channelHandle'
2513 - $ref: '#/components/parameters/categoryOneOf'
2514 - $ref: '#/components/parameters/isLive'
2515 - $ref: '#/components/parameters/tagsOneOf'
2516 - $ref: '#/components/parameters/tagsAllOf'
2517 - $ref: '#/components/parameters/licenceOneOf'
2518 - $ref: '#/components/parameters/languageOneOf'
2519 - $ref: '#/components/parameters/nsfw'
2520 - $ref: '#/components/parameters/filter'
2521 - $ref: '#/components/parameters/skipCount'
2522 - $ref: '#/components/parameters/start'
2523 - $ref: '#/components/parameters/count'
2524 - $ref: '#/components/parameters/videosSort'
2527 description: successful operation
2531 $ref: '#/components/schemas/VideoListResponse'
2532 '/video-channels/{channelHandle}/avatar/pick':
2534 summary: Update channel avatar
2540 - $ref: '#/components/parameters/channelHandle'
2543 description: successful operation
2550 $ref: '#/components/schemas/ActorImage'
2552 description: image file too large
2554 X-File-Maximum-Size:
2558 description: Maximum file size for the avatar
2561 multipart/form-data:
2566 description: The file to upload.
2571 contentType: image/png, image/jpeg
2572 '/video-channels/{channelHandle}/avatar':
2574 summary: Delete channel avatar
2580 - $ref: '#/components/parameters/channelHandle'
2583 description: successful operation
2586 '/video-channels/{channelHandle}/banner/pick':
2588 summary: Update channel banner
2594 - $ref: '#/components/parameters/channelHandle'
2597 description: successful operation
2604 $ref: '#/components/schemas/ActorImage'
2606 description: image file too large
2608 X-File-Maximum-Size:
2612 description: Maximum file size for the banner
2615 multipart/form-data:
2620 description: The file to upload.
2625 contentType: image/png, image/jpeg
2626 '/video-channels/{channelHandle}/banner':
2628 summary: Delete channel banner
2634 - $ref: '#/components/parameters/channelHandle'
2637 description: successful operation
2639 /video-playlists/privacies:
2641 summary: List available playlist privacy policies
2642 operationId: getPlaylistPrivacyPolicies
2647 description: successful operation
2656 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
2660 summary: List video playlists
2661 operationId: getPlaylists
2665 - $ref: '#/components/parameters/start'
2666 - $ref: '#/components/parameters/count'
2667 - $ref: '#/components/parameters/sort'
2670 description: successful operation
2682 $ref: '#/components/schemas/VideoPlaylist'
2684 summary: Create a video playlist
2685 description: If the video playlist is set as public, `videoChannelId` is mandatory.
2686 operationId: createPlaylist
2693 description: successful operation
2703 $ref: '#/components/schemas/VideoPlaylist/properties/id'
2705 $ref: '#/components/schemas/VideoPlaylist/properties/uuid'
2708 multipart/form-data:
2713 description: Video playlist display name
2718 description: Video playlist thumbnail file
2722 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2724 description: Video playlist description
2730 - $ref: '#/components/schemas/id'
2731 description: Video channel in which the playlist will be published
2736 contentType: image/jpeg
2738 /video-playlists/{playlistId}:
2740 summary: Get a video playlist
2744 - $ref: '#/components/parameters/playlistId'
2747 description: successful operation
2751 $ref: '#/components/schemas/VideoPlaylist'
2753 summary: Update a video playlist
2754 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
2761 description: successful operation
2763 - $ref: '#/components/parameters/playlistId'
2766 multipart/form-data:
2771 description: Video playlist display name
2776 description: Video playlist thumbnail file
2780 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2782 description: Video playlist description
2786 - $ref: '#/components/schemas/id'
2787 description: Video channel in which the playlist will be published
2790 contentType: image/jpeg
2792 summary: Delete a video playlist
2798 - $ref: '#/components/parameters/playlistId'
2801 description: successful operation
2803 /video-playlists/{playlistId}/videos:
2805 summary: 'List videos of a playlist'
2810 - $ref: '#/components/parameters/playlistId'
2813 description: successful operation
2817 $ref: '#/components/schemas/VideoListResponse'
2819 summary: Add a video in a playlist
2826 - $ref: '#/components/parameters/playlistId'
2829 description: successful operation
2835 videoPlaylistElement:
2849 - $ref: '#/components/schemas/Video/properties/uuid'
2850 - $ref: '#/components/schemas/Video/properties/id'
2851 description: Video to add in the playlist
2855 description: Start the video at this specific timestamp
2859 description: Stop the video at this specific timestamp
2863 /video-playlists/{playlistId}/videos/reorder:
2865 summary: 'Reorder a playlist'
2871 - $ref: '#/components/parameters/playlistId'
2874 description: successful operation
2883 description: 'Start position of the element to reorder'
2885 insertAfterPosition:
2887 description: 'New position for the block to reorder, to add the block before the first element'
2891 description: 'How many element from `startPosition` to reorder'
2895 - insertAfterPosition
2897 /video-playlists/{playlistId}/videos/{playlistElementId}:
2899 summary: Update a playlist element
2905 - $ref: '#/components/parameters/playlistId'
2906 - $ref: '#/components/parameters/playlistElementId'
2909 description: successful operation
2919 description: Start the video at this specific timestamp
2923 description: Stop the video at this specific timestamp
2925 summary: Delete an element from a playlist
2931 - $ref: '#/components/parameters/playlistId'
2932 - $ref: '#/components/parameters/playlistElementId'
2935 description: successful operation
2937 '/users/me/video-playlists/videos-exist':
2939 summary: Check video exists in my playlists
2948 description: The video ids to check
2952 $ref: '#/components/schemas/Video/properties/id'
2955 description: successful operation
2977 '/accounts/{name}/video-channels':
2979 summary: List video channels of an account
2984 - $ref: '#/components/parameters/name'
2987 description: include view statistics for the last 30 days (only if authentified as the account user)
2990 - $ref: '#/components/parameters/start'
2991 - $ref: '#/components/parameters/count'
2992 - $ref: '#/components/parameters/sort'
2995 description: successful operation
2999 $ref: '#/components/schemas/VideoChannelList'
3000 '/accounts/{name}/ratings':
3002 summary: List ratings of an account
3008 - $ref: '#/components/parameters/name'
3009 - $ref: '#/components/parameters/start'
3010 - $ref: '#/components/parameters/count'
3011 - $ref: '#/components/parameters/sort'
3015 description: Optionally filter which ratings to retrieve
3023 description: successful operation
3029 $ref: '#/components/schemas/VideoRating'
3030 '/videos/{id}/comment-threads':
3032 summary: List threads of a video
3036 - $ref: '#/components/parameters/idOrUUID'
3037 - $ref: '#/components/parameters/start'
3038 - $ref: '#/components/parameters/count'
3039 - $ref: '#/components/parameters/commentsSort'
3042 description: successful operation
3046 $ref: '#/components/schemas/CommentThreadResponse'
3048 summary: Create a thread
3054 - $ref: '#/components/parameters/idOrUUID'
3057 description: successful operation
3061 $ref: '#/components/schemas/CommentThreadPostResponse'
3063 description: video does not exist
3072 - $ref: '#/components/schemas/VideoComment/properties/text'
3078 '/videos/{id}/comment-threads/{threadId}':
3080 summary: Get a thread
3084 - $ref: '#/components/parameters/idOrUUID'
3085 - $ref: '#/components/parameters/threadId'
3088 description: successful operation
3092 $ref: '#/components/schemas/VideoCommentThreadTree'
3093 '/videos/{id}/comments/{commentId}':
3095 summary: Reply to a thread of a video
3101 - $ref: '#/components/parameters/idOrUUID'
3102 - $ref: '#/components/parameters/commentId'
3105 description: successful operation
3109 $ref: '#/components/schemas/CommentThreadPostResponse'
3111 description: thread or video does not exist
3120 - $ref: '#/components/schemas/VideoComment/properties/text'
3127 summary: Delete a comment or a reply
3133 - $ref: '#/components/parameters/idOrUUID'
3134 - $ref: '#/components/parameters/commentId'
3137 description: successful operation
3139 description: cannot remove comment of another user
3141 description: comment or video does not exist
3143 description: comment is already deleted
3144 '/videos/{id}/rate':
3146 summary: Like/dislike a video
3152 - $ref: '#/components/parameters/idOrUUID'
3168 description: successful operation
3170 description: video does not exist
3175 summary: Search videos
3180 allowEmptyValue: false
3182 String to search. If the user can make a remote URI search, and the string is an URI then the
3183 PeerTube instance will fetch the remote object and add it to its database. Then,
3184 you can use the REST API to fetch the complete video information and interact with it.
3187 - $ref: '#/components/parameters/categoryOneOf'
3188 - $ref: '#/components/parameters/isLive'
3189 - $ref: '#/components/parameters/tagsOneOf'
3190 - $ref: '#/components/parameters/tagsAllOf'
3191 - $ref: '#/components/parameters/licenceOneOf'
3192 - $ref: '#/components/parameters/languageOneOf'
3193 - $ref: '#/components/parameters/nsfw'
3194 - $ref: '#/components/parameters/filter'
3195 - $ref: '#/components/parameters/skipCount'
3196 - $ref: '#/components/parameters/start'
3197 - $ref: '#/components/parameters/count'
3198 - $ref: '#/components/parameters/searchTarget'
3199 - $ref: '#/components/parameters/videosSearchSort'
3202 description: Get videos that are published after this date
3208 description: Get videos that are published before this date
3212 - name: originallyPublishedStartDate
3214 description: Get videos that are originally published after this date
3218 - name: originallyPublishedEndDate
3220 description: Get videos that are originally published before this date
3226 description: Get videos that have this minimum duration
3231 description: Get videos that have this maximum duration
3235 'searchTarget === search-index':
3236 $ref: '#/components/callbacks/searchIndex'
3239 description: successful operation
3243 $ref: '#/components/schemas/VideoListResponse'
3245 description: search index unavailable
3246 /search/video-channels:
3250 summary: Search channels
3256 String to search. If the user can make a remote URI search, and the string is an URI then the
3257 PeerTube instance will fetch the remote object and add it to its database. Then,
3258 you can use the REST API to fetch the complete channel information and interact with it.
3261 - $ref: '#/components/parameters/start'
3262 - $ref: '#/components/parameters/count'
3263 - $ref: '#/components/parameters/searchTarget'
3264 - $ref: '#/components/parameters/sort'
3266 'searchTarget === search-index':
3267 $ref: '#/components/callbacks/searchIndex'
3270 description: successful operation
3274 $ref: '#/components/schemas/VideoChannelList'
3276 description: search index unavailable
3278 /server/blocklist/accounts:
3282 summary: List account blocks
3287 - $ref: '#/components/parameters/start'
3288 - $ref: '#/components/parameters/count'
3289 - $ref: '#/components/parameters/sort'
3292 description: successful operation
3296 summary: Block an account
3308 example: chocobozzz@example.org
3309 description: account to block, in the form `username@domain`
3314 description: successful operation
3316 description: self-blocking forbidden
3317 '/server/blocklist/accounts/{accountName}':
3321 summary: Unblock an account by its handle
3329 description: account to unblock, in the form `username@domain`
3334 description: successful operation
3336 description: account or account block does not exist
3338 /server/blocklist/servers:
3342 summary: List server blocks
3347 - $ref: '#/components/parameters/start'
3348 - $ref: '#/components/parameters/count'
3349 - $ref: '#/components/parameters/sort'
3352 description: successful operation
3356 summary: Block a server
3369 description: server domain to block
3374 description: successful operation
3376 description: self-blocking forbidden
3377 '/server/blocklist/servers/{host}':
3381 summary: Unblock a server by its domain
3389 description: server domain to unblock
3395 description: successful operation
3397 description: account block does not exist
3399 /server/redundancy/{host}:
3402 - Instance Redundancy
3403 summary: Update a server redundancy policy
3411 description: server domain to mirror
3423 description: allow mirroring of the host's local videos
3428 description: successful operation
3430 description: server is not already known
3431 /server/redundancy/videos:
3435 summary: List videos being mirrored
3443 description: direction of the mirror
3449 - $ref: '#/components/parameters/start'
3450 - $ref: '#/components/parameters/count'
3451 - $ref: '#/components/parameters/videoRedundanciesSort'
3454 description: successful operation
3460 $ref: '#/components/schemas/VideoRedundancy'
3464 summary: Mirror a video
3475 $ref: '#/components/schemas/Video/properties/id'
3480 description: successful operation
3482 description: cannot mirror a local video
3484 description: video does not exist
3486 description: video is already mirrored
3487 /server/redundancy/videos/{redundancyId}:
3491 summary: Delete a mirror done on a video
3496 - name: redundancyId
3499 description: id of an existing redundancy on a video
3504 description: successful operation
3506 description: video redundancy not found
3508 '/feeds/video-comments.{format}':
3512 summary: List comments on videos
3517 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3530 description: 'limit listing to a specific video'
3535 description: 'limit listing to a specific account'
3540 description: 'limit listing to a specific account'
3543 - name: videoChannelId
3545 description: 'limit listing to a specific video channel'
3548 - name: videoChannelName
3550 description: 'limit listing to a specific video channel'
3555 description: successful operation
3560 default: 'max-age=900' # 15 min cache
3564 $ref: '#/components/schemas/VideoCommentsForXML'
3567 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3568 application/rss+xml:
3570 $ref: '#/components/schemas/VideoCommentsForXML'
3573 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
3576 $ref: '#/components/schemas/VideoCommentsForXML'
3579 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3580 application/atom+xml:
3582 $ref: '#/components/schemas/VideoCommentsForXML'
3585 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
3591 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
3593 x-summary: field inconsistencies
3596 - videoId filter is mixed with a channel filter
3598 description: video, video channel or account not found
3600 description: accept header unsupported
3601 '/feeds/videos.{format}':
3605 summary: List videos
3610 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3623 description: 'limit listing to a specific account'
3628 description: 'limit listing to a specific account'
3631 - name: videoChannelId
3633 description: 'limit listing to a specific video channel'
3636 - name: videoChannelName
3638 description: 'limit listing to a specific video channel'
3641 - $ref: '#/components/parameters/sort'
3642 - $ref: '#/components/parameters/nsfw'
3643 - $ref: '#/components/parameters/filter'
3646 description: successful operation
3651 default: 'max-age=900' # 15 min cache
3655 $ref: '#/components/schemas/VideosForXML'
3658 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
3659 application/rss+xml:
3661 $ref: '#/components/schemas/VideosForXML'
3664 externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
3667 $ref: '#/components/schemas/VideosForXML'
3670 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
3671 application/atom+xml:
3673 $ref: '#/components/schemas/VideosForXML'
3676 externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
3682 externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
3684 description: video channel or account not found
3686 description: accept header unsupported
3687 '/feeds/subscriptions.{format}':
3692 summary: List videos of subscriptions tied to a token
3697 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3710 description: limit listing to a specific account
3716 description: private token allowing access
3720 - $ref: '#/components/parameters/sort'
3721 - $ref: '#/components/parameters/nsfw'
3722 - $ref: '#/components/parameters/filter'
3725 description: successful operation
3730 default: 'max-age=900' # 15 min cache
3734 $ref: '#/components/schemas/VideosForXML'
3735 application/rss+xml:
3737 $ref: '#/components/schemas/VideosForXML'
3740 $ref: '#/components/schemas/VideosForXML'
3741 application/atom+xml:
3743 $ref: '#/components/schemas/VideosForXML'
3748 description: accept header unsupported
3753 summary: List plugins
3766 - $ref: '#/components/parameters/start'
3767 - $ref: '#/components/parameters/count'
3768 - $ref: '#/components/parameters/sort'
3771 description: successful operation
3775 $ref: '#/components/schemas/PluginResponse'
3780 summary: List available plugins
3793 - name: currentPeerTubeEngine
3797 - $ref: '#/components/parameters/start'
3798 - $ref: '#/components/parameters/count'
3799 - $ref: '#/components/parameters/sort'
3802 description: successful operation
3806 $ref: '#/components/schemas/PluginResponse'
3808 description: plugin index unavailable
3813 summary: Install a plugin
3826 example: peertube-plugin-auth-ldap
3829 additionalProperties: false
3836 additionalProperties: false
3839 description: successful operation
3841 description: should have either `npmName` or `path` set
3846 summary: Update a plugin
3859 example: peertube-plugin-auth-ldap
3862 additionalProperties: false
3869 additionalProperties: false
3872 description: successful operation
3874 description: should have either `npmName` or `path` set
3876 description: existing plugin not found
3881 summary: Uninstall a plugin
3893 description: name of the plugin/theme in its package.json
3894 example: peertube-plugin-auth-ldap
3899 description: successful operation
3901 description: existing plugin not found
3906 summary: Get a plugin
3911 - $ref: '#/components/parameters/npmName'
3914 description: successful operation
3918 $ref: '#/components/schemas/Plugin'
3920 description: plugin not found
3921 /plugins/{npmName}/settings:
3925 summary: Set a plugin's settings
3930 - $ref: '#/components/parameters/npmName'
3939 additionalProperties: true
3942 description: successful operation
3944 description: plugin not found
3945 /plugins/{npmName}/public-settings:
3949 summary: Get a plugin's public settings
3951 - $ref: '#/components/parameters/npmName'
3954 description: successful operation
3959 additionalProperties: true
3961 description: plugin not found
3962 /plugins/{npmName}/registered-settings:
3966 summary: Get a plugin's registered settings
3971 - $ref: '#/components/parameters/npmName'
3974 description: successful operation
3979 additionalProperties: true
3981 description: plugin not found
3983 - url: 'https://peertube2.cpy.re/api/v1'
3984 description: Live Test Server (live data - latest nightly version)
3985 - url: 'https://peertube3.cpy.re/api/v1'
3986 description: Live Test Server (live data - latest RC version)
3987 - url: 'https://peertube.cpy.re/api/v1'
3988 description: Live Test Server (live data - stable version)
3995 description: Offset used to paginate results
4003 description: "Number of items to return"
4013 description: Sort column
4021 description: Plain text search, applied to various parts of the model depending on endpoint
4029 If the administrator enabled search index support, you can override the default search target.
4032 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
4033 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
4034 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
4035 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
4036 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
4037 * 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
4038 the data from the origin instance API
4048 description: Sort videos by criteria
4064 description: Sort videos by criteria
4079 description: Sort comments by criteria
4089 description: Sort blacklists by criteria
4105 description: Plain text search that will match with user usernames or emails
4112 description: Filter results down to (un)banned users
4119 description: Sort users by criteria
4130 description: Sort abuses by criteria
4137 videoRedundanciesSort:
4141 description: Sort abuses by criteria
4150 description: The username or handle of the account
4153 example: chocobozzz | chocobozzz@example.org
4158 description: The user id
4160 $ref: '#/components/schemas/id'
4165 description: The object id or uuid
4168 - $ref: '#/components/schemas/id'
4169 - $ref: '#/components/schemas/UUIDv4'
4174 description: Playlist id
4176 $ref: '#/components/schemas/VideoPlaylist/properties/id'
4178 name: playlistElementId
4181 description: Playlist element id
4183 $ref: '#/components/schemas/id'
4188 description: Abuse id
4190 $ref: '#/components/schemas/Abuse/properties/id'
4192 name: abuseMessageId
4195 description: Abuse message id
4197 $ref: '#/components/schemas/AbuseMessage/properties/id'
4199 name: captionLanguage
4202 description: The caption language
4204 $ref: '#/components/schemas/VideoLanguageSet'
4209 description: The video channel handle
4212 example: my_username | my_username@example.com
4214 name: subscriptionHandle
4217 description: The subscription handle
4220 example: my_username | my_username@example.com
4225 description: The thread id (root comment id)
4227 $ref: '#/components/schemas/VideoCommentThreadTree/properties/comment/properties/id'
4232 description: The comment id
4234 $ref: '#/components/schemas/VideoComment/properties/id'
4239 description: whether or not the video is a live
4246 description: category id of the video (see [/videos/categories](#operation/getCategories))
4249 - $ref: '#/components/schemas/VideoCategorySet'
4252 $ref: '#/components/schemas/VideoCategorySet'
4259 description: tag(s) of the video
4273 description: tag(s) of the video, where all should be present in the video
4286 description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language
4289 - $ref: '#/components/schemas/VideoLanguageSet'
4292 $ref: '#/components/schemas/VideoLanguageSet'
4299 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4302 - $ref: '#/components/schemas/VideoLicenceSet'
4305 $ref: '#/components/schemas/VideoLicenceSet'
4312 description: if you don't need the `total` in the response
4323 description: whether to include nsfw videos, if any
4334 Special filters which might require special rights:
4335 * `local` - only videos local to the instance
4336 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
4337 * `all` - all videos, showing private and unlisted videos (requires Admin privileges)
4347 description: list of uris to check if each is part of the user subscriptions
4357 description: name of the plugin/theme on npmjs.com or in its package.json
4360 example: peertube-plugin-auth-ldap
4365 description: job type
4369 - activitypub-follow
4370 - activitypub-http-broadcast
4371 - activitypub-http-fetcher
4372 - activitypub-http-unicast
4378 - activitypub-refresher
4384 Authenticating via OAuth requires the following steps:
4385 - Have an activated account
4386 - [Generate] an access token for that account at `/api/v1/users/token`.
4387 - Make requests with the *Authorization: Bearer <token\>* header
4388 - Profit, depending on the role assigned to the account
4390 Note that the __access token is valid for 1 day__ and is given
4391 along with a __refresh token valid for 2 weeks__.
4393 [Generate]: https://docs.joinpeertube.org/api-rest-getting-started
4397 tokenUrl: /api/v1/users/token
4400 moderator: Moderator scope
4403 # Resuable core properties
4411 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4412 pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
4417 description: immutable name of the user, used to find or mention its actor
4419 pattern: '/^[a-z0-9._]+$/'
4424 description: immutable name of the channel, used to interact with its actor
4425 example: framasoft_videos
4426 pattern: '/^[a-zA-Z0-9\\-_.:]+$/'
4437 description: category id of the video (see [/videos/categories](#operation/getCategories))
4439 VideoConstantNumber-Category:
4442 $ref: '#/components/schemas/VideoCategorySet'
4445 example: Science & Technology
4449 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4451 VideoConstantNumber-Licence:
4454 $ref: '#/components/schemas/VideoLicenceSet'
4457 example: Attribution - Share Alike
4461 description: language id of the video (see [/videos/languages](#operation/getLanguages))
4463 VideoConstantString-Language:
4466 $ref: '#/components/schemas/VideoLanguageSet'
4471 VideoPlaylistPrivacySet:
4477 description: Video playlist privacy policy (see [/video-playlists/privacies])
4478 VideoPlaylistPrivacyConstant:
4481 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4485 VideoPlaylistTypeSet:
4490 description: The video playlist type (Regular = `1`, Watch Later = `2`)
4491 VideoPlaylistTypeConstant:
4494 $ref: '#/components/schemas/VideoPlaylistTypeSet'
4505 description: privacy id of the video (see [/videos/privacies](#operation/getPrivacyPolicies))
4506 VideoPrivacyConstant:
4509 $ref: '#/components/schemas/VideoPrivacySet'
4526 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
4533 description: 'Admin flags for the user (None = `0`, Bypass video blacklist = `1`)'
4544 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
4554 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
4558 $ref: '#/components/schemas/AbuseStateSet'
4561 AbusePredefinedReasons:
4574 example: [spamOrMisleading]
4579 Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`)
4581 `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos.
4583 VideoResolutionConstant:
4584 description: resolutions and their labels for the video
4587 $ref: '#/components/schemas/VideoResolutionSet'
4591 VideoScheduledUpdate:
4594 $ref: '#/components/schemas/VideoPrivacySet'
4598 description: When to update the video
4618 - $ref: '#/components/schemas/ActorImage'
4619 VideoChannelSummary:
4622 $ref: '#/components/schemas/id'
4636 - $ref: '#/components/schemas/ActorImage'
4650 - $ref: '#/components/schemas/Video'
4657 description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file
4658 example: magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.torrent&xt=urn:btih:38b4747ff788b30bf61f59d1965cd38f9e48e01f&dn=What+is+PeerTube%3F&tr=wss%3A%2F%2Fframatube.org%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.mp4
4659 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
4661 $ref: '#/components/schemas/VideoResolutionConstant'
4664 description: Video file size in bytes
4667 description: Direct URL of the torrent file
4671 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
4675 description: Direct URL of the video
4679 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
4683 description: Frames per second of the video file
4687 description: URL dereferencing the output of ffprobe on the file
4688 VideoStreamingPlaylists:
4693 $ref: '#/components/schemas/id'
4701 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS'
4702 VideoStreamingPlaylists-HLS:
4713 Video files associated to this playlist.
4715 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.)
4717 $ref: '#/components/schemas/VideoFile'
4729 $ref: '#/components/schemas/Video/properties/id'
4731 $ref: '#/components/schemas/Video/properties/uuid'
4733 $ref: '#/components/schemas/Video/properties/name'
4737 description: object id for the video
4739 - $ref: '#/components/schemas/id'
4741 description: universal identifier for the video, that can be used across instances
4743 - $ref: '#/components/schemas/UUIDv4'
4749 example: 2017-10-01T10:52:46.396Z
4750 description: time at which the video object was first drafted
4754 example: 2018-10-01T10:52:46.396Z
4755 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
4759 example: 2021-05-04T08:01:01.502Z
4760 description: last time the video's metadata was modified
4761 originallyPublishedAt:
4764 example: 2010-10-01T10:52:46.396Z
4765 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
4768 - $ref: '#/components/schemas/VideoConstantNumber-Category'
4769 description: category in which the video is classified
4772 - $ref: '#/components/schemas/VideoConstantNumber-Licence'
4773 description: licence under which the video is distributed
4776 - $ref: '#/components/schemas/VideoConstantString-Language'
4777 description: main language used in the video
4780 - $ref: '#/components/schemas/VideoPrivacyConstant'
4781 description: privacy policy used to distribute the video
4785 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n
4786 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr...
4790 truncated description of the video, written in Markdown.
4791 Resolve `descriptionPath` to get the full description of maximum `10000` characters.
4796 description: duration of the video in seconds
4801 description: title of the video
4802 example: What is PeerTube?
4807 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
4810 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
4813 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
4830 - $ref: '#/components/schemas/VideoStateConstant'
4831 description: represents the internal state of the video processing within the PeerTube instance
4835 - $ref: '#/components/schemas/VideoScheduledUpdate'
4843 $ref: '#/components/schemas/AccountSummary'
4845 $ref: '#/components/schemas/VideoChannelSummary'
4854 - $ref: '#/components/schemas/Video'
4859 example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description
4860 description: path at which to get the full description of maximum `10000` characters
4863 description: A text tell the audience how to support the video creator
4864 example: Please support our work on https://soutenir.framasoft.org/en/ <3
4868 $ref: '#/components/schemas/VideoChannel'
4870 $ref: '#/components/schemas/Account'
4872 example: [flowers, gardening]
4890 - https://peertube2.cpy.re/tracker/announce
4891 - wss://peertube2.cpy.re/tracker/socket
4895 $ref: '#/components/schemas/VideoFile'
4897 WebTorrent/raw video files. If WebTorrent is disabled on the server:
4899 - field will be empty
4900 - video files will be found in `streamingPlaylists[].files` field
4904 $ref: '#/components/schemas/VideoStreamingPlaylists'
4906 HLS playlists/manifest files. If HLS is disabled on the server:
4908 - field will be empty
4909 - video files will be found in `files` field
4910 FileRedundancyInformation:
4913 $ref: '#/components/schemas/id'
4938 $ref: '#/components/schemas/id'
4945 $ref: '#/components/schemas/UUIDv4'
4952 $ref: '#/components/schemas/FileRedundancyInformation'
4956 $ref: '#/components/schemas/FileRedundancyInformation'
4957 VideoImportStateConstant:
4965 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
4972 additionalProperties: false
4976 $ref: '#/components/schemas/VideoImport/properties/targetUrl'
4977 required: [targetUrl]
4980 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
4981 required: [magnetUri]
4984 $ref: '#/components/schemas/VideoImport/properties/torrentfile'
4985 required: [torrentfile]
4986 - $ref: '#/components/schemas/VideoUploadRequestCommon'
4995 - $ref: '#/components/schemas/id'
4999 description: remote URL where to find the import's source video
5000 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
5004 description: magnet URI allowing to resolve the import's source video
5005 example: magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.torrent&xt=urn:btih:38b4747ff788b30bf61f59d1965cd38f9e48e01f&dn=What+is+PeerTube%3F&tr=wss%3A%2F%2Fframatube.org%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.mp4
5006 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5011 description: Torrent file containing only the video file
5018 - $ref: '#/components/schemas/VideoImportStateConstant'
5034 - $ref: '#/components/schemas/Video'
5044 $ref: '#/components/schemas/VideoImport'
5048 $ref: '#/components/schemas/id'
5051 example: The video is a spam
5055 $ref: '#/components/schemas/AbusePredefinedReasons'
5057 $ref: '#/components/schemas/Account'
5059 $ref: '#/components/schemas/AbuseStateConstant'
5062 example: Decided to ban the server since it spams us regularly
5066 $ref: '#/components/schemas/VideoInfo'
5073 $ref: '#/components/schemas/id'
5084 $ref: '#/components/schemas/AccountSummary'
5088 $ref: '#/components/schemas/id'
5090 $ref: '#/components/schemas/Video/properties/id'
5102 $ref: '#/components/schemas/UUIDv4'
5120 $ref: '#/components/schemas/id'
5122 $ref: '#/components/schemas/UUIDv4'
5145 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
5147 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
5149 $ref: '#/components/schemas/AccountSummary'
5151 $ref: '#/components/schemas/VideoChannelSummary'
5155 $ref: '#/components/schemas/id'
5162 description: Text of the comment
5164 example: This video is wonderful!
5166 $ref: '#/components/schemas/id'
5170 - $ref: '#/components/schemas/id'
5172 $ref: '#/components/schemas/Video/properties/id'
5187 totalRepliesFromVideoAuthor:
5194 $ref: '#/components/schemas/Account'
5195 VideoCommentThreadTree:
5198 $ref: '#/components/schemas/VideoComment'
5202 $ref: '#/components/schemas/VideoCommentThreadTree'
5206 $ref: '#/components/schemas/VideoConstantString-Language'
5222 $ref: '#/components/schemas/id'
5239 $ref: '#/components/schemas/id'
5244 description: immutable name of the actor, used to find or mention it
5246 - $ref: '#/components/schemas/username'
5250 description: server on which the actor is resident
5251 hostRedundancyAllowed:
5253 description: whether this actor's host allows redundancy of its videos
5257 description: number of actors subscribed to by this actor, as seen by this instance
5261 description: number of followers of this actor, as seen by this instance
5269 $ref: '#/components/schemas/ActorImage'
5272 - $ref: '#/components/schemas/Actor'
5275 description: object id for the user tied to this account
5277 - $ref: '#/components/schemas/User/properties/id'
5280 description: editable name of the account, displayed in its representations
5285 description: text or bio displayed on the account's profile
5291 description: timestamp within the video, in seconds
5358 allowedForCurrentIP:
5360 requiresEmailVerification:
5378 $ref: '#/components/schemas/VideoResolutionSet'
5463 example: 16810141515
5566 requiresEmailVerification:
5581 description: Settings that apply to new users, if registration is enabled
5585 example: 16810141515
5591 description: Settings pertaining to transcoding jobs
5595 allowAdditionalExtensions:
5597 description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos
5600 description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
5603 description: Amount of threads used by ffmpeg for 1 transcoding job
5606 description: Amount of transcoding jobs to execute in parallel
5612 New profiles can be added by plugins ; available in core PeerTube: 'default'.
5615 description: Resolutions to transcode _new videos_ to
5635 description: WebTorrent-specific settings
5641 description: HLS-specific settings
5685 $ref: '#/components/schemas/id'
5687 $ref: '#/components/schemas/Actor'
5689 $ref: '#/components/schemas/Actor'
5692 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
5705 PredefinedAbuseReasons:
5706 description: Reason categories that help triage reports
5724 $ref: '#/components/schemas/id'
5736 - activitypub-http-unicast
5737 - activitypub-http-broadcast
5738 - activitypub-http-fetcher
5739 - activitypub-follow
5745 - activitypub-refresher
5749 additionalProperties: true
5752 additionalProperties: true
5768 $ref: '#/components/schemas/id'
5773 $ref: '#/components/schemas/id'
5774 VideoUploadRequestCommon:
5777 description: Video name
5779 example: What is PeerTube?
5783 description: Channel id that will contain this video
5788 $ref: '#/components/schemas/VideoPrivacySet'
5790 $ref: '#/components/schemas/VideoCategorySet'
5792 $ref: '#/components/schemas/VideoLicenceSet'
5794 $ref: '#/components/schemas/VideoLanguageSet'
5796 description: Video description
5799 **[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)**
5801 description: Whether or not we wait transcoding before publish the video
5804 description: A text tell the audience how to support the video creator
5805 example: Please support our work on https://soutenir.framasoft.org/en/ <3
5808 description: Whether or not this video contains sensitive content
5811 description: Video tags (maximum 5 tags each between 2 and 30 characters)
5824 description: Enable or disable comments for this video
5827 description: Enable or disable downloading for this video
5829 originallyPublishedAt:
5830 description: Date when the content was originally published
5834 $ref: '#/components/schemas/VideoScheduledUpdate'
5836 description: Video thumbnail file
5840 description: Video preview file
5846 VideoUploadRequestLegacy:
5848 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5854 description: Video file
5857 VideoUploadRequestResumable:
5859 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5865 description: Video filename including extension
5868 example: what_is_peertube.mp4
5870 description: Video thumbnail file
5874 description: Video preview file
5877 VideoUploadResponse:
5883 $ref: '#/components/schemas/Video/properties/id'
5885 $ref: '#/components/schemas/Video/properties/uuid'
5886 CommentThreadResponse:
5895 $ref: '#/components/schemas/VideoComment'
5896 CommentThreadPostResponse:
5899 $ref: '#/components/schemas/VideoComment'
5909 $ref: '#/components/schemas/Video'
5913 $ref: '#/components/schemas/Account'
5916 description: Automatically start playing the upcoming video after the currently playing video
5917 autoPlayNextVideoPlaylist:
5919 description: Automatically start playing the video on the playlist after the currently playing video
5922 description: Automatically start playing the video on the watch page
5932 description: The user email
5935 description: Has the user confirmed their email address?
5938 - $ref: '#/components/schemas/id'
5942 description: Auth plugin to use to authenticate the user
5946 noInstanceConfigWarningModal:
5951 $ref: '#/components/schemas/NSFWPolicy'
5953 $ref: '#/components/schemas/UserRole'
5962 description: Theme enabled by this user
5964 $ref: '#/components/schemas/username'
5968 $ref: '#/components/schemas/VideoChannel'
5971 description: The user video quota in bytes
5975 description: The user daily video quota in bytes
5979 description: Enable P2P in the player
5982 - $ref: '#/components/schemas/User'
5984 # optionally present fields: they require WITH_STATS scope
5987 description: Count of videos published
5990 description: Count of reports/abuses of which the user is a target
5991 abusesAcceptedCount:
5993 description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team
5996 description: Count of reports/abuses created by the user
5999 description: Count of comments published
6003 $ref: '#/components/schemas/username'
6005 $ref: '#/components/schemas/password'
6009 description: The user email
6012 description: The user video quota in bytes
6016 description: The user daily video quota in bytes
6019 $ref: '#/components/schemas/usernameChannel'
6021 $ref: '#/components/schemas/UserRole'
6023 $ref: '#/components/schemas/UserAdminFlags'
6034 description: The updated email of the user
6036 - $ref: '#/components/schemas/User/properties/email'
6039 description: Set the email as verified
6042 description: The updated video quota of the user in bytes
6045 description: The updated daily video quota of the user in bytes
6049 description: The auth plugin to use to authenticate the user
6050 example: 'peertube-plugin-auth-saml2'
6052 $ref: '#/components/schemas/UserRole'
6054 $ref: '#/components/schemas/UserAdminFlags'
6056 # see shared/models/users/user-update-me.model.ts:
6059 $ref: '#/components/schemas/password'
6061 $ref: '#/components/schemas/password'
6063 description: new email used for login and service communications
6065 - $ref: '#/components/schemas/User/properties/email'
6068 description: new name of the user in its representations
6073 description: new NSFW display policy
6080 description: whether to enable P2P in the player or not
6083 description: new preference regarding playing videos automatically
6086 description: new preference regarding playing following videos automatically
6087 autoPlayNextVideoPlaylist:
6089 description: new preference regarding playing following playlist videos automatically
6090 videosHistoryEnabled:
6092 description: whether to keep track of watched history or not
6097 description: list of languages to filter videos down to
6100 noInstanceConfigWarningModal:
6107 $ref: '#/components/schemas/id'
6114 description: Rating of the video
6121 $ref: '#/components/schemas/Video'
6128 description: Rating of the video
6135 description: immutable name of the user, used to find or mention its actor
6137 - $ref: '#/components/schemas/username'
6139 $ref: '#/components/schemas/password'
6143 description: email of the user, used for login or service communications
6146 description: editable name of the user, displayed in its representations
6151 description: channel base information used to create the first channel of the user
6154 $ref: '#/components/schemas/usernameChannel'
6156 $ref: '#/components/schemas/VideoChannel/properties/displayName'
6166 pattern: /^[a-z0-9]$/
6169 example: v1ikx5hnfop4mdpnci8nsqh93c45rldf
6172 pattern: /^[a-zA-Z0-9]$/
6175 example: AjWiOapPltI6EnsWQwlFarRtLh4u8tDt
6176 OAuthToken-password:
6178 - $ref: '#/components/schemas/OAuthClient'
6188 $ref: '#/components/schemas/User/properties/username'
6190 $ref: '#/components/schemas/password'
6197 OAuthToken-refresh_token:
6199 - $ref: '#/components/schemas/OAuthClient'
6210 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
6219 # GET/POST/PUT properties
6222 description: editable name of the channel, displayed in its representations
6223 example: Videos of Framasoft
6228 example: Videos made with <3 by Framasoft
6233 description: text shown by default on all videos of this channel, to tell the audience how to support it
6234 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6237 # GET-only properties
6241 - $ref: '#/components/schemas/id'
6257 $ref: '#/components/schemas/UUIDv4'
6260 - $ref: '#/components/schemas/VideoChannel'
6263 description: username of the channel to create
6265 - $ref: '#/components/schemas/usernameChannel'
6271 - $ref: '#/components/schemas/VideoChannel'
6273 bulkVideosSupportUpdate:
6275 description: Update the support field for all videos of this channel
6285 - $ref: '#/components/schemas/VideoChannel'
6286 - $ref: '#/components/schemas/Actor'
6291 name: 'media:peerLink'
6300 - application/x-bittorrent
6306 name: 'media:content'
6337 VideoCommentsForXML:
6372 description: video watch page URL
6375 description: video canonical URL
6379 description: video publication date
6382 description: video description
6385 description: video description
6388 description: publisher user name
6391 description: video category (MRSS)
6394 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
6409 description: video embed path, relative to the canonical URL domain (MRSS)
6418 description: video watch path, relative to the canonical URL domain (MRSS)
6439 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
6440 'media:description':
6447 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
6450 description: main streamable file for the video
6460 - application/x-bittorrent
6469 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)
6472 - $ref: '#/components/schemas/MRSSPeerLink'
6473 - $ref: '#/components/schemas/MRSSGroupContent'
6474 NotificationSettingValue:
6491 $ref: '#/components/schemas/id'
6495 Notification type, following the `UserNotificationType` enum:
6497 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
6499 - `2` NEW_COMMENT_ON_MY_VIDEO
6501 - `3` NEW_ABUSE_FOR_MODERATORS
6503 - `4` BLACKLIST_ON_MY_VIDEO
6505 - `5` UNBLACKLIST_ON_MY_VIDEO
6507 - `6` MY_VIDEO_PUBLISHED
6509 - `7` MY_VIDEO_IMPORT_SUCCESS
6511 - `8` MY_VIDEO_IMPORT_ERROR
6513 - `9` NEW_USER_REGISTRATION
6517 - `11` COMMENT_MENTION
6519 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
6521 - `13` NEW_INSTANCE_FOLLOWER
6523 - `14` AUTO_INSTANCE_FOLLOWING
6529 - $ref: '#/components/schemas/VideoInfo'
6533 $ref: '#/components/schemas/ActorInfo'
6539 $ref: '#/components/schemas/id'
6542 $ref: '#/components/schemas/VideoInfo'
6547 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
6557 $ref: '#/components/schemas/id'
6561 $ref: '#/components/schemas/VideoInfo'
6563 $ref: '#/components/schemas/ActorInfo'
6569 $ref: '#/components/schemas/id'
6572 - $ref: '#/components/schemas/VideoInfo'
6578 $ref: '#/components/schemas/id'
6581 - $ref: '#/components/schemas/VideoInfo'
6585 - $ref: '#/components/schemas/ActorInfo'
6591 $ref: '#/components/schemas/id'
6593 $ref: '#/components/schemas/ActorInfo'
6621 NotificationListResponse:
6630 $ref: '#/components/schemas/Notification'
6635 example: peertube-plugin-auth-ldap
6663 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
6666 additionalProperties: true
6682 $ref: '#/components/schemas/Plugin'
6689 description: User can stream multiple times in a permanent live
6698 description: RTMP stream key to use to stream into this live video
6702 description: User can stream multiple times in a permanent live
6709 'https://search.example.org/api/v1/search/videos':
6711 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
6714 description: successful operation
6718 $ref: '#/components/schemas/VideoListResponse'