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
3277 /blocklist/accounts:
3281 summary: List account blocks
3286 - $ref: '#/components/parameters/start'
3287 - $ref: '#/components/parameters/count'
3288 - $ref: '#/components/parameters/sort'
3291 description: successful operation
3295 summary: Block an account
3307 example: chocobozzz@example.org
3308 description: account to block, in the form `username@domain`
3313 description: successful operation
3315 description: self-blocking forbidden
3316 '/blocklist/accounts/{accountName}':
3320 summary: Unblock an account by its handle
3328 description: account to unblock, in the form `username@domain`
3333 description: successful operation
3335 description: account or account block does not exist
3340 summary: List server blocks
3345 - $ref: '#/components/parameters/start'
3346 - $ref: '#/components/parameters/count'
3347 - $ref: '#/components/parameters/sort'
3350 description: successful operation
3354 summary: Block a server
3367 description: server domain to block
3372 description: successful operation
3374 description: self-blocking forbidden
3375 '/blocklist/servers/{host}':
3379 summary: Unblock a server by its domain
3387 description: server domain to unblock
3393 description: successful operation
3395 description: account block does not exist
3399 - Instance Redundancy
3400 summary: Update a server redundancy policy
3408 description: server domain to mirror
3420 description: allow mirroring of the host's local videos
3425 description: successful operation
3427 description: server is not already known
3432 summary: List videos being mirrored
3440 description: direction of the mirror
3446 - $ref: '#/components/parameters/start'
3447 - $ref: '#/components/parameters/count'
3448 - $ref: '#/components/parameters/videoRedundanciesSort'
3451 description: successful operation
3457 $ref: '#/components/schemas/VideoRedundancy'
3461 summary: Mirror a video
3472 $ref: '#/components/schemas/Video/properties/id'
3477 description: successful operation
3479 description: cannot mirror a local video
3481 description: video does not exist
3483 description: video is already mirrored
3484 /redundancy/videos/{redundancyId}:
3488 summary: Delete a mirror done on a video
3493 - name: redundancyId
3496 description: id of an existing redundancy on a video
3501 description: successful operation
3503 description: video redundancy not found
3504 '/feeds/video-comments.{format}':
3508 summary: List comments on videos
3513 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3526 description: 'limit listing to a specific video'
3531 description: 'limit listing to a specific account'
3536 description: 'limit listing to a specific account'
3539 - name: videoChannelId
3541 description: 'limit listing to a specific video channel'
3544 - name: videoChannelName
3546 description: 'limit listing to a specific video channel'
3551 description: successful operation
3556 default: 'max-age=900' # 15 min cache
3560 $ref: '#/components/schemas/VideoCommentsForXML'
3563 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3564 application/rss+xml:
3566 $ref: '#/components/schemas/VideoCommentsForXML'
3569 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
3572 $ref: '#/components/schemas/VideoCommentsForXML'
3575 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
3576 application/atom+xml:
3578 $ref: '#/components/schemas/VideoCommentsForXML'
3581 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
3587 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
3589 x-summary: field inconsistencies
3592 - videoId filter is mixed with a channel filter
3594 description: video, video channel or account not found
3596 description: accept header unsupported
3597 '/feeds/videos.{format}':
3601 summary: List videos
3606 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3619 description: 'limit listing to a specific account'
3624 description: 'limit listing to a specific account'
3627 - name: videoChannelId
3629 description: 'limit listing to a specific video channel'
3632 - name: videoChannelName
3634 description: 'limit listing to a specific video channel'
3637 - $ref: '#/components/parameters/sort'
3638 - $ref: '#/components/parameters/nsfw'
3639 - $ref: '#/components/parameters/filter'
3642 description: successful operation
3647 default: 'max-age=900' # 15 min cache
3651 $ref: '#/components/schemas/VideosForXML'
3654 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
3655 application/rss+xml:
3657 $ref: '#/components/schemas/VideosForXML'
3660 externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
3663 $ref: '#/components/schemas/VideosForXML'
3666 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
3667 application/atom+xml:
3669 $ref: '#/components/schemas/VideosForXML'
3672 externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
3678 externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
3680 description: video channel or account not found
3682 description: accept header unsupported
3683 '/feeds/subscriptions.{format}':
3688 summary: List videos of subscriptions tied to a token
3693 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3706 description: limit listing to a specific account
3712 description: private token allowing access
3716 - $ref: '#/components/parameters/sort'
3717 - $ref: '#/components/parameters/nsfw'
3718 - $ref: '#/components/parameters/filter'
3721 description: successful operation
3726 default: 'max-age=900' # 15 min cache
3730 $ref: '#/components/schemas/VideosForXML'
3731 application/rss+xml:
3733 $ref: '#/components/schemas/VideosForXML'
3736 $ref: '#/components/schemas/VideosForXML'
3737 application/atom+xml:
3739 $ref: '#/components/schemas/VideosForXML'
3744 description: accept header unsupported
3749 summary: List plugins
3762 - $ref: '#/components/parameters/start'
3763 - $ref: '#/components/parameters/count'
3764 - $ref: '#/components/parameters/sort'
3767 description: successful operation
3771 $ref: '#/components/schemas/PluginResponse'
3776 summary: List available plugins
3789 - name: currentPeerTubeEngine
3793 - $ref: '#/components/parameters/start'
3794 - $ref: '#/components/parameters/count'
3795 - $ref: '#/components/parameters/sort'
3798 description: successful operation
3802 $ref: '#/components/schemas/PluginResponse'
3804 description: plugin index unavailable
3809 summary: Install a plugin
3822 example: peertube-plugin-auth-ldap
3825 additionalProperties: false
3832 additionalProperties: false
3835 description: successful operation
3837 description: should have either `npmName` or `path` set
3842 summary: Update a plugin
3855 example: peertube-plugin-auth-ldap
3858 additionalProperties: false
3865 additionalProperties: false
3868 description: successful operation
3870 description: should have either `npmName` or `path` set
3872 description: existing plugin not found
3877 summary: Uninstall a plugin
3889 description: name of the plugin/theme in its package.json
3890 example: peertube-plugin-auth-ldap
3895 description: successful operation
3897 description: existing plugin not found
3902 summary: Get a plugin
3907 - $ref: '#/components/parameters/npmName'
3910 description: successful operation
3914 $ref: '#/components/schemas/Plugin'
3916 description: plugin not found
3917 /plugins/{npmName}/settings:
3921 summary: Set a plugin's settings
3926 - $ref: '#/components/parameters/npmName'
3935 additionalProperties: true
3938 description: successful operation
3940 description: plugin not found
3941 /plugins/{npmName}/public-settings:
3945 summary: Get a plugin's public settings
3947 - $ref: '#/components/parameters/npmName'
3950 description: successful operation
3955 additionalProperties: true
3957 description: plugin not found
3958 /plugins/{npmName}/registered-settings:
3962 summary: Get a plugin's registered settings
3967 - $ref: '#/components/parameters/npmName'
3970 description: successful operation
3975 additionalProperties: true
3977 description: plugin not found
3979 - url: 'https://peertube2.cpy.re/api/v1'
3980 description: Live Test Server (live data - latest nightly version)
3981 - url: 'https://peertube3.cpy.re/api/v1'
3982 description: Live Test Server (live data - latest RC version)
3983 - url: 'https://peertube.cpy.re/api/v1'
3984 description: Live Test Server (live data - stable version)
3991 description: Offset used to paginate results
3999 description: "Number of items to return"
4009 description: Sort column
4017 description: Plain text search, applied to various parts of the model depending on endpoint
4025 If the administrator enabled search index support, you can override the default search target.
4028 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
4029 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
4030 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
4031 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
4032 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
4033 * 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
4034 the data from the origin instance API
4044 description: Sort videos by criteria
4060 description: Sort videos by criteria
4075 description: Sort comments by criteria
4085 description: Sort blacklists by criteria
4101 description: Plain text search that will match with user usernames or emails
4108 description: Filter results down to (un)banned users
4115 description: Sort users by criteria
4126 description: Sort abuses by criteria
4133 videoRedundanciesSort:
4137 description: Sort abuses by criteria
4146 description: The username or handle of the account
4149 example: chocobozzz | chocobozzz@example.org
4154 description: The user id
4156 $ref: '#/components/schemas/id'
4161 description: The object id or uuid
4164 - $ref: '#/components/schemas/id'
4165 - $ref: '#/components/schemas/UUIDv4'
4170 description: Playlist id
4172 $ref: '#/components/schemas/VideoPlaylist/properties/id'
4174 name: playlistElementId
4177 description: Playlist element id
4179 $ref: '#/components/schemas/id'
4184 description: Abuse id
4186 $ref: '#/components/schemas/Abuse/properties/id'
4188 name: abuseMessageId
4191 description: Abuse message id
4193 $ref: '#/components/schemas/AbuseMessage/properties/id'
4195 name: captionLanguage
4198 description: The caption language
4200 $ref: '#/components/schemas/VideoLanguageSet'
4205 description: The video channel handle
4208 example: my_username | my_username@example.com
4210 name: subscriptionHandle
4213 description: The subscription handle
4216 example: my_username | my_username@example.com
4221 description: The thread id (root comment id)
4223 $ref: '#/components/schemas/VideoCommentThreadTree/properties/comment/properties/id'
4228 description: The comment id
4230 $ref: '#/components/schemas/VideoComment/properties/id'
4235 description: whether or not the video is a live
4242 description: category id of the video (see [/videos/categories](#operation/getCategories))
4245 - $ref: '#/components/schemas/VideoCategorySet'
4248 $ref: '#/components/schemas/VideoCategorySet'
4255 description: tag(s) of the video
4269 description: tag(s) of the video, where all should be present in the video
4282 description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language
4285 - $ref: '#/components/schemas/VideoLanguageSet'
4288 $ref: '#/components/schemas/VideoLanguageSet'
4295 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4298 - $ref: '#/components/schemas/VideoLicenceSet'
4301 $ref: '#/components/schemas/VideoLicenceSet'
4308 description: if you don't need the `total` in the response
4319 description: whether to include nsfw videos, if any
4330 Special filters which might require special rights:
4331 * `local` - only videos local to the instance
4332 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
4333 * `all` - all videos, showing private and unlisted videos (requires Admin privileges)
4343 description: list of uris to check if each is part of the user subscriptions
4353 description: name of the plugin/theme on npmjs.com or in its package.json
4356 example: peertube-plugin-auth-ldap
4361 description: job type
4365 - activitypub-follow
4366 - activitypub-http-broadcast
4367 - activitypub-http-fetcher
4368 - activitypub-http-unicast
4374 - activitypub-refresher
4380 Authenticating via OAuth requires the following steps:
4381 - Have an activated account
4382 - [Generate] an access token for that account at `/api/v1/users/token`.
4383 - Make requests with the *Authorization: Bearer <token\>* header
4384 - Profit, depending on the role assigned to the account
4386 Note that the __access token is valid for 1 day__ and is given
4387 along with a __refresh token valid for 2 weeks__.
4389 [Generate]: https://docs.joinpeertube.org/api-rest-getting-started
4393 tokenUrl: /api/v1/users/token
4396 moderator: Moderator scope
4399 # Resuable core properties
4407 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4408 pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
4413 description: immutable name of the user, used to find or mention its actor
4415 pattern: '/^[a-z0-9._]+$/'
4420 description: immutable name of the channel, used to interact with its actor
4421 example: framasoft_videos
4422 pattern: '/^[a-zA-Z0-9\\-_.:]+$/'
4433 description: category id of the video (see [/videos/categories](#operation/getCategories))
4435 VideoConstantNumber-Category:
4438 $ref: '#/components/schemas/VideoCategorySet'
4441 example: Science & Technology
4445 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4447 VideoConstantNumber-Licence:
4450 $ref: '#/components/schemas/VideoLicenceSet'
4453 example: Attribution - Share Alike
4457 description: language id of the video (see [/videos/languages](#operation/getLanguages))
4459 VideoConstantString-Language:
4462 $ref: '#/components/schemas/VideoLanguageSet'
4467 VideoPlaylistPrivacySet:
4473 description: Video playlist privacy policy (see [/video-playlists/privacies])
4474 VideoPlaylistPrivacyConstant:
4477 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4481 VideoPlaylistTypeSet:
4486 description: The video playlist type (Regular = `1`, Watch Later = `2`)
4487 VideoPlaylistTypeConstant:
4490 $ref: '#/components/schemas/VideoPlaylistTypeSet'
4501 description: privacy id of the video (see [/videos/privacies](#operation/getPrivacyPolicies))
4502 VideoPrivacyConstant:
4505 $ref: '#/components/schemas/VideoPrivacySet'
4522 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
4529 description: 'Admin flags for the user (None = `0`, Bypass video blacklist = `1`)'
4540 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
4550 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
4554 $ref: '#/components/schemas/AbuseStateSet'
4557 AbusePredefinedReasons:
4570 example: [spamOrMisleading]
4575 Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`)
4577 `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos.
4579 VideoResolutionConstant:
4580 description: resolutions and their labels for the video
4583 $ref: '#/components/schemas/VideoResolutionSet'
4587 VideoScheduledUpdate:
4590 $ref: '#/components/schemas/VideoPrivacySet'
4594 description: When to update the video
4614 - $ref: '#/components/schemas/ActorImage'
4615 VideoChannelSummary:
4618 $ref: '#/components/schemas/id'
4632 - $ref: '#/components/schemas/ActorImage'
4646 - $ref: '#/components/schemas/Video'
4653 description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file
4654 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
4655 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
4657 $ref: '#/components/schemas/VideoResolutionConstant'
4660 description: Video file size in bytes
4663 description: Direct URL of the torrent file
4667 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
4671 description: Direct URL of the video
4675 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
4679 description: Frames per second of the video file
4683 description: URL dereferencing the output of ffprobe on the file
4684 VideoStreamingPlaylists:
4689 $ref: '#/components/schemas/id'
4697 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS'
4698 VideoStreamingPlaylists-HLS:
4709 Video files associated to this playlist.
4711 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.)
4713 $ref: '#/components/schemas/VideoFile'
4725 $ref: '#/components/schemas/Video/properties/id'
4727 $ref: '#/components/schemas/Video/properties/uuid'
4729 $ref: '#/components/schemas/Video/properties/name'
4733 description: object id for the video
4735 - $ref: '#/components/schemas/id'
4737 description: universal identifier for the video, that can be used across instances
4739 - $ref: '#/components/schemas/UUIDv4'
4745 example: 2017-10-01T10:52:46.396Z
4746 description: time at which the video object was first drafted
4750 example: 2018-10-01T10:52:46.396Z
4751 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
4755 example: 2021-05-04T08:01:01.502Z
4756 description: last time the video's metadata was modified
4757 originallyPublishedAt:
4760 example: 2010-10-01T10:52:46.396Z
4761 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
4764 - $ref: '#/components/schemas/VideoConstantNumber-Category'
4765 description: category in which the video is classified
4768 - $ref: '#/components/schemas/VideoConstantNumber-Licence'
4769 description: licence under which the video is distributed
4772 - $ref: '#/components/schemas/VideoConstantString-Language'
4773 description: main language used in the video
4776 - $ref: '#/components/schemas/VideoPrivacyConstant'
4777 description: privacy policy used to distribute the video
4781 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n
4782 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr...
4786 truncated description of the video, written in Markdown.
4787 Resolve `descriptionPath` to get the full description of maximum `10000` characters.
4792 description: duration of the video in seconds
4797 description: title of the video
4798 example: What is PeerTube?
4803 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
4806 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
4809 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
4826 - $ref: '#/components/schemas/VideoStateConstant'
4827 description: represents the internal state of the video processing within the PeerTube instance
4831 - $ref: '#/components/schemas/VideoScheduledUpdate'
4839 $ref: '#/components/schemas/AccountSummary'
4841 $ref: '#/components/schemas/VideoChannelSummary'
4850 - $ref: '#/components/schemas/Video'
4855 example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description
4856 description: path at which to get the full description of maximum `10000` characters
4859 description: A text tell the audience how to support the video creator
4860 example: Please support our work on https://soutenir.framasoft.org/en/ <3
4864 $ref: '#/components/schemas/VideoChannel'
4866 $ref: '#/components/schemas/Account'
4868 example: [flowers, gardening]
4886 - https://peertube2.cpy.re/tracker/announce
4887 - wss://peertube2.cpy.re/tracker/socket
4891 $ref: '#/components/schemas/VideoFile'
4893 WebTorrent/raw video files. If WebTorrent is disabled on the server:
4895 - field will be empty
4896 - video files will be found in `streamingPlaylists[].files` field
4900 $ref: '#/components/schemas/VideoStreamingPlaylists'
4902 HLS playlists/manifest files. If HLS is disabled on the server:
4904 - field will be empty
4905 - video files will be found in `files` field
4906 FileRedundancyInformation:
4909 $ref: '#/components/schemas/id'
4934 $ref: '#/components/schemas/id'
4941 $ref: '#/components/schemas/UUIDv4'
4948 $ref: '#/components/schemas/FileRedundancyInformation'
4952 $ref: '#/components/schemas/FileRedundancyInformation'
4953 VideoImportStateConstant:
4961 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
4968 additionalProperties: false
4972 $ref: '#/components/schemas/VideoImport/properties/targetUrl'
4973 required: [targetUrl]
4976 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
4977 required: [magnetUri]
4980 $ref: '#/components/schemas/VideoImport/properties/torrentfile'
4981 required: [torrentfile]
4982 - $ref: '#/components/schemas/VideoUploadRequestCommon'
4991 - $ref: '#/components/schemas/id'
4995 description: remote URL where to find the import's source video
4996 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
5000 description: magnet URI allowing to resolve the import's source video
5001 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
5002 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5007 description: Torrent file containing only the video file
5014 - $ref: '#/components/schemas/VideoImportStateConstant'
5030 - $ref: '#/components/schemas/Video'
5040 $ref: '#/components/schemas/VideoImport'
5044 $ref: '#/components/schemas/id'
5047 example: The video is a spam
5051 $ref: '#/components/schemas/AbusePredefinedReasons'
5053 $ref: '#/components/schemas/Account'
5055 $ref: '#/components/schemas/AbuseStateConstant'
5058 example: Decided to ban the server since it spams us regularly
5062 $ref: '#/components/schemas/VideoInfo'
5069 $ref: '#/components/schemas/id'
5080 $ref: '#/components/schemas/AccountSummary'
5084 $ref: '#/components/schemas/id'
5086 $ref: '#/components/schemas/Video/properties/id'
5098 $ref: '#/components/schemas/UUIDv4'
5116 $ref: '#/components/schemas/id'
5118 $ref: '#/components/schemas/UUIDv4'
5141 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
5143 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
5145 $ref: '#/components/schemas/AccountSummary'
5147 $ref: '#/components/schemas/VideoChannelSummary'
5151 $ref: '#/components/schemas/id'
5158 description: Text of the comment
5160 example: This video is wonderful!
5162 $ref: '#/components/schemas/id'
5166 - $ref: '#/components/schemas/id'
5168 $ref: '#/components/schemas/Video/properties/id'
5183 totalRepliesFromVideoAuthor:
5190 $ref: '#/components/schemas/Account'
5191 VideoCommentThreadTree:
5194 $ref: '#/components/schemas/VideoComment'
5198 $ref: '#/components/schemas/VideoCommentThreadTree'
5202 $ref: '#/components/schemas/VideoConstantString-Language'
5218 $ref: '#/components/schemas/id'
5235 $ref: '#/components/schemas/id'
5240 description: immutable name of the actor, used to find or mention it
5242 - $ref: '#/components/schemas/username'
5246 description: server on which the actor is resident
5247 hostRedundancyAllowed:
5249 description: whether this actor's host allows redundancy of its videos
5253 description: number of actors subscribed to by this actor, as seen by this instance
5257 description: number of followers of this actor, as seen by this instance
5265 $ref: '#/components/schemas/ActorImage'
5268 - $ref: '#/components/schemas/Actor'
5271 description: object id for the user tied to this account
5273 - $ref: '#/components/schemas/User/properties/id'
5276 description: editable name of the account, displayed in its representations
5281 description: text or bio displayed on the account's profile
5287 description: timestamp within the video, in seconds
5354 allowedForCurrentIP:
5356 requiresEmailVerification:
5374 $ref: '#/components/schemas/VideoResolutionSet'
5459 example: 16810141515
5562 requiresEmailVerification:
5577 description: Settings that apply to new users, if registration is enabled
5581 example: 16810141515
5587 description: Settings pertaining to transcoding jobs
5591 allowAdditionalExtensions:
5593 description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos
5596 description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
5599 description: Amount of threads used by ffmpeg for 1 transcoding job
5602 description: Amount of transcoding jobs to execute in parallel
5608 New profiles can be added by plugins ; available in core PeerTube: 'default'.
5611 description: Resolutions to transcode _new videos_ to
5631 description: WebTorrent-specific settings
5637 description: HLS-specific settings
5681 $ref: '#/components/schemas/id'
5683 $ref: '#/components/schemas/Actor'
5685 $ref: '#/components/schemas/Actor'
5688 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
5701 PredefinedAbuseReasons:
5702 description: Reason categories that help triage reports
5720 $ref: '#/components/schemas/id'
5732 - activitypub-http-unicast
5733 - activitypub-http-broadcast
5734 - activitypub-http-fetcher
5735 - activitypub-follow
5741 - activitypub-refresher
5745 additionalProperties: true
5748 additionalProperties: true
5764 $ref: '#/components/schemas/id'
5769 $ref: '#/components/schemas/id'
5770 VideoUploadRequestCommon:
5773 description: Video name
5775 example: What is PeerTube?
5779 description: Channel id that will contain this video
5784 $ref: '#/components/schemas/VideoPrivacySet'
5786 $ref: '#/components/schemas/VideoCategorySet'
5788 $ref: '#/components/schemas/VideoLicenceSet'
5790 $ref: '#/components/schemas/VideoLanguageSet'
5792 description: Video description
5795 **[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)**
5797 description: Whether or not we wait transcoding before publish the video
5800 description: A text tell the audience how to support the video creator
5801 example: Please support our work on https://soutenir.framasoft.org/en/ <3
5804 description: Whether or not this video contains sensitive content
5807 description: Video tags (maximum 5 tags each between 2 and 30 characters)
5820 description: Enable or disable comments for this video
5823 description: Enable or disable downloading for this video
5825 originallyPublishedAt:
5826 description: Date when the content was originally published
5830 $ref: '#/components/schemas/VideoScheduledUpdate'
5832 description: Video thumbnail file
5836 description: Video preview file
5842 VideoUploadRequestLegacy:
5844 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5850 description: Video file
5853 VideoUploadRequestResumable:
5855 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5861 description: Video filename including extension
5864 example: what_is_peertube.mp4
5866 description: Video thumbnail file
5870 description: Video preview file
5873 VideoUploadResponse:
5879 $ref: '#/components/schemas/Video/properties/id'
5881 $ref: '#/components/schemas/Video/properties/uuid'
5882 CommentThreadResponse:
5891 $ref: '#/components/schemas/VideoComment'
5892 CommentThreadPostResponse:
5895 $ref: '#/components/schemas/VideoComment'
5905 $ref: '#/components/schemas/Video'
5909 $ref: '#/components/schemas/Account'
5912 description: Automatically start playing the upcoming video after the currently playing video
5913 autoPlayNextVideoPlaylist:
5915 description: Automatically start playing the video on the playlist after the currently playing video
5918 description: Automatically start playing the video on the watch page
5928 description: The user email
5931 description: Has the user confirmed their email address?
5934 - $ref: '#/components/schemas/id'
5938 description: Auth plugin to use to authenticate the user
5942 noInstanceConfigWarningModal:
5947 $ref: '#/components/schemas/NSFWPolicy'
5949 $ref: '#/components/schemas/UserRole'
5958 description: Theme enabled by this user
5960 $ref: '#/components/schemas/username'
5964 $ref: '#/components/schemas/VideoChannel'
5967 description: The user video quota in bytes
5971 description: The user daily video quota in bytes
5975 description: Enable P2P in the player
5978 - $ref: '#/components/schemas/User'
5980 # optionally present fields: they require WITH_STATS scope
5983 description: Count of videos published
5986 description: Count of reports/abuses of which the user is a target
5987 abusesAcceptedCount:
5989 description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team
5992 description: Count of reports/abuses created by the user
5995 description: Count of comments published
5999 $ref: '#/components/schemas/username'
6001 $ref: '#/components/schemas/password'
6005 description: The user email
6008 description: The user video quota in bytes
6012 description: The user daily video quota in bytes
6015 $ref: '#/components/schemas/usernameChannel'
6017 $ref: '#/components/schemas/UserRole'
6019 $ref: '#/components/schemas/UserAdminFlags'
6030 description: The updated email of the user
6032 - $ref: '#/components/schemas/User/properties/email'
6035 description: Set the email as verified
6038 description: The updated video quota of the user in bytes
6041 description: The updated daily video quota of the user in bytes
6045 description: The auth plugin to use to authenticate the user
6046 example: 'peertube-plugin-auth-saml2'
6048 $ref: '#/components/schemas/UserRole'
6050 $ref: '#/components/schemas/UserAdminFlags'
6052 # see shared/models/users/user-update-me.model.ts:
6055 $ref: '#/components/schemas/password'
6057 $ref: '#/components/schemas/password'
6059 description: new email used for login and service communications
6061 - $ref: '#/components/schemas/User/properties/email'
6064 description: new name of the user in its representations
6069 description: new NSFW display policy
6076 description: whether to enable P2P in the player or not
6079 description: new preference regarding playing videos automatically
6082 description: new preference regarding playing following videos automatically
6083 autoPlayNextVideoPlaylist:
6085 description: new preference regarding playing following playlist videos automatically
6086 videosHistoryEnabled:
6088 description: whether to keep track of watched history or not
6093 description: list of languages to filter videos down to
6096 noInstanceConfigWarningModal:
6103 $ref: '#/components/schemas/id'
6110 description: Rating of the video
6117 $ref: '#/components/schemas/Video'
6124 description: Rating of the video
6131 description: immutable name of the user, used to find or mention its actor
6133 - $ref: '#/components/schemas/username'
6135 $ref: '#/components/schemas/password'
6139 description: email of the user, used for login or service communications
6142 description: editable name of the user, displayed in its representations
6147 description: channel base information used to create the first channel of the user
6150 $ref: '#/components/schemas/usernameChannel'
6152 $ref: '#/components/schemas/VideoChannel/properties/displayName'
6162 pattern: /^[a-z0-9]$/
6165 example: v1ikx5hnfop4mdpnci8nsqh93c45rldf
6168 pattern: /^[a-zA-Z0-9]$/
6171 example: AjWiOapPltI6EnsWQwlFarRtLh4u8tDt
6172 OAuthToken-password:
6174 - $ref: '#/components/schemas/OAuthClient'
6184 $ref: '#/components/schemas/User/properties/username'
6186 $ref: '#/components/schemas/password'
6193 OAuthToken-refresh_token:
6195 - $ref: '#/components/schemas/OAuthClient'
6206 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
6215 # GET/POST/PUT properties
6218 description: editable name of the channel, displayed in its representations
6219 example: Videos of Framasoft
6224 example: Videos made with <3 by Framasoft
6229 description: text shown by default on all videos of this channel, to tell the audience how to support it
6230 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6233 # GET-only properties
6237 - $ref: '#/components/schemas/id'
6253 $ref: '#/components/schemas/UUIDv4'
6256 - $ref: '#/components/schemas/VideoChannel'
6259 description: username of the channel to create
6261 - $ref: '#/components/schemas/usernameChannel'
6267 - $ref: '#/components/schemas/VideoChannel'
6269 bulkVideosSupportUpdate:
6271 description: Update the support field for all videos of this channel
6281 - $ref: '#/components/schemas/VideoChannel'
6282 - $ref: '#/components/schemas/Actor'
6287 name: 'media:peerLink'
6296 - application/x-bittorrent
6302 name: 'media:content'
6333 VideoCommentsForXML:
6368 description: video watch page URL
6371 description: video canonical URL
6375 description: video publication date
6378 description: video description
6381 description: video description
6384 description: publisher user name
6387 description: video category (MRSS)
6390 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
6405 description: video embed path, relative to the canonical URL domain (MRSS)
6414 description: video watch path, relative to the canonical URL domain (MRSS)
6435 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
6436 'media:description':
6443 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
6446 description: main streamable file for the video
6456 - application/x-bittorrent
6465 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)
6468 - $ref: '#/components/schemas/MRSSPeerLink'
6469 - $ref: '#/components/schemas/MRSSGroupContent'
6470 NotificationSettingValue:
6487 $ref: '#/components/schemas/id'
6491 Notification type, following the `UserNotificationType` enum:
6493 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
6495 - `2` NEW_COMMENT_ON_MY_VIDEO
6497 - `3` NEW_ABUSE_FOR_MODERATORS
6499 - `4` BLACKLIST_ON_MY_VIDEO
6501 - `5` UNBLACKLIST_ON_MY_VIDEO
6503 - `6` MY_VIDEO_PUBLISHED
6505 - `7` MY_VIDEO_IMPORT_SUCCESS
6507 - `8` MY_VIDEO_IMPORT_ERROR
6509 - `9` NEW_USER_REGISTRATION
6513 - `11` COMMENT_MENTION
6515 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
6517 - `13` NEW_INSTANCE_FOLLOWER
6519 - `14` AUTO_INSTANCE_FOLLOWING
6525 - $ref: '#/components/schemas/VideoInfo'
6529 $ref: '#/components/schemas/ActorInfo'
6535 $ref: '#/components/schemas/id'
6538 $ref: '#/components/schemas/VideoInfo'
6543 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
6553 $ref: '#/components/schemas/id'
6557 $ref: '#/components/schemas/VideoInfo'
6559 $ref: '#/components/schemas/ActorInfo'
6565 $ref: '#/components/schemas/id'
6568 - $ref: '#/components/schemas/VideoInfo'
6574 $ref: '#/components/schemas/id'
6577 - $ref: '#/components/schemas/VideoInfo'
6581 - $ref: '#/components/schemas/ActorInfo'
6587 $ref: '#/components/schemas/id'
6589 $ref: '#/components/schemas/ActorInfo'
6617 NotificationListResponse:
6626 $ref: '#/components/schemas/Notification'
6631 example: peertube-plugin-auth-ldap
6659 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
6662 additionalProperties: true
6678 $ref: '#/components/schemas/Plugin'
6685 description: User can stream multiple times in a permanent live
6694 description: RTMP stream key to use to stream into this live video
6698 description: User can stream multiple times in a permanent live
6705 'https://search.example.org/api/v1/search/videos':
6707 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
6710 description: successful operation
6714 $ref: '#/components/schemas/VideoListResponse'