6 name: PeerTube Community
7 url: https://joinpeertube.org
10 url: https://github.com/Chocobozzz/PeerTube/blob/master/LICENSE
12 url: https://joinpeertube.org/img/brand.png
13 altText: PeerTube Project Homepage
15 The PeerTube API is built on HTTP(S) and is RESTful. You can use your favorite
16 HTTP/REST library for your programming language to use PeerTube. The spec API is fully compatible with
17 [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO)
18 which generates a client SDK in the language of your choice - we generate some client SDKs automatically:
20 - [Python](https://framagit.org/framasoft/peertube/clients/python)
21 - [Go](https://framagit.org/framasoft/peertube/clients/go)
22 - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin)
24 See the [REST API quick start](https://docs.joinpeertube.org/api/rest-getting-started) for a few
25 examples of using the PeerTube API.
29 When you sign up for an account on a PeerTube instance, you are given the possibility
30 to generate sessions on it, and authenticate there using an access token. Only __one
31 access token can currently be used at a time__.
35 Accounts are given permissions based on their role. There are three roles on
36 PeerTube: Administrator, Moderator, and User. See the [roles guide](https://docs.joinpeertube.org/admin/managing-users#roles) for a detail of their permissions.
40 The API uses standard HTTP status codes to indicate the success or failure
41 of the API call, completed by a [RFC7807-compliant](https://tools.ietf.org/html/rfc7807) response body.
44 HTTP 1.1 404 Not Found
45 Content-Type: application/problem+json; charset=utf-8
48 "detail": "Video not found",
49 "docs": "https://docs.joinpeertube.org/api/rest-reference.html#operation/getVideo",
56 We provide error `type` values for [a growing number of cases](https://github.com/Chocobozzz/PeerTube/blob/develop/shared/models/server/server-error-code.enum.ts),
57 but it is still optional. Types are used to disambiguate errors that bear the same status code
61 HTTP 1.1 403 Forbidden
62 Content-Type: application/problem+json; charset=utf-8
65 "detail": "Cannot get this video regarding follow constraints",
66 "docs": "https://docs.joinpeertube.org/api/rest-reference.html#operation/getVideo",
69 "type": "https://docs.joinpeertube.org/api/rest-reference.html#section/Errors/does_not_respect_follow_constraints"
73 Here a 403 error could otherwise mean that the video is private or blocklisted.
77 Each parameter is evaluated on its own against a set of rules before the route validator
78 proceeds with potential testing involving parameter combinations. Errors coming from validation
79 errors appear earlier and benefit from a more detailed error description:
82 HTTP 1.1 400 Bad Request
83 Content-Type: application/problem+json; charset=utf-8
86 "detail": "Incorrect request parameters: id",
87 "docs": "https://docs.joinpeertube.org/api/rest-reference.html#operation/getVideo",
88 "instance": "/api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180",
92 "msg": "Invalid value",
94 "value": "9c9de5e8-0a1e-484a-b099-e80766180"
98 "title": "Bad Request",
103 Where `id` is the name of the field concerned by the error, within the route definition.
104 `invalid-params.<field>.location` can be either 'params', 'body', 'header', 'query' or 'cookies', and
105 `invalid-params.<field>.value` reports the value that didn't pass validation whose `invalid-params.<field>.msg`
108 ### Deprecated error fields
110 Some fields could be included with previous versions. They are still included but their use is deprecated:
111 - `error`: superseded by `detail`
112 - `code`: superseded by `type` (which is now an URI)
116 We are rate-limiting all endpoints of PeerTube's API. Custom values can be set by administrators:
118 | Endpoint (prefix: `/api/v1`) | Calls | Time frame |
119 |------------------------------|---------------|--------------|
120 | `/*` | 50 | 10 seconds |
121 | `POST /users/token` | 15 | 5 minutes |
122 | `POST /users/register` | 2<sup>*</sup> | 5 minutes |
123 | `POST /users/ask-send-verify-email` | 3 | 5 minutes |
125 Depending on the endpoint, <sup>*</sup>failed requests are not taken into account. A service
126 limit is announced by a `429 Too Many Requests` status code.
128 You can get details about the current state of your rate limit by reading the
131 | Header | Description |
132 |-------------------------|------------------------------------------------------------|
133 | `X-RateLimit-Limit` | Number of max requests allowed in the current time period |
134 | `X-RateLimit-Remaining` | Number of remaining requests in the current time period |
135 | `X-RateLimit-Reset` | Timestamp of end of current time period as UNIX timestamp |
136 | `Retry-After` | Seconds to delay after the first `429` is received |
140 This API features [Cross-Origin Resource Sharing (CORS)](https://fetch.spec.whatwg.org/),
141 allowing cross-domain communication from the browser for some routes:
144 |------------------------- ---|
148 | `/.well-known/webfinger` |
150 In addition, all routes serving ActivityPub are CORS-enabled for all origins.
152 url: https://docs.joinpeertube.org/api/rest-reference.html
156 As a visitor, you can use this API to open an account (if registrations are open on
157 that PeerTube instance). As an admin, you should use the dedicated [User creation
158 API](#operation/addUser) instead.
160 x-displayName: Login/Logout
162 Sessions deal with access tokens over time. Only __one session token can currently be used at a time__.
165 Accounts encompass remote accounts discovered across the federation,
166 and correspond to the main Actor, along with video channels a user can create, which
169 When a comment is posted, it is done with your Account's Actor.
172 Using some features of PeerTube require authentication, for which User
173 provide different levels of permission as well as associated user
174 information. Each user has a corresponding local Account for federation.
177 Operations related to your own User, when logged-in.
178 - name: My Subscriptions
180 Operations related to your subscriptions to video channels, their
181 new videos, and how to keep up to date with their latest publications!
184 Operations related to your watch history.
185 - name: My Notifications
187 Notifications following new videos, follows or reports. They allow you
188 to keep track of the interactions and overall important information that
189 concerns you. You MAY set per-notification type delivery preference, to
190 receive the info either by mail, by in-browser notification or both.
193 Each server exposes public information regarding supported videos and
197 Jobs are long-running tasks enqueued and processed by the instance
198 itself. No additional worker registration is currently available.
199 - name: Instance Follows
201 Managing servers which the instance interacts with is crucial to the
202 concept of federation in PeerTube and external video indexation. The PeerTube
203 server then deals with inter-server ActivityPub operations and propagates
204 information across its social graph by posting activities to actors' inbox
207 url: https://docs.joinpeertube.org/admin/following-instances#instances-follows
208 - name: Instance Redundancy
210 Redundancy is part of the inter-server solidarity that PeerTube fosters.
211 Manage the list of instances you wish to help by seeding their videos according
212 to the policy of video selection of your choice. Note that you have a similar functionality
213 to mirror individual videos, see [video mirroring](#tag/Video-Mirroring).
215 url: https://docs.joinpeertube.org/admin/following-instances#instances-redundancy
218 Managing plugins installed from a local path or from NPM, or search for new ones.
220 url: https://docs.joinpeertube.org/api/plugins
223 Abuses deal with reports of local or remote videos/comments/accounts alike.
226 Operations dealing with listing, uploading, fetching or modifying videos.
229 Operations dealing with adding video or audio. PeerTube supports two upload modes, and three import modes.
233 - [_legacy_](#operation/uploadLegacy), where the video file is sent in a single request
234 - [_resumable_](#operation/uploadResumableInit), where the video file is sent in chunks
236 You can upload videos more reliably by using the resumable variant. Its protocol lets
237 you resume an upload operation after a network interruption or other transmission failure,
238 saving time and bandwidth in the event of network failures.
240 Favor using resumable uploads in any of the following cases:
241 - You are transferring large files
242 - The likelihood of a network interruption is high
243 - Uploads are originating from a device with a low-bandwidth or unstable Internet connection,
244 such as a mobile device
248 - _URL_-based: where the URL points to any service supported by [youtube-dl](https://ytdl-org.github.io/youtube-dl/)
249 - _magnet_-based: where the URI resolves to a BitTorrent resource containing a single supported video file
250 - _torrent_-based: where the metainfo file resolves to a BitTorrent resource containing a single supported video file
252 The import function is practical when the desired video/audio is available online. It makes PeerTube
253 download it for you, saving you as much bandwidth and avoiding any instability or limitation your network might have.
254 - name: Video Imports
255 description: Operations dealing with listing, adding and removing video imports.
256 - name: Channels Sync
257 description: Operations dealing with synchronizing PeerTube user's channel with channels of other platforms
258 - name: Video Captions
259 description: Operations dealing with listing, adding and removing closed captions of a video.
260 - name: Video Channels
261 description: Operations dealing with the creation, modification and listing of videos within a channel.
262 - name: Video Comments
264 Operations dealing with comments to a video. Comments are organized in threads: adding a
265 comment in response to the video starts a thread, adding a reply to a comment adds it to
266 its root comment thread.
268 description: Operations dealing with blocking videos (removing them from view and preventing interactions).
270 description: Like/dislike a video.
271 - name: Video Playlists
272 description: Operations dealing with playlists of videos. Playlists are bound to users and/or channels.
274 description: Operations on video files
275 - name: Video Transcoding
276 description: Video transcoding related operations
278 description: Video statistics
280 description: Server syndication feeds of videos
283 The search helps to find _videos_ or _channels_ from within the instance and beyond.
284 Videos from other instances federated by the instance (that is, instances
285 followed by the instance) can be found via keywords and other criteria of
288 Administrators can also enable the use of a remote search system, indexing
289 videos and channels not could be not federated by the instance.
291 description: Get and update the custom homepage
292 - name: Video Mirroring
294 PeerTube instances can mirror videos from one another, and help distribute some videos.
296 For importing videos as your own, refer to [video imports](#operation/importVideo).
302 - name: Static endpoints
331 - Video Ownership Change
351 - Instance Redundancy
357 '/static/webseed/{filename}':
361 summary: Get public WebTorrent video file
363 - $ref: '#/components/parameters/staticFilename'
366 description: successful operation
368 description: not found
369 '/static/webseed/private/{filename}':
373 summary: Get private WebTorrent video file
375 - $ref: '#/components/parameters/staticFilename'
376 - $ref: '#/components/parameters/videoFileToken'
381 description: successful operation
383 description: invalid auth
385 description: not found
387 '/static/streaming-playlists/hls/{filename}':
391 summary: Get public HLS video file
393 - $ref: '#/components/parameters/staticFilename'
398 description: successful operation
400 description: invalid auth
402 description: not found
403 '/static/streaming-playlists/hls/private/{filename}':
407 summary: Get private HLS video file
409 - $ref: '#/components/parameters/staticFilename'
410 - $ref: '#/components/parameters/videoFileToken'
411 - $ref: '#/components/parameters/reinjectVideoFileToken'
416 description: successful operation
418 description: invalid auth
420 description: not found
423 '/feeds/video-comments.{format}':
427 summary: List comments on videos
428 operationId: getSyndicatedComments
433 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
446 description: 'limit listing to a specific video'
451 description: 'limit listing to a specific account'
456 description: 'limit listing to a specific account'
459 - name: videoChannelId
461 description: 'limit listing to a specific video channel'
464 - name: videoChannelName
466 description: 'limit listing to a specific video channel'
471 description: successful operation
476 default: 'max-age=900' # 15 min cache
480 $ref: '#/components/schemas/VideoCommentsForXML'
483 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
486 $ref: '#/components/schemas/VideoCommentsForXML'
489 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
492 $ref: '#/components/schemas/VideoCommentsForXML'
495 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
496 application/atom+xml:
498 $ref: '#/components/schemas/VideoCommentsForXML'
501 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
507 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
509 x-summary: field inconsistencies
512 - videoId filter is mixed with a channel filter
514 description: video, video channel or account not found
516 description: accept header unsupported
518 '/feeds/videos.{format}':
523 operationId: getSyndicatedVideos
528 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
541 description: 'limit listing to a specific account'
546 description: 'limit listing to a specific account'
549 - name: videoChannelId
551 description: 'limit listing to a specific video channel'
554 - name: videoChannelName
556 description: 'limit listing to a specific video channel'
559 - $ref: '#/components/parameters/sort'
560 - $ref: '#/components/parameters/nsfw'
561 - $ref: '#/components/parameters/isLocal'
562 - $ref: '#/components/parameters/include'
563 - $ref: '#/components/parameters/privacyOneOf'
564 - $ref: '#/components/parameters/hasHLSFiles'
565 - $ref: '#/components/parameters/hasWebtorrentFiles'
568 description: successful operation
573 default: 'max-age=900' # 15 min cache
577 $ref: '#/components/schemas/VideosForXML'
580 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
583 $ref: '#/components/schemas/VideosForXML'
586 externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
589 $ref: '#/components/schemas/VideosForXML'
592 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
593 application/atom+xml:
595 $ref: '#/components/schemas/VideosForXML'
598 externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
604 externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
606 description: video channel or account not found
608 description: accept header unsupported
610 '/feeds/subscriptions.{format}':
614 summary: List videos of subscriptions tied to a token
615 operationId: getSyndicatedSubscriptionVideos
620 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
633 description: limit listing to a specific account
639 description: private token allowing access
643 - $ref: '#/components/parameters/sort'
644 - $ref: '#/components/parameters/nsfw'
645 - $ref: '#/components/parameters/isLocal'
646 - $ref: '#/components/parameters/include'
647 - $ref: '#/components/parameters/privacyOneOf'
648 - $ref: '#/components/parameters/hasHLSFiles'
649 - $ref: '#/components/parameters/hasWebtorrentFiles'
652 description: successful operation
657 default: 'max-age=900' # 15 min cache
661 $ref: '#/components/schemas/VideosForXML'
664 $ref: '#/components/schemas/VideosForXML'
667 $ref: '#/components/schemas/VideosForXML'
668 application/atom+xml:
670 $ref: '#/components/schemas/VideosForXML'
675 description: accept header unsupported
677 '/api/v1/accounts/{name}':
681 summary: Get an account
682 operationId: getAccount
684 - $ref: '#/components/parameters/name'
687 description: successful operation
691 $ref: '#/components/schemas/Account'
693 description: account not found
695 '/api/v1/accounts/{name}/videos':
700 summary: 'List videos of an account'
701 operationId: getAccountVideos
703 - $ref: '#/components/parameters/name'
704 - $ref: '#/components/parameters/categoryOneOf'
705 - $ref: '#/components/parameters/isLive'
706 - $ref: '#/components/parameters/tagsOneOf'
707 - $ref: '#/components/parameters/tagsAllOf'
708 - $ref: '#/components/parameters/licenceOneOf'
709 - $ref: '#/components/parameters/languageOneOf'
710 - $ref: '#/components/parameters/nsfw'
711 - $ref: '#/components/parameters/isLocal'
712 - $ref: '#/components/parameters/include'
713 - $ref: '#/components/parameters/privacyOneOf'
714 - $ref: '#/components/parameters/hasHLSFiles'
715 - $ref: '#/components/parameters/hasWebtorrentFiles'
716 - $ref: '#/components/parameters/skipCount'
717 - $ref: '#/components/parameters/start'
718 - $ref: '#/components/parameters/count'
719 - $ref: '#/components/parameters/videosSort'
722 description: successful operation
726 $ref: '#/components/schemas/VideoListResponse'
730 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
731 .then(function(response) {
732 return response.json()
733 }).then(function(data) {
739 curl -s https://peertube2.cpy.re/api/v1/accounts/{name}/videos | jq
745 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
747 http = Net::HTTP.new(uri.host, uri.port)
750 response = http.get(uri.request_uri)
752 puts JSON.parse(response.read_body)
757 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
762 '/api/v1/accounts/{name}/followers':
766 summary: 'List followers of an account'
769 operationId: getAccountFollowers
771 - $ref: '#/components/parameters/name'
772 - $ref: '#/components/parameters/start'
773 - $ref: '#/components/parameters/count'
774 - $ref: '#/components/parameters/followersSort'
775 - $ref: '#/components/parameters/search'
778 description: successful operation
790 $ref: '#/components/schemas/Follow'
796 summary: List accounts
797 operationId: getAccounts
799 - $ref: '#/components/parameters/start'
800 - $ref: '#/components/parameters/count'
801 - $ref: '#/components/parameters/sort'
804 description: successful operation
810 $ref: '#/components/schemas/Account'
816 summary: Get instance public configuration
817 operationId: getConfig
820 description: successful operation
824 $ref: '#/components/schemas/ServerConfig'
827 externalValue: https://peertube2.cpy.re/api/v1/config
829 /api/v1/config/about:
831 summary: Get instance "About" information
832 operationId: getAbout
837 description: successful operation
841 $ref: '#/components/schemas/ServerConfigAbout'
844 externalValue: https://peertube2.cpy.re/api/v1/config/about
846 /api/v1/config/custom:
848 summary: Get instance runtime configuration
849 operationId: getCustomConfig
857 description: successful operation
861 $ref: '#/components/schemas/ServerConfigCustom'
863 summary: Set instance runtime configuration
864 operationId: putCustomConfig
872 description: successful operation
874 x-summary: field inconsistencies
877 - the emailer is disabled and the instance is open to registrations
878 - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
880 summary: Delete instance runtime configuration
881 operationId: delCustomConfig
889 description: successful operation
891 /api/v1/custom-pages/homepage/instance:
893 summary: Get instance custom homepage
898 description: No homepage set
900 description: successful operation
904 $ref: '#/components/schemas/CustomHomepage'
906 summary: Set instance custom homepage
920 description: content of the homepage, that will be injected in the client
923 description: successful operation
927 summary: Pause job queue
935 description: successful operation
939 summary: Resume job queue
947 description: successful operation
949 /api/v1/jobs/{state}:
951 summary: List instance jobs
962 description: The state of the job ('' for for no filter)
972 - $ref: '#/components/parameters/jobType'
973 - $ref: '#/components/parameters/start'
974 - $ref: '#/components/parameters/count'
975 - $ref: '#/components/parameters/sort'
978 description: successful operation
991 $ref: '#/components/schemas/Job'
993 /api/v1/server/followers:
997 summary: List instances following the server
999 - $ref: '#/components/parameters/followState'
1000 - $ref: '#/components/parameters/actorType'
1001 - $ref: '#/components/parameters/start'
1002 - $ref: '#/components/parameters/count'
1003 - $ref: '#/components/parameters/sort'
1006 description: successful operation
1018 $ref: '#/components/schemas/Follow'
1020 '/api/v1/server/followers/{nameWithHost}':
1022 summary: Remove or reject a follower to your server
1029 - name: nameWithHost
1032 description: The remote actor handle to remove from your followers
1038 description: successful operation
1040 description: follower not found
1042 '/api/v1/server/followers/{nameWithHost}/reject':
1044 summary: Reject a pending follower to your server
1051 - name: nameWithHost
1054 description: The remote actor handle to remove from your followers
1060 description: successful operation
1062 description: follower not found
1064 '/api/v1/server/followers/{nameWithHost}/accept':
1066 summary: Accept a pending follower to your server
1073 - name: nameWithHost
1076 description: The remote actor handle to remove from your followers
1082 description: successful operation
1084 description: follower not found
1086 /api/v1/server/following:
1090 summary: List instances followed by the server
1092 - $ref: '#/components/parameters/followState'
1093 - $ref: '#/components/parameters/actorType'
1094 - $ref: '#/components/parameters/start'
1095 - $ref: '#/components/parameters/count'
1096 - $ref: '#/components/parameters/sort'
1099 description: successful operation
1111 $ref: '#/components/schemas/Follow'
1118 summary: Follow a list of actors (PeerTube instance, channel or account)
1121 description: successful operation
1123 description: cannot follow a non-HTTPS server
1142 '/api/v1/server/following/{hostOrHandle}':
1144 summary: Unfollow an actor (PeerTube instance, channel or account)
1151 - name: hostOrHandle
1154 description: The hostOrHandle to unfollow
1159 description: successful operation
1161 description: host or handle not found
1165 summary: Create a user
1166 operationId: addUser
1174 description: user created
1178 $ref: '#/components/schemas/AddUserResponse'
1182 operationId: getUser
1184 id: '$response.body#/user/id'
1187 operationId: putUser
1189 id: '$response.body#/user/id'
1190 # DELETE /users/{id}
1192 operationId: delUser
1194 id: '$response.body#/user/id'
1196 description: insufficient authority to create an admin or moderator
1201 $ref: '#/components/schemas/AddUser'
1203 If the smtp server is configured, you can leave the password empty and an email will be sent
1204 asking the user to set it first.
1208 operationId: getUsers
1215 - $ref: '#/components/parameters/usersSearch'
1216 - $ref: '#/components/parameters/usersBlocked'
1217 - $ref: '#/components/parameters/start'
1218 - $ref: '#/components/parameters/count'
1219 - $ref: '#/components/parameters/usersSort'
1222 description: successful operation
1228 $ref: '#/components/schemas/User'
1230 '/api/v1/users/{id}':
1232 - $ref: '#/components/parameters/id'
1234 summary: Delete a user
1240 operationId: delUser
1243 description: successful operation
1250 operationId: getUser
1254 description: include statistics about the user (only available as a moderator/admin)
1259 x-summary: successful operation
1261 As an admin/moderator, you can request a response augmented with statistics about the user's
1262 moderation relations and videos usage, by using the `withStats` parameter.
1267 - $ref: '#/components/schemas/User'
1268 - $ref: '#/components/schemas/UserWithStats'
1270 summary: Update a user
1275 operationId: putUser
1278 description: successful operation
1283 $ref: '#/components/schemas/UpdateUser'
1286 /api/v1/oauth-clients/local:
1288 summary: Login prerequisite
1289 description: You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken).
1290 operationId: getOAuthClient
1295 description: successful operation
1299 $ref: '#/components/schemas/OAuthClient'
1301 UseOAuthClientToLogin:
1302 operationId: getOAuthToken
1304 client_id: '$response.body#/client_id'
1305 client_secret: '$response.body#/client_secret'
1309 API="https://peertube2.cpy.re/api/v1"
1312 curl -s "$API/oauth-clients/local"
1314 /api/v1/users/token:
1317 operationId: getOAuthToken
1318 description: With your [client id and secret](#operation/getOAuthClient), you can retrieve an access and refresh tokens.
1323 application/x-www-form-urlencoded:
1326 - $ref: '#/components/schemas/OAuthToken-password'
1327 - $ref: '#/components/schemas/OAuthToken-refresh_token'
1329 propertyName: grant_type
1331 password: '#/components/schemas/OAuthToken-password'
1332 refresh_token: '#/components/schemas/OAuthToken-refresh_token'
1335 description: successful operation
1346 example: 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0
1347 description: valid for 1 day
1350 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
1351 description: valid for 2 weeks
1356 refresh_token_expires_in:
1361 x-summary: client or credentials are invalid
1363 Disambiguate via `type`:
1364 - `invalid_client` for an unmatched `client_id`
1365 - `invalid_grant` for unmatched credentials
1367 x-summary: token expired
1369 Disambiguate via `type`:
1370 - default value for a regular authentication failure
1371 - `invalid_token` for an expired token
1376 API="https://peertube2.cpy.re/api/v1"
1377 USERNAME="<your_username>"
1378 PASSWORD="<your_password>"
1381 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
1382 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
1383 curl -s "$API/users/token" \
1384 --data client_id="$client_id" \
1385 --data client_secret="$client_secret" \
1386 --data grant_type=password \
1387 --data username="$USERNAME" \
1388 --data password="$PASSWORD" \
1389 | jq -r ".access_token"
1391 /api/v1/users/revoke-token:
1394 description: Revokes your access token and its associated refresh token, destroying your current session.
1395 operationId: revokeOAuthToken
1402 description: successful operation
1404 /api/v1/users/ask-send-verify-email:
1406 summary: Resend user verification link
1407 operationId: resendEmailToVerifyUser
1419 description: User email
1424 description: successful operation
1426 /api/v1/users/registrations/ask-send-verify-email:
1428 summary: Resend verification link to registration email
1429 operationId: resendEmailToVerifyRegistration
1440 description: Registration email
1445 description: successful operation
1447 /api/v1/users/{id}/verify-email:
1449 summary: Verify a user
1450 operationId: verifyUser
1452 Following a user registration, the new user will receive an email asking to click a link
1453 containing a secret.
1454 This endpoint can also be used to verify a new email set in the user account.
1459 - $ref: '#/components/parameters/id'
1472 - verificationString
1475 description: successful operation
1477 description: invalid verification string
1479 description: user not found
1481 /api/v1/users/registrations/{registrationId}/verify-email:
1483 summary: Verify a registration email
1484 operationId: verifyRegistrationEmail
1486 Following a user registration request, the user will receive an email asking to click a link
1487 containing a secret.
1491 - $ref: '#/components/parameters/registrationId'
1502 - verificationString
1505 description: successful operation
1507 description: invalid verification string
1509 description: registration not found
1511 /api/v1/users/{id}/two-factor/request:
1513 summary: Request two factor auth
1514 operationId: requestTwoFactor
1515 description: Request two factor authentication for a user
1519 - $ref: '#/components/parameters/id'
1528 description: Password of the currently authenticated user
1531 description: successful operation
1537 $ref: '#/components/schemas/RequestTwoFactorResponse'
1539 description: invalid password
1541 description: user not found
1543 /api/v1/users/{id}/two-factor/confirm-request:
1545 summary: Confirm two factor auth
1546 operationId: confirmTwoFactorRequest
1547 description: Confirm a two factor authentication request
1551 - $ref: '#/components/parameters/id'
1560 description: Token to identify the two factor request
1563 description: OTP token generated by the app
1569 description: successful operation
1571 description: invalid request token or OTP token
1573 description: user not found
1575 /api/v1/users/{id}/two-factor/disable:
1577 summary: Disable two factor auth
1578 operationId: disableTwoFactor
1579 description: Disable two factor authentication of a user
1583 - $ref: '#/components/parameters/id'
1592 description: Password of the currently authenticated user
1595 description: successful operation
1597 description: invalid password
1599 description: user not found
1603 summary: Get my user information
1604 operationId: getUserInfo
1612 description: successful operation
1618 $ref: '#/components/schemas/User'
1620 summary: Update my user information
1621 operationId: putUserInfo
1629 description: successful operation
1634 $ref: '#/components/schemas/UpdateMe'
1637 /api/v1/users/me/videos/imports:
1639 summary: Get video imports of my user
1647 - $ref: '#/components/parameters/start'
1648 - $ref: '#/components/parameters/count'
1649 - $ref: '#/components/parameters/sort'
1654 description: Filter on import target URL
1658 name: videoChannelSyncId
1661 description: Filter on imports created by a specific channel synchronization
1668 description: Search in video names
1673 description: successful operation
1677 $ref: '#/components/schemas/VideoImportsList'
1679 /api/v1/users/me/video-quota-used:
1681 summary: Get my user used quota
1689 description: successful operation
1697 description: The user video quota used so far in bytes
1698 example: 16810141515
1699 videoQuotaUsedDaily:
1701 description: The user video quota used today in bytes
1704 '/api/v1/users/me/videos/{videoId}/rating':
1706 summary: Get rate of my user for a video
1716 description: The video id
1718 $ref: '#/components/schemas/Video/properties/id'
1721 description: successful operation
1725 $ref: '#/components/schemas/GetMeVideoRating'
1727 /api/v1/users/me/videos:
1729 summary: Get videos of my user
1737 - $ref: '#/components/parameters/start'
1738 - $ref: '#/components/parameters/count'
1739 - $ref: '#/components/parameters/sort'
1742 description: successful operation
1746 $ref: '#/components/schemas/VideoListResponse'
1748 /api/v1/users/me/subscriptions:
1750 summary: Get my user subscriptions
1757 - $ref: '#/components/parameters/start'
1758 - $ref: '#/components/parameters/count'
1759 - $ref: '#/components/parameters/sort'
1762 description: successful operation
1766 $ref: '#/components/schemas/VideoChannelList'
1770 summary: Add subscription to my user
1783 description: uri of the video channels to subscribe to
1789 uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr
1792 description: successful operation
1794 /api/v1/users/me/subscriptions/exist:
1796 summary: Get if subscriptions exist for my user
1803 - $ref: '#/components/parameters/subscriptionsUris'
1806 description: successful operation
1812 /api/v1/users/me/subscriptions/videos:
1814 summary: List videos of subscriptions of my user
1822 - $ref: '#/components/parameters/categoryOneOf'
1823 - $ref: '#/components/parameters/isLive'
1824 - $ref: '#/components/parameters/tagsOneOf'
1825 - $ref: '#/components/parameters/tagsAllOf'
1826 - $ref: '#/components/parameters/licenceOneOf'
1827 - $ref: '#/components/parameters/languageOneOf'
1828 - $ref: '#/components/parameters/nsfw'
1829 - $ref: '#/components/parameters/isLocal'
1830 - $ref: '#/components/parameters/include'
1831 - $ref: '#/components/parameters/privacyOneOf'
1832 - $ref: '#/components/parameters/hasHLSFiles'
1833 - $ref: '#/components/parameters/hasWebtorrentFiles'
1834 - $ref: '#/components/parameters/skipCount'
1835 - $ref: '#/components/parameters/start'
1836 - $ref: '#/components/parameters/count'
1837 - $ref: '#/components/parameters/videosSort'
1840 description: successful operation
1844 $ref: '#/components/schemas/VideoListResponse'
1846 '/api/v1/users/me/subscriptions/{subscriptionHandle}':
1848 summary: Get subscription of my user
1855 - $ref: '#/components/parameters/subscriptionHandle'
1858 description: successful operation
1862 $ref: '#/components/schemas/VideoChannel'
1864 summary: Delete subscription of my user
1871 - $ref: '#/components/parameters/subscriptionHandle'
1874 description: successful operation
1876 /api/v1/users/me/notifications:
1878 summary: List my notifications
1886 description: only list unread notifications
1889 - $ref: '#/components/parameters/start'
1890 - $ref: '#/components/parameters/count'
1891 - $ref: '#/components/parameters/sort'
1894 description: successful operation
1898 $ref: '#/components/schemas/NotificationListResponse'
1900 /api/v1/users/me/notifications/read:
1902 summary: Mark notifications as read by their id
1915 description: ids of the notifications to mark as read
1922 description: successful operation
1924 /api/v1/users/me/notifications/read-all:
1926 summary: Mark all my notification as read
1933 description: successful operation
1935 /api/v1/users/me/notification-settings:
1937 summary: Update my notification settings
1948 newVideoFromSubscription:
1949 $ref: '#/components/schemas/NotificationSettingValue'
1950 newCommentOnMyVideo:
1951 $ref: '#/components/schemas/NotificationSettingValue'
1953 $ref: '#/components/schemas/NotificationSettingValue'
1954 videoAutoBlacklistAsModerator:
1955 $ref: '#/components/schemas/NotificationSettingValue'
1957 $ref: '#/components/schemas/NotificationSettingValue'
1959 $ref: '#/components/schemas/NotificationSettingValue'
1960 myVideoImportFinished:
1961 $ref: '#/components/schemas/NotificationSettingValue'
1963 $ref: '#/components/schemas/NotificationSettingValue'
1964 newUserRegistration:
1965 $ref: '#/components/schemas/NotificationSettingValue'
1967 $ref: '#/components/schemas/NotificationSettingValue'
1968 newInstanceFollower:
1969 $ref: '#/components/schemas/NotificationSettingValue'
1970 autoInstanceFollowing:
1971 $ref: '#/components/schemas/NotificationSettingValue'
1974 description: successful operation
1976 /api/v1/users/me/history/videos:
1978 summary: List watched videos history
1984 - $ref: '#/components/parameters/start'
1985 - $ref: '#/components/parameters/count'
1986 - $ref: '#/components/parameters/search'
1989 description: successful operation
1993 $ref: '#/components/schemas/VideoListResponse'
1995 /api/v1/users/me/history/videos/{videoId}:
1997 summary: Delete history element
2007 $ref: '#/components/schemas/Video/properties/id'
2010 description: successful operation
2012 /api/v1/users/me/history/videos/remove:
2014 summary: Clear video history
2021 multipart/form-data:
2026 description: history before this date will be deleted
2031 description: successful operation
2033 /api/v1/users/me/avatar/pick:
2035 summary: Update my user avatar
2042 description: successful operation
2051 $ref: '#/components/schemas/ActorImage'
2053 description: image file too large
2055 X-File-Maximum-Size:
2059 description: Maximum file size for the avatar
2062 multipart/form-data:
2067 description: The file to upload
2072 contentType: image/png, image/jpeg
2074 /api/v1/users/me/avatar:
2076 summary: Delete my avatar
2083 description: successful operation
2085 /api/v1/users/register:
2087 summary: Register a user
2088 operationId: registerUser
2089 description: Signup has to be enabled and signup approval is not required
2094 description: successful operation
2096 description: request error
2098 description: user registration is not enabled, user limit is reached, registration is not allowed for the ip, requires approval or blocked by a plugin
2100 description: 'a user with this username, channel name or email already exists'
2105 $ref: '#/components/schemas/RegisterUser'
2108 /api/v1/users/registrations/request:
2110 summary: Request registration
2111 description: Signup has to be enabled and require approval on the instance
2112 operationId: requestRegistration
2117 description: successful operation
2121 $ref: '#/components/schemas/UserRegistration'
2123 description: request error or signup approval is not enabled on the instance
2125 description: user registration is not enabled, user limit is reached, registration is not allowed for the ip or blocked by a plugin
2127 description: 'a user or registration with this username, channel name or email already exists'
2132 $ref: '#/components/schemas/UserRegistrationRequest'
2134 /api/v1/users/registrations/{registrationId}/accept:
2140 summary: Accept registration
2141 operationId: acceptRegistration
2145 - $ref: '#/components/parameters/registrationId'
2150 $ref: '#/components/schemas/UserRegistrationAcceptOrReject'
2153 description: successful operation
2155 /api/v1/users/registrations/{registrationId}/reject:
2161 summary: Reject registration
2162 operationId: rejectRegistration
2166 - $ref: '#/components/parameters/registrationId'
2171 $ref: '#/components/schemas/UserRegistrationAcceptOrReject'
2174 description: successful operation
2176 /api/v1/users/registrations/{registrationId}:
2182 summary: Delete registration
2183 description: 'Delete the registration entry. It will not remove the user associated with this registration (if any)'
2184 operationId: deleteRegistration
2188 - $ref: '#/components/parameters/registrationId'
2191 description: successful operation
2193 /api/v1/users/registrations:
2199 summary: List registrations
2200 operationId: listRegistrations
2204 - $ref: '#/components/parameters/start'
2205 - $ref: '#/components/parameters/count'
2223 description: successful operation
2235 $ref: '#/components/schemas/UserRegistration'
2237 /api/v1/videos/ownership:
2239 summary: List video ownership changes
2241 - Video Ownership Change
2246 description: successful operation
2248 '/api/v1/videos/ownership/{id}/accept':
2250 summary: Accept ownership change request
2252 - Video Ownership Change
2256 - $ref: '#/components/parameters/idOrUUID'
2259 description: successful operation
2261 description: cannot terminate an ownership change of another user
2263 description: video ownership change not found
2265 '/api/v1/videos/ownership/{id}/refuse':
2267 summary: Refuse ownership change request
2269 - Video Ownership Change
2273 - $ref: '#/components/parameters/idOrUUID'
2276 description: successful operation
2278 description: cannot terminate an ownership change of another user
2280 description: video ownership change not found
2282 '/api/v1/videos/{id}/give-ownership':
2284 summary: Request ownership change
2286 - Video Ownership Change
2290 - $ref: '#/components/parameters/idOrUUID'
2294 application/x-www-form-urlencoded:
2304 description: successful operation
2306 description: changing video ownership to a remote account is not supported yet
2308 description: video not found
2310 '/api/v1/videos/{id}/token':
2312 summary: Request video token
2313 operationId: requestVideoToken
2314 description: Request special tokens that expire quickly to use them in some context (like accessing private static files)
2320 - $ref: '#/components/parameters/idOrUUID'
2323 description: successful operation
2327 $ref: '#/components/schemas/VideoTokenResponse'
2329 description: incorrect parameters
2331 description: video not found
2333 /api/v1/videos/{id}/studio/edit:
2335 summary: Create a studio task
2339 description: Create a task to edit a video (cut, add intro/outro etc)
2343 - $ref: '#/components/parameters/idOrUUID'
2347 application/x-www-form-urlencoded:
2349 $ref: '#/components/schemas/VideoStudioCreateTask'
2352 description: successful operation
2354 description: incorrect parameters
2356 description: video not found
2360 summary: List videos
2361 operationId: getVideos
2365 - $ref: '#/components/parameters/categoryOneOf'
2366 - $ref: '#/components/parameters/isLive'
2367 - $ref: '#/components/parameters/tagsOneOf'
2368 - $ref: '#/components/parameters/tagsAllOf'
2369 - $ref: '#/components/parameters/licenceOneOf'
2370 - $ref: '#/components/parameters/languageOneOf'
2371 - $ref: '#/components/parameters/nsfw'
2372 - $ref: '#/components/parameters/isLocal'
2373 - $ref: '#/components/parameters/include'
2374 - $ref: '#/components/parameters/privacyOneOf'
2375 - $ref: '#/components/parameters/hasHLSFiles'
2376 - $ref: '#/components/parameters/hasWebtorrentFiles'
2377 - $ref: '#/components/parameters/skipCount'
2378 - $ref: '#/components/parameters/start'
2379 - $ref: '#/components/parameters/count'
2380 - $ref: '#/components/parameters/videosSort'
2383 description: successful operation
2387 $ref: '#/components/schemas/VideoListResponse'
2389 /api/v1/videos/categories:
2391 summary: List available video categories
2392 operationId: getCategories
2397 description: successful operation
2406 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
2408 /api/v1/videos/licences:
2410 summary: List available video licences
2411 operationId: getLicences
2416 description: successful operation
2425 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
2427 /api/v1/videos/languages:
2429 summary: List available video languages
2430 operationId: getLanguages
2435 description: successful operation
2444 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
2446 /api/v1/videos/privacies:
2448 summary: List available video privacy policies
2449 operationId: getPrivacyPolicies
2454 description: successful operation
2463 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
2465 '/api/v1/videos/{id}':
2467 summary: Update a video
2468 operationId: putVideo
2474 - $ref: '#/components/parameters/idOrUUID'
2477 description: successful operation
2480 multipart/form-data:
2485 description: Video thumbnail file
2489 description: Video preview file
2493 $ref: '#/components/schemas/VideoCategorySet'
2495 $ref: '#/components/schemas/VideoLicenceSet'
2497 $ref: '#/components/schemas/VideoLanguageSet'
2499 $ref: '#/components/schemas/VideoPrivacySet'
2501 description: Video description
2504 description: Whether or not we wait transcoding before publish the video
2507 description: A text tell the audience how to support the video creator
2508 example: Please support our work on https://soutenir.framasoft.org/en/ <3
2511 description: Whether or not this video contains sensitive content
2514 description: Video name
2519 description: Video tags (maximum 5 tags each between 2 and 30 characters)
2528 description: Enable or disable comments for this video
2531 description: Enable or disable downloading for this video
2533 originallyPublishedAt:
2534 description: Date when the content was originally published
2538 $ref: '#/components/schemas/VideoScheduledUpdate'
2541 contentType: image/jpeg
2543 contentType: image/jpeg
2545 summary: Get a video
2546 operationId: getVideo
2550 - $ref: '#/components/parameters/idOrUUID'
2553 description: successful operation
2557 $ref: '#/components/schemas/VideoDetails'
2559 summary: Delete a video
2560 operationId: delVideo
2566 - $ref: '#/components/parameters/idOrUUID'
2569 description: successful operation
2571 '/api/v1/videos/{id}/description':
2573 summary: Get complete video description
2574 operationId: getVideoDesc
2578 - $ref: '#/components/parameters/idOrUUID'
2581 description: successful operation
2590 **[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)**
2592 '/api/v1/videos/{id}/source':
2594 summary: Get video source file metadata
2595 operationId: getVideoSource
2599 - $ref: '#/components/parameters/idOrUUID'
2602 description: successful operation
2606 $ref: '#/components/schemas/VideoSource'
2608 '/api/v1/videos/{id}/views':
2610 summary: Notify user is watching a video
2611 description: Call this endpoint regularly (every 5-10 seconds for example) to notify the server the user is watching the video. After a while, PeerTube will increase video's viewers counter. If the user is authenticated, PeerTube will also store the current player time.
2612 operationId: addView
2616 - $ref: '#/components/parameters/idOrUUID'
2621 $ref: '#/components/schemas/UserViewingVideo'
2625 description: successful operation
2627 '/api/v1/videos/{id}/watching':
2629 summary: Set watching progress of a video
2631 description: This endpoint has been deprecated. Use `/videos/{id}/views` instead
2637 - $ref: '#/components/parameters/idOrUUID'
2642 $ref: '#/components/schemas/UserViewingVideo'
2646 description: successful operation
2648 '/api/v1/videos/{id}/stats/overall':
2650 summary: Get overall stats of a video
2656 - $ref: '#/components/parameters/idOrUUID'
2659 description: Filter stats by start date
2665 description: Filter stats by end date
2671 description: successful operation
2675 $ref: '#/components/schemas/VideoStatsOverall'
2677 '/api/v1/videos/{id}/stats/retention':
2679 summary: Get retention stats of a video
2685 - $ref: '#/components/parameters/idOrUUID'
2688 description: successful operation
2692 $ref: '#/components/schemas/VideoStatsRetention'
2694 '/api/v1/videos/{id}/stats/timeseries/{metric}':
2696 summary: Get timeserie stats of a video
2702 - $ref: '#/components/parameters/idOrUUID'
2707 description: The metric to get
2712 - 'aggregateWatchTime'
2715 description: Filter stats by start date
2721 description: Filter stats by end date
2727 description: successful operation
2731 $ref: '#/components/schemas/VideoStatsTimeserie'
2733 /api/v1/videos/upload:
2735 summary: Upload a video
2736 description: Uses a single request to upload a video.
2737 operationId: uploadLegacy
2745 description: successful operation
2749 $ref: '#/components/schemas/VideoUploadResponse'
2751 description: video didn't pass upload filter
2753 description: upload has timed out
2755 x-summary: video file too large, due to quota or max body size limit set by the reverse-proxy
2757 If the response has no body, it means the reverse-proxy didn't let it through. Otherwise disambiguate via `type`:
2758 - `quota_reached` for quota limits whether daily or global
2760 X-File-Maximum-Size:
2764 description: Maximum file size for the video
2766 description: video type unsupported
2768 description: video unreadable
2771 multipart/form-data:
2773 $ref: '#/components/schemas/VideoUploadRequestLegacy'
2776 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
2778 contentType: image/jpeg
2780 contentType: image/jpeg
2785 USERNAME="<your_username>"
2786 PASSWORD="<your_password>"
2787 FILE_PATH="<your_file_path>"
2788 CHANNEL_ID="<your_channel_id>"
2790 API="https://peertube2.cpy.re/api/v1"
2793 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
2794 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
2795 token=$(curl -s "$API/users/token" \
2796 --data client_id="$client_id" \
2797 --data client_secret="$client_secret" \
2798 --data grant_type=password \
2799 --data username="$USERNAME" \
2800 --data password="$PASSWORD" \
2801 | jq -r ".access_token")
2804 curl -s "$API/videos/upload" \
2805 -H "Authorization: Bearer $token" \
2807 --form videofile=@"$FILE_PATH" \
2808 --form channelId=$CHANNEL_ID \
2811 /api/v1/videos/upload-resumable:
2813 summary: Initialize the resumable upload of a video
2814 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video
2815 operationId: uploadResumableInit
2822 - name: X-Upload-Content-Length
2828 description: Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading.
2829 - name: X-Upload-Content-Type
2836 description: MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.
2841 $ref: '#/components/schemas/VideoUploadRequestResumable'
2844 description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead
2846 description: created
2852 example: /api/v1/videos/upload-resumable?upload_id=471e97554f21dec3b8bb5d4602939c51
2858 x-summary: video file too large, due to quota, absolute max file size or concurrent partial upload limit
2860 Disambiguate via `type`:
2861 - `max_file_size_reached` for the absolute file size limit
2862 - `quota_reached` for quota limits whether daily or global
2864 description: video type unsupported
2866 summary: Send chunk for the resumable upload of a video
2867 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
2868 operationId: uploadResumable
2879 Created session id to proceed with. If you didn't send chunks in the last hour, it is
2880 not valid anymore and you need to initialize a new upload.
2883 - name: Content-Range
2887 example: bytes 0-262143/2469036
2890 Specifies the bytes in the file that the request is uploading.
2892 For example, a value of `bytes 0-262143/1000000` shows that the request is sending the first
2893 262144 bytes (256 x 1024) in a 2,469,036 byte file.
2894 - name: Content-Length
2901 Size of the chunk that the request is sending.
2903 Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from
2904 1048576 bytes (~1MB) and increases or reduces size depending on connection health.
2907 application/octet-stream:
2913 description: last chunk received
2921 $ref: '#/components/schemas/VideoUploadResponse'
2923 description: resume incomplete
2928 example: bytes=0-262143
2934 description: video didn't pass upload filter
2936 description: upload not found
2938 description: chunk doesn't match range
2940 description: video unreadable
2942 description: too many concurrent requests
2944 description: upload is already being processed
2951 summary: Cancel the resumable upload of a video, deleting any data uploaded so far
2952 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video
2953 operationId: uploadResumableCancel
2964 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
2965 not valid anymore and the upload session has already been deleted with its data ;-)
2968 - name: Content-Length
2976 description: upload cancelled
2983 description: upload not found
2985 /api/v1/videos/imports:
2987 summary: Import a video
2988 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
2989 operationId: importVideo
2997 multipart/form-data:
2999 $ref: '#/components/schemas/VideoCreateImport'
3002 contentType: application/x-bittorrent
3004 contentType: image/jpeg
3006 contentType: image/jpeg
3009 description: successful operation
3013 $ref: '#/components/schemas/VideoUploadResponse'
3015 description: '`magnetUri` or `targetUrl` or a torrent file missing'
3017 description: video didn't pass pre-import filter
3019 description: HTTP or Torrent/magnetURI import not enabled
3021 /api/v1/videos/imports/{id}/cancel:
3023 summary: Cancel video import
3024 description: Cancel a pending video import
3030 - $ref: '#/components/parameters/id'
3033 description: successful operation
3035 /api/v1/videos/imports/{id}:
3037 summary: Delete video import
3038 description: Delete ended video import
3044 - $ref: '#/components/parameters/id'
3047 description: successful operation
3049 /api/v1/videos/live:
3051 summary: Create a live
3052 operationId: addLive
3060 description: successful operation
3064 $ref: '#/components/schemas/VideoUploadResponse'
3066 x-summary: validation error, or conflicting `saveReplay` and `permanentLive` parameter set
3068 Disambiguate via `type`:
3069 - default type for a validation error
3070 - `live_conflicting_permanent_and_save_replay` for conflicting parameters set
3072 x-summary: live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
3074 Disambiguate via `type`:
3075 - `live_not_enabled` for a disabled live feature
3076 - `live_not_allowing_replay` for a disabled replay feature
3077 - `max_instance_lives_limit_reached` for the absolute concurrent live limit
3078 - `max_user_lives_limit_reached` for the user concurrent live limit
3081 multipart/form-data:
3086 description: Channel id that will contain this live video
3091 description: User can stream multiple times in a permanent live
3094 description: User can select live latency mode if enabled by the instance
3095 $ref: '#/components/schemas/LiveVideoLatencyMode'
3097 description: Live video/replay thumbnail file
3101 description: Live video/replay preview file
3105 $ref: '#/components/schemas/VideoPrivacySet'
3107 $ref: '#/components/schemas/VideoCategorySet'
3109 $ref: '#/components/schemas/VideoLicenceSet'
3111 $ref: '#/components/schemas/VideoLanguageSet'
3113 description: Live video/replay description
3116 description: A text tell the audience how to support the creator
3117 example: Please support our work on https://soutenir.framasoft.org/en/ <3
3120 description: Whether or not this live video/replay contains sensitive content
3123 description: Live video/replay name
3128 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
3137 description: Enable or disable comments for this live video/replay
3140 description: Enable or disable downloading for the replay of this live video
3147 contentType: image/jpeg
3149 contentType: image/jpeg
3151 /api/v1/videos/live/{id}:
3153 summary: Get information about a live
3154 operationId: getLiveId
3161 - $ref: '#/components/parameters/idOrUUID'
3164 description: successful operation
3168 $ref: '#/components/schemas/LiveVideoResponse'
3170 summary: Update information about a live
3171 operationId: updateLiveId
3178 - $ref: '#/components/parameters/idOrUUID'
3183 $ref: '#/components/schemas/LiveVideoUpdate'
3186 description: successful operation
3188 description: bad parameters or trying to update a live that has already started
3190 description: trying to save replay of the live but saving replay is not enabled on the instance
3191 /api/v1/videos/live/{id}/sessions:
3193 summary: List live sessions
3194 description: List all sessions created in a particular live
3200 - $ref: '#/components/parameters/idOrUUID'
3203 description: successful operation
3215 $ref: '#/components/schemas/LiveVideoSessionResponse'
3216 /api/v1/videos/{id}/live-session:
3218 summary: Get live session of a replay
3219 description: If the video is a replay of a live, you can find the associated live session using this endpoint
3225 - $ref: '#/components/parameters/idOrUUID'
3228 description: successful operation
3232 $ref: '#/components/schemas/LiveVideoSessionResponse'
3234 /api/v1/users/me/abuses:
3236 summary: List my abuses
3237 operationId: getMyAbuses
3246 description: only list the report with this id
3252 $ref: '#/components/schemas/AbuseStateSet'
3253 - $ref: '#/components/parameters/abusesSort'
3254 - $ref: '#/components/parameters/start'
3255 - $ref: '#/components/parameters/count'
3258 description: successful operation
3270 $ref: '#/components/schemas/Abuse'
3274 summary: List abuses
3275 operationId: getAbuses
3285 description: only list the report with this id
3288 - name: predefinedReason
3290 description: predefined reason the listed reports should contain
3292 $ref: '#/components/schemas/PredefinedAbuseReasons'
3295 description: plain search that will match with video titles, reporter names and more
3301 $ref: '#/components/schemas/AbuseStateSet'
3302 - name: searchReporter
3304 description: only list reports of a specific reporter
3307 - name: searchReportee
3308 description: only list reports of a specific reportee
3314 description: only list reports of a specific video
3317 - name: searchVideoChannel
3319 description: only list reports of a specific video channel
3324 description: only list deleted or blocklisted videos
3332 description: only list account, comment or video reports
3339 - $ref: '#/components/parameters/start'
3340 - $ref: '#/components/parameters/count'
3341 - $ref: '#/components/parameters/abusesSort'
3344 description: successful operation
3356 $ref: '#/components/schemas/Abuse'
3358 summary: Report an abuse
3371 description: Reason why the user reports this video
3376 $ref: '#/components/schemas/PredefinedAbuseReasons'
3381 description: Video id to report
3383 - $ref: '#/components/schemas/Video/properties/id'
3387 description: Timestamp in the video that marks the beginning of the report
3392 description: Timestamp in the video that marks the ending of the report
3398 description: Comment id to report
3400 - $ref: '#/components/schemas/VideoComment/properties/id'
3405 description: Account id to report
3411 description: successful operation
3421 $ref: '#/components/schemas/id'
3423 description: incorrect request parameters
3425 '/api/v1/abuses/{abuseId}':
3427 summary: Update an abuse
3435 - $ref: '#/components/parameters/abuseId'
3443 $ref: '#/components/schemas/AbuseStateSet'
3446 description: Update the report comment visible only to the moderation team
3451 description: successful operation
3453 description: abuse not found
3457 summary: Delete an abuse
3463 - $ref: '#/components/parameters/abuseId'
3466 description: successful operation
3468 description: block not found
3470 '/api/v1/abuses/{abuseId}/messages':
3472 summary: List messages of an abuse
3478 - $ref: '#/components/parameters/abuseId'
3481 description: successful operation
3493 $ref: '#/components/schemas/AbuseMessage'
3495 summary: Add message to an abuse
3501 - $ref: '#/components/parameters/abuseId'
3510 description: Message to send
3518 description: successful operation
3520 description: incorrect request parameters
3522 '/api/v1/abuses/{abuseId}/messages/{abuseMessageId}':
3524 summary: Delete an abuse message
3530 - $ref: '#/components/parameters/abuseId'
3531 - $ref: '#/components/parameters/abuseMessageId'
3534 description: successful operation
3536 '/api/v1/videos/{id}/blacklist':
3538 summary: Block a video
3539 operationId: addVideoBlock
3547 - $ref: '#/components/parameters/idOrUUID'
3550 description: successful operation
3552 summary: Unblock a video by its id
3553 operationId: delVideoBlock
3561 - $ref: '#/components/parameters/idOrUUID'
3564 description: successful operation
3566 description: block not found
3568 /api/v1/videos/blacklist:
3572 summary: List video blocks
3573 operationId: getVideoBlocks
3582 list only blocks that match this type:
3586 - `2`: automatic block that needs review
3594 description: plain search that will match with video titles, and more
3597 - $ref: '#/components/parameters/start'
3598 - $ref: '#/components/parameters/count'
3599 - $ref: '#/components/parameters/blacklistsSort'
3602 description: successful operation
3614 $ref: '#/components/schemas/VideoBlacklist'
3616 /api/v1/videos/{id}/captions:
3618 summary: List captions of a video
3619 operationId: getVideoCaptions
3623 - $ref: '#/components/parameters/idOrUUID'
3626 description: successful operation
3638 $ref: '#/components/schemas/VideoCaption'
3640 /api/v1/videos/{id}/captions/{captionLanguage}:
3642 summary: Add or replace a video caption
3643 operationId: addVideoCaption
3650 - $ref: '#/components/parameters/idOrUUID'
3651 - $ref: '#/components/parameters/captionLanguage'
3654 multipart/form-data:
3659 description: The file to upload.
3664 contentType: text/vtt, application/x-subrip, text/plain
3667 description: successful operation
3669 description: video or language not found
3671 summary: Delete a video caption
3672 operationId: delVideoCaption
3679 - $ref: '#/components/parameters/idOrUUID'
3680 - $ref: '#/components/parameters/captionLanguage'
3683 description: successful operation
3685 description: video or language or caption for that language not found
3687 /api/v1/video-channels:
3689 summary: List video channels
3690 operationId: getVideoChannels
3694 - $ref: '#/components/parameters/start'
3695 - $ref: '#/components/parameters/count'
3696 - $ref: '#/components/parameters/sort'
3699 description: successful operation
3703 $ref: '#/components/schemas/VideoChannelList'
3705 summary: Create a video channel
3706 operationId: addVideoChannel
3713 description: successful operation
3723 $ref: '#/components/schemas/id'
3728 $ref: '#/components/schemas/VideoChannelCreate'
3730 '/api/v1/video-channels/{channelHandle}':
3732 summary: Get a video channel
3733 operationId: getVideoChannel
3737 - $ref: '#/components/parameters/channelHandle'
3740 description: successful operation
3744 $ref: '#/components/schemas/VideoChannel'
3746 summary: Update a video channel
3747 operationId: putVideoChannel
3753 - $ref: '#/components/parameters/channelHandle'
3756 description: successful operation
3761 $ref: '#/components/schemas/VideoChannelUpdate'
3763 summary: Delete a video channel
3764 operationId: delVideoChannel
3770 - $ref: '#/components/parameters/channelHandle'
3773 description: successful operation
3775 '/api/v1/video-channels/{channelHandle}/videos':
3777 summary: List videos of a video channel
3778 operationId: getVideoChannelVideos
3783 - $ref: '#/components/parameters/channelHandle'
3784 - $ref: '#/components/parameters/categoryOneOf'
3785 - $ref: '#/components/parameters/isLive'
3786 - $ref: '#/components/parameters/tagsOneOf'
3787 - $ref: '#/components/parameters/tagsAllOf'
3788 - $ref: '#/components/parameters/licenceOneOf'
3789 - $ref: '#/components/parameters/languageOneOf'
3790 - $ref: '#/components/parameters/nsfw'
3791 - $ref: '#/components/parameters/isLocal'
3792 - $ref: '#/components/parameters/include'
3793 - $ref: '#/components/parameters/privacyOneOf'
3794 - $ref: '#/components/parameters/hasHLSFiles'
3795 - $ref: '#/components/parameters/hasWebtorrentFiles'
3796 - $ref: '#/components/parameters/skipCount'
3797 - $ref: '#/components/parameters/start'
3798 - $ref: '#/components/parameters/count'
3799 - $ref: '#/components/parameters/videosSort'
3802 description: successful operation
3806 $ref: '#/components/schemas/VideoListResponse'
3808 '/api/v1/video-channels/{channelHandle}/video-playlists':
3810 summary: List playlists of a channel
3815 - $ref: '#/components/parameters/channelHandle'
3816 - $ref: '#/components/parameters/start'
3817 - $ref: '#/components/parameters/count'
3818 - $ref: '#/components/parameters/sort'
3819 - $ref: '#/components/parameters/videoPlaylistType'
3822 description: successful operation
3834 $ref: '#/components/schemas/VideoPlaylist'
3836 '/api/v1/video-channels/{channelHandle}/followers':
3840 summary: 'List followers of a video channel'
3843 operationId: getVideoChannelFollowers
3845 - $ref: '#/components/parameters/channelHandle'
3846 - $ref: '#/components/parameters/start'
3847 - $ref: '#/components/parameters/count'
3848 - $ref: '#/components/parameters/followersSort'
3849 - $ref: '#/components/parameters/search'
3852 description: successful operation
3864 $ref: '#/components/schemas/Follow'
3866 '/api/v1/video-channels/{channelHandle}/avatar/pick':
3868 summary: Update channel avatar
3874 - $ref: '#/components/parameters/channelHandle'
3877 description: successful operation
3886 $ref: '#/components/schemas/ActorImage'
3888 description: image file too large
3890 X-File-Maximum-Size:
3894 description: Maximum file size for the avatar
3897 multipart/form-data:
3902 description: The file to upload.
3907 contentType: image/png, image/jpeg
3909 '/api/v1/video-channels/{channelHandle}/avatar':
3911 summary: Delete channel avatar
3917 - $ref: '#/components/parameters/channelHandle'
3920 description: successful operation
3922 '/api/v1/video-channels/{channelHandle}/banner/pick':
3924 summary: Update channel banner
3930 - $ref: '#/components/parameters/channelHandle'
3933 description: successful operation
3942 $ref: '#/components/schemas/ActorImage'
3944 description: image file too large
3946 X-File-Maximum-Size:
3950 description: Maximum file size for the banner
3953 multipart/form-data:
3958 description: The file to upload.
3963 contentType: image/png, image/jpeg
3965 '/api/v1/video-channels/{channelHandle}/banner':
3967 summary: Delete channel banner
3973 - $ref: '#/components/parameters/channelHandle'
3976 description: successful operation
3978 '/api/v1/video-channels/{channelHandle}/import-videos':
3980 summary: Import videos in channel
3981 description: Import a remote channel/playlist videos into a channel
3988 - $ref: '#/components/parameters/channelHandle'
3993 $ref: '#/components/schemas/ImportVideosInChannelCreate'
3996 description: successful operation
3998 '/api/v1/video-channel-syncs':
4000 summary: Create a synchronization for a video channel
4001 operationId: addVideoChannelSync
4010 $ref: '#/components/schemas/VideoChannelSyncCreate'
4013 description: successful operation
4020 $ref: "#/components/schemas/VideoChannelSync"
4022 '/api/v1/video-channel-syncs/{channelSyncId}':
4024 summary: Delete a video channel synchronization
4025 operationId: delVideoChannelSync
4031 - $ref: '#/components/parameters/channelSyncId'
4034 description: successful operation
4036 '/api/v1/video-channel-syncs/{channelSyncId}/sync':
4038 summary: Triggers the channel synchronization job, fetching all the videos from the remote channel
4039 operationId: triggerVideoChannelSync
4045 - $ref: '#/components/parameters/channelSyncId'
4048 description: successful operation
4051 /api/v1/video-playlists/privacies:
4053 summary: List available playlist privacy policies
4054 operationId: getPlaylistPrivacyPolicies
4059 description: successful operation
4068 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
4070 /api/v1/video-playlists:
4072 summary: List video playlists
4073 operationId: getPlaylists
4077 - $ref: '#/components/parameters/start'
4078 - $ref: '#/components/parameters/count'
4079 - $ref: '#/components/parameters/sort'
4080 - $ref: '#/components/parameters/videoPlaylistType'
4083 description: successful operation
4095 $ref: '#/components/schemas/VideoPlaylist'
4097 summary: Create a video playlist
4098 description: If the video playlist is set as public, `videoChannelId` is mandatory.
4099 operationId: addPlaylist
4106 description: successful operation
4116 $ref: '#/components/schemas/VideoPlaylist/properties/id'
4118 $ref: '#/components/schemas/VideoPlaylist/properties/uuid'
4120 $ref: '#/components/schemas/VideoPlaylist/properties/shortUUID'
4123 multipart/form-data:
4128 description: Video playlist display name
4133 description: Video playlist thumbnail file
4137 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4139 description: Video playlist description
4145 - $ref: '#/components/schemas/id'
4146 description: Video channel in which the playlist will be published
4151 contentType: image/jpeg
4153 /api/v1/video-playlists/{playlistId}:
4155 summary: Get a video playlist
4159 - $ref: '#/components/parameters/playlistId'
4162 description: successful operation
4166 $ref: '#/components/schemas/VideoPlaylist'
4168 summary: Update a video playlist
4169 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
4176 description: successful operation
4178 - $ref: '#/components/parameters/playlistId'
4181 multipart/form-data:
4186 description: Video playlist display name
4191 description: Video playlist thumbnail file
4195 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4197 description: Video playlist description
4201 - $ref: '#/components/schemas/id'
4202 description: Video channel in which the playlist will be published
4205 contentType: image/jpeg
4207 summary: Delete a video playlist
4213 - $ref: '#/components/parameters/playlistId'
4216 description: successful operation
4218 /api/v1/video-playlists/{playlistId}/videos:
4220 summary: 'List videos of a playlist'
4221 operationId: getVideoPlaylistVideos
4226 - $ref: '#/components/parameters/playlistId'
4227 - $ref: '#/components/parameters/start'
4228 - $ref: '#/components/parameters/count'
4231 description: successful operation
4235 $ref: '#/components/schemas/VideoListResponse'
4237 summary: Add a video in a playlist
4238 operationId: addVideoPlaylistVideo
4245 - $ref: '#/components/parameters/playlistId'
4248 description: successful operation
4254 videoPlaylistElement:
4268 - $ref: '#/components/schemas/Video/properties/uuid'
4269 - $ref: '#/components/schemas/Video/properties/id'
4270 description: Video to add in the playlist
4274 description: Start the video at this specific timestamp
4278 description: Stop the video at this specific timestamp
4282 /api/v1/video-playlists/{playlistId}/videos/reorder:
4284 summary: 'Reorder a playlist'
4285 operationId: reorderVideoPlaylist
4291 - $ref: '#/components/parameters/playlistId'
4294 description: successful operation
4303 description: 'Start position of the element to reorder'
4305 insertAfterPosition:
4307 description: 'New position for the block to reorder, to add the block before the first element'
4311 description: 'How many element from `startPosition` to reorder'
4315 - insertAfterPosition
4317 /api/v1/video-playlists/{playlistId}/videos/{playlistElementId}:
4319 summary: Update a playlist element
4320 operationId: putVideoPlaylistVideo
4326 - $ref: '#/components/parameters/playlistId'
4327 - $ref: '#/components/parameters/playlistElementId'
4330 description: successful operation
4340 description: Start the video at this specific timestamp
4344 description: Stop the video at this specific timestamp
4346 summary: Delete an element from a playlist
4347 operationId: delVideoPlaylistVideo
4353 - $ref: '#/components/parameters/playlistId'
4354 - $ref: '#/components/parameters/playlistElementId'
4357 description: successful operation
4359 '/api/v1/users/me/video-playlists/videos-exist':
4361 summary: Check video exists in my playlists
4370 description: The video ids to check
4374 $ref: '#/components/schemas/Video/properties/id'
4377 description: successful operation
4398 '/api/v1/accounts/{name}/video-playlists':
4400 summary: List playlists of an account
4405 - $ref: '#/components/parameters/name'
4406 - $ref: '#/components/parameters/start'
4407 - $ref: '#/components/parameters/count'
4408 - $ref: '#/components/parameters/sort'
4409 - $ref: '#/components/parameters/search'
4410 - $ref: '#/components/parameters/videoPlaylistType'
4413 description: successful operation
4425 $ref: '#/components/schemas/VideoPlaylist'
4427 '/api/v1/accounts/{name}/video-channels':
4429 summary: List video channels of an account
4434 - $ref: '#/components/parameters/name'
4437 description: include daily view statistics for the last 30 days and total views (only if authentified as the account user)
4440 - $ref: '#/components/parameters/start'
4441 - $ref: '#/components/parameters/count'
4442 - $ref: '#/components/parameters/sort'
4445 description: successful operation
4449 $ref: '#/components/schemas/VideoChannelList'
4451 '/api/v1/accounts/{name}/video-channel-syncs':
4453 summary: List the synchronizations of video channels of an account
4459 - $ref: '#/components/parameters/name'
4460 - $ref: '#/components/parameters/start'
4461 - $ref: '#/components/parameters/count'
4462 - $ref: '#/components/parameters/sort'
4465 description: successful operation
4469 $ref: '#/components/schemas/VideoChannelSyncList'
4471 '/api/v1/accounts/{name}/ratings':
4473 summary: List ratings of an account
4479 - $ref: '#/components/parameters/name'
4480 - $ref: '#/components/parameters/start'
4481 - $ref: '#/components/parameters/count'
4482 - $ref: '#/components/parameters/sort'
4486 description: Optionally filter which ratings to retrieve
4494 description: successful operation
4500 $ref: '#/components/schemas/VideoRating'
4502 '/api/v1/videos/{id}/comment-threads':
4504 summary: List threads of a video
4508 - $ref: '#/components/parameters/idOrUUID'
4509 - $ref: '#/components/parameters/start'
4510 - $ref: '#/components/parameters/count'
4511 - $ref: '#/components/parameters/commentsSort'
4514 description: successful operation
4518 $ref: '#/components/schemas/CommentThreadResponse'
4520 summary: Create a thread
4526 - $ref: '#/components/parameters/idOrUUID'
4529 description: successful operation
4533 $ref: '#/components/schemas/CommentThreadPostResponse'
4535 description: video does not exist
4544 - $ref: '#/components/schemas/VideoComment/properties/text'
4550 '/api/v1/videos/{id}/comment-threads/{threadId}':
4552 summary: Get a thread
4556 - $ref: '#/components/parameters/idOrUUID'
4557 - $ref: '#/components/parameters/threadId'
4560 description: successful operation
4564 $ref: '#/components/schemas/VideoCommentThreadTree'
4566 '/api/v1/videos/{id}/comments/{commentId}':
4568 summary: Reply to a thread of a video
4574 - $ref: '#/components/parameters/idOrUUID'
4575 - $ref: '#/components/parameters/commentId'
4578 description: successful operation
4582 $ref: '#/components/schemas/CommentThreadPostResponse'
4584 description: thread or video does not exist
4593 - $ref: '#/components/schemas/VideoComment/properties/text'
4599 summary: Delete a comment or a reply
4605 - $ref: '#/components/parameters/idOrUUID'
4606 - $ref: '#/components/parameters/commentId'
4609 description: successful operation
4611 description: cannot remove comment of another user
4613 description: comment or video does not exist
4615 description: comment is already deleted
4617 '/api/v1/videos/{id}/rate':
4619 summary: Like/dislike a video
4625 - $ref: '#/components/parameters/idOrUUID'
4641 description: successful operation
4643 description: video does not exist
4645 '/api/v1/videos/{id}/hls':
4647 summary: Delete video HLS files
4653 operationId: delVideoHLS
4655 - $ref: '#/components/parameters/idOrUUID'
4658 description: successful operation
4660 description: video does not exist
4661 '/api/v1/videos/{id}/webtorrent':
4663 summary: Delete video WebTorrent files
4669 operationId: delVideoWebTorrent
4671 - $ref: '#/components/parameters/idOrUUID'
4674 description: successful operation
4676 description: video does not exist
4678 '/api/v1/videos/{id}/transcoding':
4680 summary: Create a transcoding job
4686 operationId: createVideoTranscoding
4688 - $ref: '#/components/parameters/idOrUUID'
4704 description: successful operation
4706 description: video does not exist
4708 /api/v1/search/videos:
4712 summary: Search videos
4713 operationId: searchVideos
4718 allowEmptyValue: false
4720 String to search. If the user can make a remote URI search, and the string is an URI then the
4721 PeerTube instance will fetch the remote object and add it to its database. Then,
4722 you can use the REST API to fetch the complete video information and interact with it.
4725 - $ref: '#/components/parameters/categoryOneOf'
4726 - $ref: '#/components/parameters/isLive'
4727 - $ref: '#/components/parameters/tagsOneOf'
4728 - $ref: '#/components/parameters/tagsAllOf'
4729 - $ref: '#/components/parameters/licenceOneOf'
4730 - $ref: '#/components/parameters/languageOneOf'
4731 - $ref: '#/components/parameters/nsfw'
4732 - $ref: '#/components/parameters/isLocal'
4733 - $ref: '#/components/parameters/include'
4734 - $ref: '#/components/parameters/privacyOneOf'
4735 - $ref: '#/components/parameters/uuids'
4736 - $ref: '#/components/parameters/hasHLSFiles'
4737 - $ref: '#/components/parameters/hasWebtorrentFiles'
4738 - $ref: '#/components/parameters/skipCount'
4739 - $ref: '#/components/parameters/start'
4740 - $ref: '#/components/parameters/count'
4741 - $ref: '#/components/parameters/searchTarget'
4742 - $ref: '#/components/parameters/videosSearchSort'
4745 description: Get videos that are published after this date
4751 description: Get videos that are published before this date
4755 - name: originallyPublishedStartDate
4757 description: Get videos that are originally published after this date
4761 - name: originallyPublishedEndDate
4763 description: Get videos that are originally published before this date
4769 description: Get videos that have this minimum duration
4774 description: Get videos that have this maximum duration
4778 'searchTarget === search-index':
4779 $ref: '#/components/callbacks/searchIndex'
4782 description: successful operation
4786 $ref: '#/components/schemas/VideoListResponse'
4788 description: search index unavailable
4790 /api/v1/search/video-channels:
4794 summary: Search channels
4795 operationId: searchChannels
4801 String to search. If the user can make a remote URI search, and the string is an URI then the
4802 PeerTube instance will fetch the remote object and add it to its database. Then,
4803 you can use the REST API to fetch the complete channel information and interact with it.
4806 - $ref: '#/components/parameters/start'
4807 - $ref: '#/components/parameters/count'
4808 - $ref: '#/components/parameters/searchTarget'
4809 - $ref: '#/components/parameters/sort'
4811 'searchTarget === search-index':
4812 $ref: '#/components/callbacks/searchIndex'
4815 description: successful operation
4819 $ref: '#/components/schemas/VideoChannelList'
4821 description: search index unavailable
4823 /api/v1/search/video-playlists:
4827 summary: Search playlists
4828 operationId: searchPlaylists
4834 String to search. If the user can make a remote URI search, and the string is an URI then the
4835 PeerTube instance will fetch the remote object and add it to its database. Then,
4836 you can use the REST API to fetch the complete playlist information and interact with it.
4839 - $ref: '#/components/parameters/start'
4840 - $ref: '#/components/parameters/count'
4841 - $ref: '#/components/parameters/searchTarget'
4842 - $ref: '#/components/parameters/sort'
4844 'searchTarget === search-index':
4845 $ref: '#/components/callbacks/searchIndex'
4848 description: successful operation
4860 $ref: '#/components/schemas/VideoPlaylist'
4862 description: search index unavailable
4864 /api/v1/blocklist/status:
4869 summary: Get block status of accounts/hosts
4874 description: 'Check if these accounts are blocked'
4875 example: [ 'goofy@example.com', 'donald@example.com' ]
4883 description: 'Check if these hosts are blocked'
4884 example: [ 'example.com' ]
4891 description: successful operation
4895 $ref: '#/components/schemas/BlockStatus'
4897 /api/v1/server/blocklist/accounts:
4901 summary: List account blocks
4906 - $ref: '#/components/parameters/start'
4907 - $ref: '#/components/parameters/count'
4908 - $ref: '#/components/parameters/sort'
4911 description: successful operation
4915 summary: Block an account
4927 example: chocobozzz@example.org
4928 description: account to block, in the form `username@domain`
4933 description: successful operation
4935 description: self-blocking forbidden
4937 '/api/v1/server/blocklist/accounts/{accountName}':
4941 summary: Unblock an account by its handle
4949 description: account to unblock, in the form `username@domain`
4954 description: successful operation
4956 description: account or account block does not exist
4958 /api/v1/server/blocklist/servers:
4962 summary: List server blocks
4967 - $ref: '#/components/parameters/start'
4968 - $ref: '#/components/parameters/count'
4969 - $ref: '#/components/parameters/sort'
4972 description: successful operation
4976 summary: Block a server
4989 description: server domain to block
4994 description: successful operation
4996 description: self-blocking forbidden
4998 '/api/v1/server/blocklist/servers/{host}':
5002 summary: Unblock a server by its domain
5010 description: server domain to unblock
5016 description: successful operation
5018 description: account block does not exist
5020 /api/v1/server/redundancy/{host}:
5023 - Instance Redundancy
5024 summary: Update a server redundancy policy
5032 description: server domain to mirror
5044 description: allow mirroring of the host's local videos
5049 description: successful operation
5051 description: server is not already known
5053 /api/v1/server/redundancy/videos:
5057 summary: List videos being mirrored
5058 operationId: getMirroredVideos
5066 description: direction of the mirror
5072 - $ref: '#/components/parameters/start'
5073 - $ref: '#/components/parameters/count'
5074 - $ref: '#/components/parameters/videoRedundanciesSort'
5077 description: successful operation
5083 $ref: '#/components/schemas/VideoRedundancy'
5087 summary: Mirror a video
5088 operationId: putMirroredVideo
5099 $ref: '#/components/schemas/Video/properties/id'
5104 description: successful operation
5106 description: cannot mirror a local video
5108 description: video does not exist
5110 description: video is already mirrored
5112 /api/v1/server/redundancy/videos/{redundancyId}:
5116 summary: Delete a mirror done on a video
5117 operationId: delMirroredVideo
5122 - name: redundancyId
5125 description: id of an existing redundancy on a video
5130 description: successful operation
5132 description: video redundancy not found
5134 /api/v1/server/stats:
5138 summary: Get instance stats
5139 description: Get instance public statistics. This endpoint is cached.
5140 operationId: getInstanceStats
5143 description: successful operation
5147 $ref: '#/components/schemas/ServerStats'
5149 /api/v1/server/logs/client:
5153 summary: Send client log
5154 operationId: sendClientLog
5159 $ref: '#/components/schemas/SendClientLog'
5162 description: successful operation
5164 /api/v1/server/logs:
5168 summary: Get instance logs
5169 operationId: getInstanceLogs
5175 description: successful operation
5183 /api/v1/server/audit-logs:
5187 summary: Get instance audit logs
5188 operationId: getInstanceAuditLogs
5194 description: successful operation
5206 summary: List plugins
5207 operationId: getPlugins
5220 - $ref: '#/components/parameters/start'
5221 - $ref: '#/components/parameters/count'
5222 - $ref: '#/components/parameters/sort'
5225 description: successful operation
5229 $ref: '#/components/schemas/PluginResponse'
5231 /api/v1/plugins/available:
5235 summary: List available plugins
5236 operationId: getAvailablePlugins
5249 - name: currentPeerTubeEngine
5253 - $ref: '#/components/parameters/start'
5254 - $ref: '#/components/parameters/count'
5255 - $ref: '#/components/parameters/sort'
5258 description: successful operation
5262 $ref: '#/components/schemas/PluginResponse'
5264 description: plugin index unavailable
5266 /api/v1/plugins/install:
5270 summary: Install a plugin
5271 operationId: addPlugin
5284 example: peertube-plugin-auth-ldap
5287 additionalProperties: false
5294 additionalProperties: false
5297 description: successful operation
5299 description: should have either `npmName` or `path` set
5301 /api/v1/plugins/update:
5305 summary: Update a plugin
5306 operationId: updatePlugin
5319 example: peertube-plugin-auth-ldap
5322 additionalProperties: false
5329 additionalProperties: false
5332 description: successful operation
5334 description: should have either `npmName` or `path` set
5336 description: existing plugin not found
5338 /api/v1/plugins/uninstall:
5342 summary: Uninstall a plugin
5343 operationId: uninstallPlugin
5355 description: name of the plugin/theme in its package.json
5356 example: peertube-plugin-auth-ldap
5361 description: successful operation
5363 description: existing plugin not found
5365 /api/v1/plugins/{npmName}:
5369 summary: Get a plugin
5370 operationId: getPlugin
5375 - $ref: '#/components/parameters/npmName'
5378 description: successful operation
5382 $ref: '#/components/schemas/Plugin'
5384 description: plugin not found
5386 /api/v1/plugins/{npmName}/settings:
5390 summary: Set a plugin's settings
5395 - $ref: '#/components/parameters/npmName'
5404 additionalProperties: true
5407 description: successful operation
5409 description: plugin not found
5411 /api/v1/plugins/{npmName}/public-settings:
5415 summary: Get a plugin's public settings
5417 - $ref: '#/components/parameters/npmName'
5420 description: successful operation
5425 additionalProperties: true
5427 description: plugin not found
5429 /api/v1/plugins/{npmName}/registered-settings:
5433 summary: Get a plugin's registered settings
5438 - $ref: '#/components/parameters/npmName'
5441 description: successful operation
5446 additionalProperties: true
5448 description: plugin not found
5450 /api/v1/metrics/playback:
5452 summary: Create playback metrics
5453 description: These metrics are exposed by OpenTelemetry metrics exporter if enabled.
5460 $ref: '#/components/schemas/PlaybackMetricCreate'
5463 description: successful operation
5466 - url: 'https://peertube2.cpy.re'
5467 description: Live Test Server (live data - latest nightly version)
5468 - url: 'https://peertube3.cpy.re'
5469 description: Live Test Server (live data - latest RC version)
5470 - url: 'https://peertube.cpy.re'
5471 description: Live Test Server (live data - stable version)
5478 description: Offset used to paginate results
5486 description: "Number of items to return"
5496 description: Sort column
5504 description: Plain text search, applied to various parts of the model depending on endpoint
5512 If the administrator enabled search index support, you can override the default search target.
5515 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
5516 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
5517 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
5518 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
5519 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
5520 * 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
5521 the data from the origin instance API
5544 Sort videos by criteria (prefixing with `-` means `DESC` order):
5545 * `hot` - Adaptation of Reddit "hot" algorithm taking into account video views, likes, dislikes and comments and publication date
5546 * `best` - Same than `hot`, but also takes into account user video history
5547 * `trending` - Sort videos by recent views ("recent" is defined by the admin)
5548 * `views` - Sort videos using their `views` counter
5549 * `publishedAt` - Sort by video publication date (when it became publicly available)
5555 Sort videos by criteria (prefixing with `-` means `DESC` order):
5570 description: Sort comments by criteria
5580 description: Sort blocklists by criteria
5596 description: Plain text search that will match with user usernames or emails
5603 description: Filter results down to (un)banned users
5610 description: Sort users by criteria
5621 description: Sort abuses by criteria
5628 videoRedundanciesSort:
5632 description: Sort abuses by criteria
5641 description: Sort followers by criteria
5651 description: The username or handle of the account
5654 example: chocobozzz | chocobozzz@example.org
5659 description: Entity id
5661 $ref: '#/components/schemas/id'
5663 name: registrationId
5666 description: Registration ID
5668 $ref: '#/components/schemas/id'
5673 description: The object id, uuid or short uuid
5676 - $ref: '#/components/schemas/id'
5677 - $ref: '#/components/schemas/UUIDv4'
5678 - $ref: '#/components/schemas/shortUUID'
5683 description: Playlist id
5685 $ref: '#/components/schemas/VideoPlaylist/properties/id'
5687 name: playlistElementId
5690 description: Playlist element id
5692 $ref: '#/components/schemas/id'
5697 description: Abuse id
5699 $ref: '#/components/schemas/Abuse/properties/id'
5701 name: abuseMessageId
5704 description: Abuse message id
5706 $ref: '#/components/schemas/AbuseMessage/properties/id'
5708 name: captionLanguage
5711 description: The caption language
5713 $ref: '#/components/schemas/VideoLanguageSet'
5718 description: The video channel handle
5721 example: my_username | my_username@example.com
5726 description: Channel Sync id
5728 $ref: '#/components/schemas/Abuse/properties/id'
5730 name: subscriptionHandle
5733 description: The subscription handle
5736 example: my_username | my_username@example.com
5741 description: The thread id (root comment id)
5748 description: The comment id
5750 $ref: '#/components/schemas/VideoComment/properties/id'
5755 description: whether or not the video is a live
5762 description: category id of the video (see [/videos/categories](#operation/getCategories))
5765 - $ref: '#/components/schemas/VideoCategorySet'
5768 $ref: '#/components/schemas/VideoCategorySet'
5775 description: tag(s) of the video
5789 description: tag(s) of the video, where all should be present in the video
5802 description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language
5805 - $ref: '#/components/schemas/VideoLanguageSet'
5808 $ref: '#/components/schemas/VideoLanguageSet'
5815 description: licence id of the video (see [/videos/licences](#operation/getLicences))
5818 - $ref: '#/components/schemas/VideoLicenceSet'
5821 $ref: '#/components/schemas/VideoLicenceSet'
5828 description: if you don't need the `total` in the response
5839 description: whether to include nsfw videos, if any
5851 description: '**PeerTube >= 4.0** Display only local or remote videos'
5858 description: '**PeerTube >= 4.0** Display only videos that have HLS files'
5860 name: hasWebtorrentFiles
5865 description: '**PeerTube >= 4.0** Display only videos that have WebTorrent files'
5871 $ref: '#/components/schemas/VideoPrivacySet'
5872 description: '**PeerTube >= 4.0** Display only videos in this specific privacy/privacies'
5880 description: 'Find videos with specific UUIDs'
5894 **PeerTube >= 4.0** Include additional videos in results (can be combined using bitwise or operator)
5898 - `1` NOT_PUBLISHED_STATE
5909 description: list of uris to check if each is part of the user subscriptions
5919 description: name of the plugin/theme on npmjs.com or in its package.json
5922 example: peertube-plugin-auth-ldap
5927 description: job type
5931 - activitypub-follow
5932 - activitypub-http-broadcast
5933 - activitypub-http-fetcher
5934 - activitypub-http-unicast
5939 - videos-views-stats
5940 - activitypub-refresher
5943 - video-channel-import
5967 description: Filename
5971 name: videoFileToken
5974 description: Video file token [generated](#operation/requestVideoToken) by PeerTube so you don't need to provide an OAuth token in the request header.
5977 reinjectVideoFileToken:
5978 name: reinjectVideoFileToken
5981 description: Ask the server to reinject videoFileToken in URLs in m3u8 playlist
5989 $ref: '#/components/schemas/VideoPlaylistTypeSet'
5994 Authenticating via OAuth requires the following steps:
5995 - Have an activated account
5996 - [Generate] an access token for that account at `/api/v1/users/token`.
5997 - Make requests with the *Authorization: Bearer <token\>* header
5998 - Profit, depending on the role assigned to the account
6000 Note that the __access token is valid for 1 day__ and is given
6001 along with a __refresh token valid for 2 weeks__.
6003 [Generate]: https://docs.joinpeertube.org/api/rest-getting-started
6007 tokenUrl: /api/v1/users/token
6010 moderator: Moderator scope
6013 # Reusable core properties
6021 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
6022 pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
6027 description: translation of a uuid v4 with a bigger alphabet to have a shorter uuid
6028 example: 2y84q2MQUMWPbiEcxNXMgC
6031 description: immutable name of the user, used to find or mention its actor
6033 pattern: '/^[a-z0-9._]+$/'
6038 description: immutable name of the channel, used to interact with its actor
6039 example: framasoft_videos
6040 pattern: '/^[a-zA-Z0-9\\-_.:]+$/'
6051 description: category id of the video (see [/videos/categories](#operation/getCategories))
6053 VideoConstantNumber-Category:
6056 $ref: '#/components/schemas/VideoCategorySet'
6059 example: Science & Technology
6063 description: licence id of the video (see [/videos/licences](#operation/getLicences))
6065 VideoConstantNumber-Licence:
6068 $ref: '#/components/schemas/VideoLicenceSet'
6071 example: Attribution - Share Alike
6075 description: language id of the video (see [/videos/languages](#operation/getLanguages))
6077 VideoConstantString-Language:
6080 $ref: '#/components/schemas/VideoLanguageSet'
6085 VideoPlaylistPrivacySet:
6091 description: Video playlist privacy policy (see [/video-playlists/privacies])
6092 VideoPlaylistPrivacyConstant:
6095 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
6099 VideoPlaylistTypeSet:
6104 description: The video playlist type (Regular = `1`, Watch Later = `2`)
6105 VideoPlaylistTypeConstant:
6108 $ref: '#/components/schemas/VideoPlaylistTypeSet'
6119 description: privacy id of the video (see [/videos/privacies](#operation/getPrivacyPolicies))
6120 VideoPrivacyConstant:
6123 $ref: '#/components/schemas/VideoPrivacySet'
6131 additionalProperties:
6132 x-additionalPropertiesName: account
6141 additionalProperties:
6142 x-additionalPropertiesName: host
6163 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
6170 description: 'Admin flags for the user (None = `0`, Bypass video blocklist = `1`)'
6173 LiveVideoLatencyMode:
6179 description: 'The live latency mode (Default = `1`, High latency = `2`, Small Latency = `3`)'
6200 - `4`: Waiting for live stream
6202 - `6`: To move to an external storage (object storage...)
6203 - `7`: Transcoding failed
6204 - `8`: Moving to an external storage failed
6205 - `9`: To edit using studio edition feature
6215 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
6219 $ref: '#/components/schemas/AbuseStateSet'
6222 AbusePredefinedReasons:
6235 example: [spamOrMisleading]
6240 Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`)
6242 `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos.
6244 VideoResolutionConstant:
6245 description: resolutions and their labels for the video
6248 $ref: '#/components/schemas/VideoResolutionSet'
6252 VideoScheduledUpdate:
6255 $ref: '#/components/schemas/VideoPrivacySet'
6259 description: When to update the video
6279 $ref: '#/components/schemas/ActorImage'
6280 VideoChannelSummary:
6283 $ref: '#/components/schemas/id'
6297 $ref: '#/components/schemas/ActorImage'
6311 - $ref: '#/components/schemas/Video'
6316 $ref: '#/components/schemas/id'
6320 description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file
6321 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
6323 $ref: '#/components/schemas/VideoResolutionConstant'
6326 description: Video file size in bytes
6329 description: Direct URL of the torrent file
6333 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
6337 description: Direct URL of the video
6341 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
6345 description: Frames per second of the video file
6349 description: URL dereferencing the output of ffprobe on the file
6350 VideoStreamingPlaylists:
6355 $ref: '#/components/schemas/id'
6363 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS'
6364 VideoStreamingPlaylists-HLS:
6375 Video files associated to this playlist.
6377 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.)
6379 $ref: '#/components/schemas/VideoFile'
6391 $ref: '#/components/schemas/Video/properties/id'
6393 $ref: '#/components/schemas/Video/properties/uuid'
6395 $ref: '#/components/schemas/Video/properties/name'
6399 description: object id for the video
6401 - $ref: '#/components/schemas/id'
6403 description: universal identifier for the video, that can be used across instances
6405 - $ref: '#/components/schemas/UUIDv4'
6408 - $ref: '#/components/schemas/shortUUID'
6414 example: 2017-10-01T10:52:46.396Z
6415 description: time at which the video object was first drafted
6419 example: 2018-10-01T10:52:46.396Z
6420 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
6424 example: 2021-05-04T08:01:01.502Z
6425 description: last time the video's metadata was modified
6426 originallyPublishedAt:
6429 example: 2010-10-01T10:52:46.396Z
6430 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
6433 - $ref: '#/components/schemas/VideoConstantNumber-Category'
6434 description: category in which the video is classified
6437 - $ref: '#/components/schemas/VideoConstantNumber-Licence'
6438 description: licence under which the video is distributed
6441 - $ref: '#/components/schemas/VideoConstantString-Language'
6442 description: main language used in the video
6445 - $ref: '#/components/schemas/VideoPrivacyConstant'
6446 description: privacy policy used to distribute the video
6450 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n
6451 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr...
6455 truncated description of the video, written in Markdown.
6456 Resolve `descriptionPath` to get the full description of maximum `10000` characters.
6461 description: duration of the video in seconds
6466 description: title of the video
6467 example: What is PeerTube?
6472 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
6475 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
6478 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
6495 - $ref: '#/components/schemas/VideoStateConstant'
6496 description: represents the internal state of the video processing within the PeerTube instance
6500 - $ref: '#/components/schemas/VideoScheduledUpdate'
6508 $ref: '#/components/schemas/AccountSummary'
6510 $ref: '#/components/schemas/VideoChannelSummary'
6519 - $ref: '#/components/schemas/Video'
6524 description: If the video is a live, you have the amount of current viewers
6527 example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description
6528 description: path at which to get the full description of maximum `10000` characters
6531 description: A text tell the audience how to support the video creator
6532 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6536 $ref: '#/components/schemas/VideoChannel'
6538 $ref: '#/components/schemas/Account'
6540 example: [flowers, gardening]
6558 - https://peertube2.cpy.re/tracker/announce
6559 - wss://peertube2.cpy.re/tracker/socket
6563 $ref: '#/components/schemas/VideoFile'
6565 WebTorrent/raw video files. If WebTorrent is disabled on the server:
6567 - field will be empty
6568 - video files will be found in `streamingPlaylists[].files` field
6572 $ref: '#/components/schemas/VideoStreamingPlaylists'
6574 HLS playlists/manifest files. If HLS is disabled on the server:
6576 - field will be empty
6577 - video files will be found in `files` field
6578 FileRedundancyInformation:
6581 $ref: '#/components/schemas/id'
6606 $ref: '#/components/schemas/id'
6613 $ref: '#/components/schemas/UUIDv4'
6620 $ref: '#/components/schemas/FileRedundancyInformation'
6624 $ref: '#/components/schemas/FileRedundancyInformation'
6625 VideoImportStateConstant:
6633 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
6640 additionalProperties: false
6644 $ref: '#/components/schemas/VideoImport/properties/targetUrl'
6645 required: [targetUrl]
6648 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
6649 required: [magnetUri]
6652 $ref: '#/components/schemas/VideoImport/properties/torrentfile'
6653 required: [torrentfile]
6654 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6663 - $ref: '#/components/schemas/id'
6667 description: remote URL where to find the import's source video
6668 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
6672 description: magnet URI allowing to resolve the import's source video
6673 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
6678 description: Torrent file containing only the video file
6685 - $ref: '#/components/schemas/VideoImportStateConstant'
6701 - $ref: '#/components/schemas/Video'
6711 $ref: '#/components/schemas/VideoImport'
6715 $ref: '#/components/schemas/id'
6718 example: The video is a spam
6722 $ref: '#/components/schemas/AbusePredefinedReasons'
6724 $ref: '#/components/schemas/Account'
6726 $ref: '#/components/schemas/AbuseStateConstant'
6729 example: Decided to ban the server since it spams us regularly
6733 $ref: '#/components/schemas/VideoInfo'
6740 $ref: '#/components/schemas/id'
6751 $ref: '#/components/schemas/AccountSummary'
6755 $ref: '#/components/schemas/id'
6757 $ref: '#/components/schemas/Video/properties/id'
6769 $ref: '#/components/schemas/UUIDv4'
6787 $ref: '#/components/schemas/id'
6789 $ref: '#/components/schemas/UUIDv4'
6792 - $ref: '#/components/schemas/shortUUID'
6815 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
6817 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
6819 $ref: '#/components/schemas/AccountSummary'
6821 $ref: '#/components/schemas/VideoChannelSummary'
6825 $ref: '#/components/schemas/id'
6832 description: Text of the comment
6834 example: This video is wonderful!
6836 $ref: '#/components/schemas/id'
6840 - $ref: '#/components/schemas/id'
6842 $ref: '#/components/schemas/Video/properties/id'
6857 totalRepliesFromVideoAuthor:
6864 $ref: '#/components/schemas/Account'
6865 VideoCommentThreadTree:
6868 $ref: '#/components/schemas/VideoComment'
6872 $ref: '#/components/schemas/VideoCommentThreadTree'
6876 $ref: '#/components/schemas/VideoConstantString-Language'
6898 $ref: '#/components/schemas/id'
6909 $ref: '#/components/schemas/ActorImage'
6913 $ref: '#/components/schemas/id'
6918 description: immutable name of the actor, used to find or mention it
6920 - $ref: '#/components/schemas/username'
6924 description: server on which the actor is resident
6925 hostRedundancyAllowed:
6927 description: whether this actor's host allows redundancy of its videos
6931 description: number of actors subscribed to by this actor, as seen by this instance
6935 description: number of followers of this actor, as seen by this instance
6944 - $ref: '#/components/schemas/Actor'
6947 description: object id for the user tied to this account
6949 - $ref: '#/components/schemas/User/properties/id'
6952 description: editable name of the account, displayed in its representations
6957 description: text or bio displayed on the account's profile
6965 description: timestamp within the video, in seconds
6972 Event since last viewing call:
6973 * `seek` - If the user seeked the video
6996 VideoStatsRetention:
7008 VideoStatsTimeserie:
7085 allowedForCurrentIP:
7087 requiresEmailVerification:
7105 $ref: '#/components/schemas/VideoResolutionSet'
7122 videoChannelSynchronization:
7195 example: 16810141515
7236 description: URL of the current user page
7243 description: Stack trace of the error if there is one
7246 description: User agent of the web browser that sends the message
7249 description: Additional information regarding this log
7259 totalDailyActiveUsers:
7261 totalWeeklyActiveUsers:
7263 totalMonthlyActiveUsers:
7267 totalLocalVideoViews:
7269 description: Total video views made on the instance
7270 totalLocalVideoComments:
7272 description: Total comments made by local users
7273 totalLocalVideoFilesSize:
7279 totalLocalVideoChannels:
7281 totalLocalDailyActiveVideoChannels:
7283 totalLocalWeeklyActiveVideoChannels:
7285 totalLocalMonthlyActiveVideoChannels:
7287 totalLocalPlaylists:
7289 totalInstanceFollowers:
7291 totalInstanceFollowing:
7308 totalActivityPubMessagesProcessed:
7310 totalActivityPubMessagesSuccesses:
7312 totalActivityPubMessagesErrors:
7315 activityPubMessagesProcessedPerSecond:
7317 totalActivityPubMessagesWaiting:
7394 requiresEmailVerification:
7409 description: Settings that apply to new users, if registration is enabled
7413 example: 16810141515
7419 description: Settings pertaining to transcoding jobs
7423 allowAdditionalExtensions:
7425 description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos
7428 description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
7431 description: Amount of threads used by ffmpeg for 1 transcoding job
7434 description: Amount of transcoding jobs to execute in parallel
7440 New profiles can be added by plugins ; available in core PeerTube: 'default'.
7443 description: Resolutions to transcode _new videos_ to
7465 description: WebTorrent-specific settings
7471 description: HLS-specific settings
7491 video_channel_synchronization:
7526 $ref: '#/components/schemas/id'
7528 $ref: '#/components/schemas/Actor'
7530 $ref: '#/components/schemas/Actor'
7533 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
7546 PredefinedAbuseReasons:
7547 description: Reason categories that help triage reports
7565 $ref: '#/components/schemas/id'
7577 - activitypub-http-unicast
7578 - activitypub-http-broadcast
7579 - activitypub-http-fetcher
7580 - activitypub-follow
7585 - videos-views-stats
7586 - activitypub-refresher
7588 - video-channel-import
7591 additionalProperties: true
7594 additionalProperties: true
7610 $ref: '#/components/schemas/id'
7615 $ref: '#/components/schemas/id'
7616 VideoUploadRequestCommon:
7619 description: Video name
7621 example: What is PeerTube?
7625 description: Channel id that will contain this video
7630 $ref: '#/components/schemas/VideoPrivacySet'
7632 $ref: '#/components/schemas/VideoCategorySet'
7634 $ref: '#/components/schemas/VideoLicenceSet'
7636 $ref: '#/components/schemas/VideoLanguageSet'
7638 description: Video description
7641 **[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)**
7643 description: Whether or not we wait transcoding before publish the video
7646 description: A text tell the audience how to support the video creator
7647 example: Please support our work on https://soutenir.framasoft.org/en/ <3
7650 description: Whether or not this video contains sensitive content
7653 description: Video tags (maximum 5 tags each between 2 and 30 characters)
7666 description: Enable or disable comments for this video
7669 description: Enable or disable downloading for this video
7671 originallyPublishedAt:
7672 description: Date when the content was originally published
7676 $ref: '#/components/schemas/VideoScheduledUpdate'
7678 description: Video thumbnail file
7682 description: Video preview file
7688 VideoUploadRequestLegacy:
7690 - $ref: '#/components/schemas/VideoUploadRequestCommon'
7696 description: Video file
7699 VideoUploadRequestResumable:
7701 - $ref: '#/components/schemas/VideoUploadRequestCommon'
7707 description: Video filename including extension
7710 example: what_is_peertube.mp4
7712 description: Video thumbnail file
7716 description: Video preview file
7719 VideoUploadResponse:
7725 $ref: '#/components/schemas/Video/properties/id'
7727 $ref: '#/components/schemas/Video/properties/uuid'
7729 $ref: '#/components/schemas/Video/properties/shortUUID'
7730 CommentThreadResponse:
7739 $ref: '#/components/schemas/VideoComment'
7740 CommentThreadPostResponse:
7743 $ref: '#/components/schemas/VideoComment'
7763 $ref: '#/components/schemas/Video'
7767 $ref: '#/components/schemas/Account'
7770 description: Automatically start playing the upcoming video after the currently playing video
7771 autoPlayNextVideoPlaylist:
7773 description: Automatically start playing the video on the playlist after the currently playing video
7776 description: Automatically start playing the video on the watch page
7786 description: The user email
7789 description: Has the user confirmed their email address?
7792 - $ref: '#/components/schemas/id'
7796 description: Auth plugin to use to authenticate the user
7800 noInstanceConfigWarningModal:
7802 noAccountSetupWarningModal:
7807 $ref: '#/components/schemas/NSFWPolicy'
7812 $ref: '#/components/schemas/UserRole'
7821 description: Theme enabled by this user
7823 $ref: '#/components/schemas/username'
7827 $ref: '#/components/schemas/VideoChannel'
7830 description: The user video quota in bytes
7834 description: The user daily video quota in bytes
7838 description: Enable P2P in the player
7841 - $ref: '#/components/schemas/User'
7843 # optionally present fields: they require WITH_STATS scope
7846 description: Count of videos published
7849 description: Count of reports/abuses of which the user is a target
7850 abusesAcceptedCount:
7852 description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team
7855 description: Count of reports/abuses created by the user
7858 description: Count of comments published
7862 $ref: '#/components/schemas/username'
7864 $ref: '#/components/schemas/password'
7868 description: The user email
7871 description: The user video quota in bytes
7875 description: The user daily video quota in bytes
7878 $ref: '#/components/schemas/usernameChannel'
7880 $ref: '#/components/schemas/UserRole'
7882 $ref: '#/components/schemas/UserAdminFlags'
7893 description: The updated email of the user
7895 - $ref: '#/components/schemas/User/properties/email'
7898 description: Set the email as verified
7901 description: The updated video quota of the user in bytes
7904 description: The updated daily video quota of the user in bytes
7908 description: The auth plugin to use to authenticate the user
7909 example: 'peertube-plugin-auth-saml2'
7911 $ref: '#/components/schemas/UserRole'
7913 $ref: '#/components/schemas/UserAdminFlags'
7915 $ref: '#/components/schemas/password'
7917 # see shared/models/users/user-update-me.model.ts:
7920 $ref: '#/components/schemas/password'
7922 $ref: '#/components/schemas/password'
7924 description: new email used for login and service communications
7926 - $ref: '#/components/schemas/User/properties/email'
7929 description: new name of the user in its representations
7934 description: new NSFW display policy
7941 description: whether to enable P2P in the player or not
7944 description: new preference regarding playing videos automatically
7947 description: new preference regarding playing following videos automatically
7948 autoPlayNextVideoPlaylist:
7950 description: new preference regarding playing following playlist videos automatically
7951 videosHistoryEnabled:
7953 description: whether to keep track of watched history or not
7958 description: list of languages to filter videos down to
7961 noInstanceConfigWarningModal:
7963 noAccountSetupWarningModal:
7970 $ref: '#/components/schemas/id'
7977 description: Rating of the video
7984 $ref: '#/components/schemas/Video'
7991 description: Rating of the video
7999 description: immutable name of the user, used to find or mention its actor
8001 - $ref: '#/components/schemas/username'
8003 $ref: '#/components/schemas/password'
8007 description: email of the user, used for login or service communications
8010 description: editable name of the user, displayed in its representations
8015 description: channel base information used to create the first channel of the user
8018 $ref: '#/components/schemas/usernameChannel'
8026 UserRegistrationRequest:
8028 - $ref: '#/components/schemas/RegisterUser'
8033 description: reason for the user to register on the instance
8035 - registrationReason
8037 UserRegistrationAcceptOrReject:
8042 description: Moderation response to send to the user
8043 preventEmailDelivery:
8045 description: Set it to true if you don't want PeerTube to send an email to the user
8047 - moderationResponse
8052 $ref: '#/components/schemas/id'
8062 description: 'The registration state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
8092 description: If the registration has been accepted, this is a partial user object created by the registration
8095 $ref: '#/components/schemas/id'
8101 pattern: /^[a-z0-9]$/
8104 example: v1ikx5hnfop4mdpnci8nsqh93c45rldf
8107 pattern: /^[a-zA-Z0-9]$/
8110 example: AjWiOapPltI6EnsWQwlFarRtLh4u8tDt
8111 OAuthToken-password:
8113 - $ref: '#/components/schemas/OAuthClient'
8123 $ref: '#/components/schemas/User/properties/username'
8125 $ref: '#/components/schemas/password'
8132 OAuthToken-refresh_token:
8134 - $ref: '#/components/schemas/OAuthClient'
8145 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
8154 - $ref: '#/components/schemas/Actor'
8159 description: editable name of the channel, displayed in its representations
8160 example: Videos of Framasoft
8165 example: Videos made with <3 by Framasoft
8170 description: text shown by default on all videos of this channel, to tell the audience how to support it
8171 example: Please support our work on https://soutenir.framasoft.org/en/ <3
8184 $ref: '#/components/schemas/ActorImage'
8193 $ref: '#/components/schemas/UUIDv4'
8198 description: Channel display name
8200 description: Channel description
8202 description: How to support/fund the channel
8206 - $ref: '#/components/schemas/VideoChannelEdit'
8209 description: username of the channel to create
8211 - $ref: '#/components/schemas/usernameChannel'
8217 - $ref: '#/components/schemas/VideoChannelEdit'
8219 bulkVideosSupportUpdate:
8221 description: Update the support field for all videos of this channel
8232 - $ref: '#/components/schemas/VideoChannel'
8233 - $ref: '#/components/schemas/Actor'
8235 ImportVideosInChannelCreate:
8240 example: https://youtube.com/c/UC_myfancychannel
8243 description: If part of a channel sync process, specify its id to assign video imports to this channel synchronization
8245 - 'externalChannelUrl'
8251 $ref: '#/components/schemas/id'
8263 example: 'https://youtube.com/c/UC_myfancychannel'
8272 $ref: '#/components/schemas/VideoChannel'
8273 VideoChannelSyncList:
8283 - $ref: '#/components/schemas/VideoChannelSync'
8284 VideoChannelSyncCreate:
8289 example: https://youtube.com/c/UC_myfancychannel
8291 $ref: '#/components/schemas/id'
8295 name: 'media:peerLink'
8304 - application/x-bittorrent
8310 name: 'media:content'
8341 VideoCommentsForXML:
8376 description: video watch page URL
8379 description: video canonical URL
8383 description: video publication date
8386 description: video description
8389 description: video description
8392 description: publisher user name
8395 description: video category (MRSS)
8398 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
8413 description: video embed path, relative to the canonical URL domain (MRSS)
8422 description: video watch path, relative to the canonical URL domain (MRSS)
8443 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
8444 'media:description':
8451 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
8454 description: main streamable file for the video
8464 - application/x-bittorrent
8473 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)
8476 - $ref: '#/components/schemas/MRSSPeerLink'
8477 - $ref: '#/components/schemas/MRSSGroupContent'
8478 NotificationSettingValue:
8481 Notification type. One of the following values, or a sum of multiple values:
8491 $ref: '#/components/schemas/id'
8495 Notification type, following the `UserNotificationType` enum:
8497 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
8499 - `2` NEW_COMMENT_ON_MY_VIDEO
8501 - `3` NEW_ABUSE_FOR_MODERATORS
8503 - `4` BLACKLIST_ON_MY_VIDEO
8505 - `5` UNBLACKLIST_ON_MY_VIDEO
8507 - `6` MY_VIDEO_PUBLISHED
8509 - `7` MY_VIDEO_IMPORT_SUCCESS
8511 - `8` MY_VIDEO_IMPORT_ERROR
8513 - `9` NEW_USER_REGISTRATION
8517 - `11` COMMENT_MENTION
8519 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
8521 - `13` NEW_INSTANCE_FOLLOWER
8523 - `14` AUTO_INSTANCE_FOLLOWING
8525 - `15` ABUSE_STATE_CHANGE
8527 - `16` ABUSE_NEW_MESSAGE
8529 - `17` NEW_PLUGIN_VERSION
8531 - `18` NEW_PEERTUBE_VERSION
8537 - $ref: '#/components/schemas/VideoInfo'
8541 $ref: '#/components/schemas/ActorInfo'
8547 $ref: '#/components/schemas/id'
8550 $ref: '#/components/schemas/VideoInfo'
8555 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
8565 $ref: '#/components/schemas/id'
8569 $ref: '#/components/schemas/VideoInfo'
8571 $ref: '#/components/schemas/ActorInfo'
8577 $ref: '#/components/schemas/id'
8580 - $ref: '#/components/schemas/VideoInfo'
8586 $ref: '#/components/schemas/id'
8589 - $ref: '#/components/schemas/VideoInfo'
8593 - $ref: '#/components/schemas/ActorInfo'
8599 $ref: '#/components/schemas/id'
8601 $ref: '#/components/schemas/ActorInfo'
8629 NotificationListResponse:
8638 $ref: '#/components/schemas/Notification'
8643 example: peertube-plugin-auth-ldap
8671 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
8674 additionalProperties: true
8690 $ref: '#/components/schemas/Plugin'
8697 description: User can stream multiple times in a permanent live
8700 description: User can select live latency mode if enabled by the instance
8701 $ref: '#/components/schemas/LiveVideoLatencyMode'
8707 description: Included in the response if an appropriate token is provided
8710 description: Included in the response if an appropriate token is provided
8713 description: RTMP stream key to use to stream into this live video. Included in the response if an appropriate token is provided
8717 description: User can stream multiple times in a permanent live
8720 description: User can select live latency mode if enabled by the instance
8721 $ref: '#/components/schemas/LiveVideoLatencyMode'
8723 RequestTwoFactorResponse:
8730 description: The token to send to confirm this request
8733 description: The OTP secret
8736 description: The OTP URI
8738 VideoStudioCreateTask:
8786 title: add-watermark
8800 LiveVideoSessionResponse:
8807 description: Start date of the live session
8812 description: End date of the live session
8823 Error type if an error occurred during the live session:
8824 - `1`: Bad socket health (transcoding is too slow)
8825 - `2`: Max duration exceeded
8826 - `3`: Quota exceeded
8827 - `4`: Quota FFmpeg error
8828 - `5`: Video has been blacklisted during the live
8831 description: Video replay information
8836 $ref: '#/components/schemas/UUIDv4'
8838 $ref: '#/components/schemas/shortUUID'
8840 PlaybackMetricCreate:
8845 - 'p2p-media-loader'
8849 description: Current player video resolution
8852 description: Current player video fps
8855 description: How many resolution changes occured since the last metric creation
8858 description: How many errors occured since the last metric creation
8861 description: How many bytes were downloaded with P2P since the last metric creation
8862 downloadedBytesHTTP:
8864 description: How many bytes were downloaded with HTTP since the last metric creation
8867 description: How many bytes were uploaded with P2P since the last metric creation
8870 - $ref: '#/components/schemas/id'
8871 - $ref: '#/components/schemas/UUIDv4'
8872 - $ref: '#/components/schemas/shortUUID'
8877 - downloadedBytesP2P
8878 - downloadedBytesHTTP
8884 'https://search.example.org/api/v1/search/videos':
8886 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
8889 description: successful operation
8893 $ref: '#/components/schemas/VideoListResponse'