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'
720 - $ref: '#/components/parameters/excludeAlreadyWatched'
723 description: successful operation
727 $ref: '#/components/schemas/VideoListResponse'
731 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
732 .then(function(response) {
733 return response.json()
734 }).then(function(data) {
740 curl -s https://peertube2.cpy.re/api/v1/accounts/{name}/videos | jq
746 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
748 http = Net::HTTP.new(uri.host, uri.port)
751 response = http.get(uri.request_uri)
753 puts JSON.parse(response.read_body)
758 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
763 '/api/v1/accounts/{name}/followers':
767 summary: 'List followers of an account'
770 operationId: getAccountFollowers
772 - $ref: '#/components/parameters/name'
773 - $ref: '#/components/parameters/start'
774 - $ref: '#/components/parameters/count'
775 - $ref: '#/components/parameters/followersSort'
776 - $ref: '#/components/parameters/search'
779 description: successful operation
791 $ref: '#/components/schemas/Follow'
797 summary: List accounts
798 operationId: getAccounts
800 - $ref: '#/components/parameters/start'
801 - $ref: '#/components/parameters/count'
802 - $ref: '#/components/parameters/sort'
805 description: successful operation
811 $ref: '#/components/schemas/Account'
817 summary: Get instance public configuration
818 operationId: getConfig
821 description: successful operation
825 $ref: '#/components/schemas/ServerConfig'
828 externalValue: https://peertube2.cpy.re/api/v1/config
830 /api/v1/config/about:
832 summary: Get instance "About" information
833 operationId: getAbout
838 description: successful operation
842 $ref: '#/components/schemas/ServerConfigAbout'
845 externalValue: https://peertube2.cpy.re/api/v1/config/about
847 /api/v1/config/custom:
849 summary: Get instance runtime configuration
850 operationId: getCustomConfig
858 description: successful operation
862 $ref: '#/components/schemas/ServerConfigCustom'
864 summary: Set instance runtime configuration
865 operationId: putCustomConfig
873 description: successful operation
875 x-summary: field inconsistencies
878 - the emailer is disabled and the instance is open to registrations
879 - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
881 summary: Delete instance runtime configuration
882 operationId: delCustomConfig
890 description: successful operation
892 /api/v1/custom-pages/homepage/instance:
894 summary: Get instance custom homepage
899 description: No homepage set
901 description: successful operation
905 $ref: '#/components/schemas/CustomHomepage'
907 summary: Set instance custom homepage
921 description: content of the homepage, that will be injected in the client
924 description: successful operation
928 summary: Pause job queue
936 description: successful operation
940 summary: Resume job queue
948 description: successful operation
950 /api/v1/jobs/{state}:
952 summary: List instance jobs
963 description: The state of the job ('' for for no filter)
973 - $ref: '#/components/parameters/jobType'
974 - $ref: '#/components/parameters/start'
975 - $ref: '#/components/parameters/count'
976 - $ref: '#/components/parameters/sort'
979 description: successful operation
992 $ref: '#/components/schemas/Job'
994 /api/v1/server/followers:
998 summary: List instances following the server
1000 - $ref: '#/components/parameters/followState'
1001 - $ref: '#/components/parameters/actorType'
1002 - $ref: '#/components/parameters/start'
1003 - $ref: '#/components/parameters/count'
1004 - $ref: '#/components/parameters/sort'
1007 description: successful operation
1019 $ref: '#/components/schemas/Follow'
1021 '/api/v1/server/followers/{nameWithHost}':
1023 summary: Remove or reject a follower to your server
1030 - name: nameWithHost
1033 description: The remote actor handle to remove from your followers
1039 description: successful operation
1041 description: follower not found
1043 '/api/v1/server/followers/{nameWithHost}/reject':
1045 summary: Reject a pending follower to your server
1052 - name: nameWithHost
1055 description: The remote actor handle to remove from your followers
1061 description: successful operation
1063 description: follower not found
1065 '/api/v1/server/followers/{nameWithHost}/accept':
1067 summary: Accept a pending follower to your server
1074 - name: nameWithHost
1077 description: The remote actor handle to remove from your followers
1083 description: successful operation
1085 description: follower not found
1087 /api/v1/server/following:
1091 summary: List instances followed by the server
1093 - $ref: '#/components/parameters/followState'
1094 - $ref: '#/components/parameters/actorType'
1095 - $ref: '#/components/parameters/start'
1096 - $ref: '#/components/parameters/count'
1097 - $ref: '#/components/parameters/sort'
1100 description: successful operation
1112 $ref: '#/components/schemas/Follow'
1119 summary: Follow a list of actors (PeerTube instance, channel or account)
1122 description: successful operation
1124 description: cannot follow a non-HTTPS server
1143 '/api/v1/server/following/{hostOrHandle}':
1145 summary: Unfollow an actor (PeerTube instance, channel or account)
1152 - name: hostOrHandle
1155 description: The hostOrHandle to unfollow
1160 description: successful operation
1162 description: host or handle not found
1166 summary: Create a user
1167 operationId: addUser
1175 description: user created
1179 $ref: '#/components/schemas/AddUserResponse'
1183 operationId: getUser
1185 id: '$response.body#/user/id'
1188 operationId: putUser
1190 id: '$response.body#/user/id'
1191 # DELETE /users/{id}
1193 operationId: delUser
1195 id: '$response.body#/user/id'
1197 description: insufficient authority to create an admin or moderator
1202 $ref: '#/components/schemas/AddUser'
1204 If the smtp server is configured, you can leave the password empty and an email will be sent
1205 asking the user to set it first.
1209 operationId: getUsers
1216 - $ref: '#/components/parameters/usersSearch'
1217 - $ref: '#/components/parameters/usersBlocked'
1218 - $ref: '#/components/parameters/start'
1219 - $ref: '#/components/parameters/count'
1220 - $ref: '#/components/parameters/usersSort'
1223 description: successful operation
1229 $ref: '#/components/schemas/User'
1231 '/api/v1/users/{id}':
1233 - $ref: '#/components/parameters/id'
1235 summary: Delete a user
1241 operationId: delUser
1244 description: successful operation
1251 operationId: getUser
1255 description: include statistics about the user (only available as a moderator/admin)
1260 x-summary: successful operation
1262 As an admin/moderator, you can request a response augmented with statistics about the user's
1263 moderation relations and videos usage, by using the `withStats` parameter.
1268 - $ref: '#/components/schemas/User'
1269 - $ref: '#/components/schemas/UserWithStats'
1271 summary: Update a user
1276 operationId: putUser
1279 description: successful operation
1284 $ref: '#/components/schemas/UpdateUser'
1287 /api/v1/oauth-clients/local:
1289 summary: Login prerequisite
1290 description: You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken).
1291 operationId: getOAuthClient
1296 description: successful operation
1300 $ref: '#/components/schemas/OAuthClient'
1302 UseOAuthClientToLogin:
1303 operationId: getOAuthToken
1305 client_id: '$response.body#/client_id'
1306 client_secret: '$response.body#/client_secret'
1310 API="https://peertube2.cpy.re/api/v1"
1313 curl -s "$API/oauth-clients/local"
1315 /api/v1/users/token:
1318 operationId: getOAuthToken
1319 description: With your [client id and secret](#operation/getOAuthClient), you can retrieve an access and refresh tokens.
1324 application/x-www-form-urlencoded:
1327 - $ref: '#/components/schemas/OAuthToken-password'
1328 - $ref: '#/components/schemas/OAuthToken-refresh_token'
1330 propertyName: grant_type
1332 password: '#/components/schemas/OAuthToken-password'
1333 refresh_token: '#/components/schemas/OAuthToken-refresh_token'
1336 description: successful operation
1347 example: 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0
1348 description: valid for 1 day
1351 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
1352 description: valid for 2 weeks
1357 refresh_token_expires_in:
1362 x-summary: client or credentials are invalid
1364 Disambiguate via `type`:
1365 - `invalid_client` for an unmatched `client_id`
1366 - `invalid_grant` for unmatched credentials
1368 x-summary: token expired
1370 Disambiguate via `type`:
1371 - default value for a regular authentication failure
1372 - `invalid_token` for an expired token
1377 API="https://peertube2.cpy.re/api/v1"
1378 USERNAME="<your_username>"
1379 PASSWORD="<your_password>"
1382 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
1383 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
1384 curl -s "$API/users/token" \
1385 --data client_id="$client_id" \
1386 --data client_secret="$client_secret" \
1387 --data grant_type=password \
1388 --data username="$USERNAME" \
1389 --data password="$PASSWORD" \
1390 | jq -r ".access_token"
1392 /api/v1/users/revoke-token:
1395 description: Revokes your access token and its associated refresh token, destroying your current session.
1396 operationId: revokeOAuthToken
1403 description: successful operation
1405 /api/v1/users/ask-send-verify-email:
1407 summary: Resend user verification link
1408 operationId: resendEmailToVerifyUser
1420 description: User email
1425 description: successful operation
1427 /api/v1/users/registrations/ask-send-verify-email:
1429 summary: Resend verification link to registration email
1430 operationId: resendEmailToVerifyRegistration
1441 description: Registration email
1446 description: successful operation
1448 /api/v1/users/{id}/verify-email:
1450 summary: Verify a user
1451 operationId: verifyUser
1453 Following a user registration, the new user will receive an email asking to click a link
1454 containing a secret.
1455 This endpoint can also be used to verify a new email set in the user account.
1460 - $ref: '#/components/parameters/id'
1473 - verificationString
1476 description: successful operation
1478 description: invalid verification string
1480 description: user not found
1482 /api/v1/users/registrations/{registrationId}/verify-email:
1484 summary: Verify a registration email
1485 operationId: verifyRegistrationEmail
1487 Following a user registration request, the user will receive an email asking to click a link
1488 containing a secret.
1492 - $ref: '#/components/parameters/registrationId'
1503 - verificationString
1506 description: successful operation
1508 description: invalid verification string
1510 description: registration not found
1512 /api/v1/users/{id}/two-factor/request:
1514 summary: Request two factor auth
1515 operationId: requestTwoFactor
1516 description: Request two factor authentication for a user
1520 - $ref: '#/components/parameters/id'
1529 description: Password of the currently authenticated user
1532 description: successful operation
1538 $ref: '#/components/schemas/RequestTwoFactorResponse'
1540 description: invalid password
1542 description: user not found
1544 /api/v1/users/{id}/two-factor/confirm-request:
1546 summary: Confirm two factor auth
1547 operationId: confirmTwoFactorRequest
1548 description: Confirm a two factor authentication request
1552 - $ref: '#/components/parameters/id'
1561 description: Token to identify the two factor request
1564 description: OTP token generated by the app
1570 description: successful operation
1572 description: invalid request token or OTP token
1574 description: user not found
1576 /api/v1/users/{id}/two-factor/disable:
1578 summary: Disable two factor auth
1579 operationId: disableTwoFactor
1580 description: Disable two factor authentication of a user
1584 - $ref: '#/components/parameters/id'
1593 description: Password of the currently authenticated user
1596 description: successful operation
1598 description: invalid password
1600 description: user not found
1604 summary: Get my user information
1605 operationId: getUserInfo
1613 description: successful operation
1619 $ref: '#/components/schemas/User'
1621 summary: Update my user information
1622 operationId: putUserInfo
1630 description: successful operation
1635 $ref: '#/components/schemas/UpdateMe'
1638 /api/v1/users/me/videos/imports:
1640 summary: Get video imports of my user
1648 - $ref: '#/components/parameters/start'
1649 - $ref: '#/components/parameters/count'
1650 - $ref: '#/components/parameters/sort'
1655 description: Filter on import target URL
1659 name: videoChannelSyncId
1662 description: Filter on imports created by a specific channel synchronization
1669 description: Search in video names
1674 description: successful operation
1678 $ref: '#/components/schemas/VideoImportsList'
1680 /api/v1/users/me/video-quota-used:
1682 summary: Get my user used quota
1690 description: successful operation
1698 description: The user video quota used so far in bytes
1699 example: 16810141515
1700 videoQuotaUsedDaily:
1702 description: The user video quota used today in bytes
1705 '/api/v1/users/me/videos/{videoId}/rating':
1707 summary: Get rate of my user for a video
1717 description: The video id
1719 $ref: '#/components/schemas/Video/properties/id'
1722 description: successful operation
1726 $ref: '#/components/schemas/GetMeVideoRating'
1728 /api/v1/users/me/videos:
1730 summary: Get videos of my user
1738 - $ref: '#/components/parameters/start'
1739 - $ref: '#/components/parameters/count'
1740 - $ref: '#/components/parameters/sort'
1743 description: successful operation
1747 $ref: '#/components/schemas/VideoListResponse'
1749 /api/v1/users/me/subscriptions:
1751 summary: Get my user subscriptions
1758 - $ref: '#/components/parameters/start'
1759 - $ref: '#/components/parameters/count'
1760 - $ref: '#/components/parameters/sort'
1763 description: successful operation
1767 $ref: '#/components/schemas/VideoChannelList'
1771 summary: Add subscription to my user
1784 description: uri of the video channels to subscribe to
1790 uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr
1793 description: successful operation
1795 /api/v1/users/me/subscriptions/exist:
1797 summary: Get if subscriptions exist for my user
1804 - $ref: '#/components/parameters/subscriptionsUris'
1807 description: successful operation
1813 /api/v1/users/me/subscriptions/videos:
1815 summary: List videos of subscriptions of my user
1823 - $ref: '#/components/parameters/categoryOneOf'
1824 - $ref: '#/components/parameters/isLive'
1825 - $ref: '#/components/parameters/tagsOneOf'
1826 - $ref: '#/components/parameters/tagsAllOf'
1827 - $ref: '#/components/parameters/licenceOneOf'
1828 - $ref: '#/components/parameters/languageOneOf'
1829 - $ref: '#/components/parameters/nsfw'
1830 - $ref: '#/components/parameters/isLocal'
1831 - $ref: '#/components/parameters/include'
1832 - $ref: '#/components/parameters/privacyOneOf'
1833 - $ref: '#/components/parameters/hasHLSFiles'
1834 - $ref: '#/components/parameters/hasWebtorrentFiles'
1835 - $ref: '#/components/parameters/skipCount'
1836 - $ref: '#/components/parameters/start'
1837 - $ref: '#/components/parameters/count'
1838 - $ref: '#/components/parameters/videosSort'
1839 - $ref: '#/components/parameters/excludeAlreadyWatched'
1842 description: successful operation
1846 $ref: '#/components/schemas/VideoListResponse'
1848 '/api/v1/users/me/subscriptions/{subscriptionHandle}':
1850 summary: Get subscription of my user
1857 - $ref: '#/components/parameters/subscriptionHandle'
1860 description: successful operation
1864 $ref: '#/components/schemas/VideoChannel'
1866 summary: Delete subscription of my user
1873 - $ref: '#/components/parameters/subscriptionHandle'
1876 description: successful operation
1878 /api/v1/users/me/notifications:
1880 summary: List my notifications
1888 description: only list unread notifications
1891 - $ref: '#/components/parameters/start'
1892 - $ref: '#/components/parameters/count'
1893 - $ref: '#/components/parameters/sort'
1896 description: successful operation
1900 $ref: '#/components/schemas/NotificationListResponse'
1902 /api/v1/users/me/notifications/read:
1904 summary: Mark notifications as read by their id
1917 description: ids of the notifications to mark as read
1924 description: successful operation
1926 /api/v1/users/me/notifications/read-all:
1928 summary: Mark all my notification as read
1935 description: successful operation
1937 /api/v1/users/me/notification-settings:
1939 summary: Update my notification settings
1950 newVideoFromSubscription:
1951 $ref: '#/components/schemas/NotificationSettingValue'
1952 newCommentOnMyVideo:
1953 $ref: '#/components/schemas/NotificationSettingValue'
1955 $ref: '#/components/schemas/NotificationSettingValue'
1956 videoAutoBlacklistAsModerator:
1957 $ref: '#/components/schemas/NotificationSettingValue'
1959 $ref: '#/components/schemas/NotificationSettingValue'
1961 $ref: '#/components/schemas/NotificationSettingValue'
1962 myVideoImportFinished:
1963 $ref: '#/components/schemas/NotificationSettingValue'
1965 $ref: '#/components/schemas/NotificationSettingValue'
1966 newUserRegistration:
1967 $ref: '#/components/schemas/NotificationSettingValue'
1969 $ref: '#/components/schemas/NotificationSettingValue'
1970 newInstanceFollower:
1971 $ref: '#/components/schemas/NotificationSettingValue'
1972 autoInstanceFollowing:
1973 $ref: '#/components/schemas/NotificationSettingValue'
1976 description: successful operation
1978 /api/v1/users/me/history/videos:
1980 summary: List watched videos history
1986 - $ref: '#/components/parameters/start'
1987 - $ref: '#/components/parameters/count'
1988 - $ref: '#/components/parameters/search'
1991 description: successful operation
1995 $ref: '#/components/schemas/VideoListResponse'
1997 /api/v1/users/me/history/videos/{videoId}:
1999 summary: Delete history element
2009 $ref: '#/components/schemas/Video/properties/id'
2012 description: successful operation
2014 /api/v1/users/me/history/videos/remove:
2016 summary: Clear video history
2023 multipart/form-data:
2028 description: history before this date will be deleted
2033 description: successful operation
2035 /api/v1/users/me/avatar/pick:
2037 summary: Update my user avatar
2044 description: successful operation
2053 $ref: '#/components/schemas/ActorImage'
2055 description: image file too large
2057 X-File-Maximum-Size:
2061 description: Maximum file size for the avatar
2064 multipart/form-data:
2069 description: The file to upload
2074 contentType: image/png, image/jpeg
2076 /api/v1/users/me/avatar:
2078 summary: Delete my avatar
2085 description: successful operation
2087 /api/v1/users/register:
2089 summary: Register a user
2090 operationId: registerUser
2091 description: Signup has to be enabled and signup approval is not required
2096 description: successful operation
2098 description: request error
2100 description: user registration is not enabled, user limit is reached, registration is not allowed for the ip, requires approval or blocked by a plugin
2102 description: 'a user with this username, channel name or email already exists'
2107 $ref: '#/components/schemas/RegisterUser'
2110 /api/v1/users/registrations/request:
2112 summary: Request registration
2113 description: Signup has to be enabled and require approval on the instance
2114 operationId: requestRegistration
2119 description: successful operation
2123 $ref: '#/components/schemas/UserRegistration'
2125 description: request error or signup approval is not enabled on the instance
2127 description: user registration is not enabled, user limit is reached, registration is not allowed for the ip or blocked by a plugin
2129 description: 'a user or registration with this username, channel name or email already exists'
2134 $ref: '#/components/schemas/UserRegistrationRequest'
2136 /api/v1/users/registrations/{registrationId}/accept:
2142 summary: Accept registration
2143 operationId: acceptRegistration
2147 - $ref: '#/components/parameters/registrationId'
2152 $ref: '#/components/schemas/UserRegistrationAcceptOrReject'
2155 description: successful operation
2157 /api/v1/users/registrations/{registrationId}/reject:
2163 summary: Reject registration
2164 operationId: rejectRegistration
2168 - $ref: '#/components/parameters/registrationId'
2173 $ref: '#/components/schemas/UserRegistrationAcceptOrReject'
2176 description: successful operation
2178 /api/v1/users/registrations/{registrationId}:
2184 summary: Delete registration
2185 description: 'Delete the registration entry. It will not remove the user associated with this registration (if any)'
2186 operationId: deleteRegistration
2190 - $ref: '#/components/parameters/registrationId'
2193 description: successful operation
2195 /api/v1/users/registrations:
2201 summary: List registrations
2202 operationId: listRegistrations
2206 - $ref: '#/components/parameters/start'
2207 - $ref: '#/components/parameters/count'
2225 description: successful operation
2237 $ref: '#/components/schemas/UserRegistration'
2239 /api/v1/videos/ownership:
2241 summary: List video ownership changes
2243 - Video Ownership Change
2248 description: successful operation
2250 '/api/v1/videos/ownership/{id}/accept':
2252 summary: Accept ownership change request
2254 - Video Ownership Change
2258 - $ref: '#/components/parameters/idOrUUID'
2261 description: successful operation
2263 description: cannot terminate an ownership change of another user
2265 description: video ownership change not found
2267 '/api/v1/videos/ownership/{id}/refuse':
2269 summary: Refuse ownership change request
2271 - Video Ownership Change
2275 - $ref: '#/components/parameters/idOrUUID'
2278 description: successful operation
2280 description: cannot terminate an ownership change of another user
2282 description: video ownership change not found
2284 '/api/v1/videos/{id}/give-ownership':
2286 summary: Request ownership change
2288 - Video Ownership Change
2292 - $ref: '#/components/parameters/idOrUUID'
2296 application/x-www-form-urlencoded:
2306 description: successful operation
2308 description: changing video ownership to a remote account is not supported yet
2310 description: video not found
2312 '/api/v1/videos/{id}/token':
2314 summary: Request video token
2315 operationId: requestVideoToken
2316 description: Request special tokens that expire quickly to use them in some context (like accessing private static files)
2322 - $ref: '#/components/parameters/idOrUUID'
2325 description: successful operation
2329 $ref: '#/components/schemas/VideoTokenResponse'
2331 description: incorrect parameters
2333 description: video not found
2335 /api/v1/videos/{id}/studio/edit:
2337 summary: Create a studio task
2341 description: Create a task to edit a video (cut, add intro/outro etc)
2345 - $ref: '#/components/parameters/idOrUUID'
2349 application/x-www-form-urlencoded:
2351 $ref: '#/components/schemas/VideoStudioCreateTask'
2354 description: successful operation
2356 description: incorrect parameters
2358 description: video not found
2362 summary: List videos
2363 operationId: getVideos
2367 - $ref: '#/components/parameters/categoryOneOf'
2368 - $ref: '#/components/parameters/isLive'
2369 - $ref: '#/components/parameters/tagsOneOf'
2370 - $ref: '#/components/parameters/tagsAllOf'
2371 - $ref: '#/components/parameters/licenceOneOf'
2372 - $ref: '#/components/parameters/languageOneOf'
2373 - $ref: '#/components/parameters/nsfw'
2374 - $ref: '#/components/parameters/isLocal'
2375 - $ref: '#/components/parameters/include'
2376 - $ref: '#/components/parameters/privacyOneOf'
2377 - $ref: '#/components/parameters/hasHLSFiles'
2378 - $ref: '#/components/parameters/hasWebtorrentFiles'
2379 - $ref: '#/components/parameters/skipCount'
2380 - $ref: '#/components/parameters/start'
2381 - $ref: '#/components/parameters/count'
2382 - $ref: '#/components/parameters/videosSort'
2383 - $ref: '#/components/parameters/excludeAlreadyWatched'
2386 description: successful operation
2390 $ref: '#/components/schemas/VideoListResponse'
2392 /api/v1/videos/categories:
2394 summary: List available video categories
2395 operationId: getCategories
2400 description: successful operation
2409 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
2411 /api/v1/videos/licences:
2413 summary: List available video licences
2414 operationId: getLicences
2419 description: successful operation
2428 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
2430 /api/v1/videos/languages:
2432 summary: List available video languages
2433 operationId: getLanguages
2438 description: successful operation
2447 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
2449 /api/v1/videos/privacies:
2451 summary: List available video privacy policies
2452 operationId: getVideoPrivacyPolicies
2457 description: successful operation
2466 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
2468 '/api/v1/videos/{id}':
2470 summary: Update a video
2471 operationId: putVideo
2477 - $ref: '#/components/parameters/idOrUUID'
2480 description: successful operation
2483 multipart/form-data:
2488 description: Video thumbnail file
2492 description: Video preview file
2496 $ref: '#/components/schemas/VideoCategorySet'
2498 $ref: '#/components/schemas/VideoLicenceSet'
2500 $ref: '#/components/schemas/VideoLanguageSet'
2502 $ref: '#/components/schemas/VideoPrivacySet'
2504 description: Video description
2507 description: Whether or not we wait transcoding before publish the video
2510 description: A text tell the audience how to support the video creator
2511 example: Please support our work on https://soutenir.framasoft.org/en/ <3
2514 description: Whether or not this video contains sensitive content
2517 description: Video name
2522 description: Video tags (maximum 5 tags each between 2 and 30 characters)
2531 description: Enable or disable comments for this video
2534 description: Enable or disable downloading for this video
2536 originallyPublishedAt:
2537 description: Date when the content was originally published
2541 $ref: '#/components/schemas/VideoScheduledUpdate'
2544 contentType: image/jpeg
2546 contentType: image/jpeg
2548 summary: Get a video
2549 operationId: getVideo
2553 - $ref: '#/components/parameters/idOrUUID'
2556 description: successful operation
2560 $ref: '#/components/schemas/VideoDetails'
2562 summary: Delete a video
2563 operationId: delVideo
2569 - $ref: '#/components/parameters/idOrUUID'
2572 description: successful operation
2574 '/api/v1/videos/{id}/description':
2576 summary: Get complete video description
2577 operationId: getVideoDesc
2581 - $ref: '#/components/parameters/idOrUUID'
2584 description: successful operation
2593 **[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)**
2595 '/api/v1/videos/{id}/source':
2597 summary: Get video source file metadata
2598 operationId: getVideoSource
2602 - $ref: '#/components/parameters/idOrUUID'
2605 description: successful operation
2609 $ref: '#/components/schemas/VideoSource'
2611 '/api/v1/videos/{id}/views':
2613 summary: Notify user is watching a video
2614 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.
2615 operationId: addView
2619 - $ref: '#/components/parameters/idOrUUID'
2624 $ref: '#/components/schemas/UserViewingVideo'
2628 description: successful operation
2630 '/api/v1/videos/{id}/watching':
2632 summary: Set watching progress of a video
2634 description: This endpoint has been deprecated. Use `/videos/{id}/views` instead
2640 - $ref: '#/components/parameters/idOrUUID'
2645 $ref: '#/components/schemas/UserViewingVideo'
2649 description: successful operation
2651 '/api/v1/videos/{id}/stats/overall':
2653 summary: Get overall stats of a video
2659 - $ref: '#/components/parameters/idOrUUID'
2662 description: Filter stats by start date
2668 description: Filter stats by end date
2674 description: successful operation
2678 $ref: '#/components/schemas/VideoStatsOverall'
2680 '/api/v1/videos/{id}/stats/retention':
2682 summary: Get retention stats of a video
2688 - $ref: '#/components/parameters/idOrUUID'
2691 description: successful operation
2695 $ref: '#/components/schemas/VideoStatsRetention'
2697 '/api/v1/videos/{id}/stats/timeseries/{metric}':
2699 summary: Get timeserie stats of a video
2705 - $ref: '#/components/parameters/idOrUUID'
2710 description: The metric to get
2715 - 'aggregateWatchTime'
2718 description: Filter stats by start date
2724 description: Filter stats by end date
2730 description: successful operation
2734 $ref: '#/components/schemas/VideoStatsTimeserie'
2736 /api/v1/videos/upload:
2738 summary: Upload a video
2739 description: Uses a single request to upload a video.
2740 operationId: uploadLegacy
2748 description: successful operation
2752 $ref: '#/components/schemas/VideoUploadResponse'
2754 description: video didn't pass upload filter
2756 description: upload has timed out
2758 x-summary: video file too large, due to quota or max body size limit set by the reverse-proxy
2760 If the response has no body, it means the reverse-proxy didn't let it through. Otherwise disambiguate via `type`:
2761 - `quota_reached` for quota limits whether daily or global
2763 X-File-Maximum-Size:
2767 description: Maximum file size for the video
2769 description: video type unsupported
2771 description: video unreadable
2774 multipart/form-data:
2776 $ref: '#/components/schemas/VideoUploadRequestLegacy'
2779 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
2781 contentType: image/jpeg
2783 contentType: image/jpeg
2788 USERNAME="<your_username>"
2789 PASSWORD="<your_password>"
2790 FILE_PATH="<your_file_path>"
2791 CHANNEL_ID="<your_channel_id>"
2793 API="https://peertube2.cpy.re/api/v1"
2796 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
2797 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
2798 token=$(curl -s "$API/users/token" \
2799 --data client_id="$client_id" \
2800 --data client_secret="$client_secret" \
2801 --data grant_type=password \
2802 --data username="$USERNAME" \
2803 --data password="$PASSWORD" \
2804 | jq -r ".access_token")
2807 curl -s "$API/videos/upload" \
2808 -H "Authorization: Bearer $token" \
2810 --form videofile=@"$FILE_PATH" \
2811 --form channelId=$CHANNEL_ID \
2814 /api/v1/videos/upload-resumable:
2816 summary: Initialize the resumable upload of a video
2817 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video
2818 operationId: uploadResumableInit
2825 - name: X-Upload-Content-Length
2831 description: Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading.
2832 - name: X-Upload-Content-Type
2839 description: MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.
2844 $ref: '#/components/schemas/VideoUploadRequestResumable'
2847 description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead
2849 description: created
2855 example: /api/v1/videos/upload-resumable?upload_id=471e97554f21dec3b8bb5d4602939c51
2861 x-summary: video file too large, due to quota, absolute max file size or concurrent partial upload limit
2863 Disambiguate via `type`:
2864 - `max_file_size_reached` for the absolute file size limit
2865 - `quota_reached` for quota limits whether daily or global
2867 description: video type unsupported
2869 summary: Send chunk for the resumable upload of a video
2870 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
2871 operationId: uploadResumable
2882 Created session id to proceed with. If you didn't send chunks in the last hour, it is
2883 not valid anymore and you need to initialize a new upload.
2886 - name: Content-Range
2890 example: bytes 0-262143/2469036
2893 Specifies the bytes in the file that the request is uploading.
2895 For example, a value of `bytes 0-262143/1000000` shows that the request is sending the first
2896 262144 bytes (256 x 1024) in a 2,469,036 byte file.
2897 - name: Content-Length
2904 Size of the chunk that the request is sending.
2906 Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from
2907 1048576 bytes (~1MB) and increases or reduces size depending on connection health.
2910 application/octet-stream:
2916 description: last chunk received
2924 $ref: '#/components/schemas/VideoUploadResponse'
2926 description: resume incomplete
2931 example: bytes=0-262143
2937 description: video didn't pass upload filter
2939 description: upload not found
2941 description: chunk doesn't match range
2943 description: video unreadable
2945 description: too many concurrent requests
2947 description: upload is already being processed
2954 summary: Cancel the resumable upload of a video, deleting any data uploaded so far
2955 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video
2956 operationId: uploadResumableCancel
2967 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
2968 not valid anymore and the upload session has already been deleted with its data ;-)
2971 - name: Content-Length
2979 description: upload cancelled
2986 description: upload not found
2988 /api/v1/videos/imports:
2990 summary: Import a video
2991 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
2992 operationId: importVideo
3000 multipart/form-data:
3002 $ref: '#/components/schemas/VideoCreateImport'
3005 contentType: application/x-bittorrent
3007 contentType: image/jpeg
3009 contentType: image/jpeg
3012 description: successful operation
3016 $ref: '#/components/schemas/VideoUploadResponse'
3018 description: '`magnetUri` or `targetUrl` or a torrent file missing'
3020 description: video didn't pass pre-import filter
3022 description: HTTP or Torrent/magnetURI import not enabled
3024 /api/v1/videos/imports/{id}/cancel:
3026 summary: Cancel video import
3027 description: Cancel a pending video import
3033 - $ref: '#/components/parameters/id'
3036 description: successful operation
3038 /api/v1/videos/imports/{id}:
3040 summary: Delete video import
3041 description: Delete ended video import
3047 - $ref: '#/components/parameters/id'
3050 description: successful operation
3052 /api/v1/videos/live:
3054 summary: Create a live
3055 operationId: addLive
3063 description: successful operation
3067 $ref: '#/components/schemas/VideoUploadResponse'
3069 x-summary: validation error, or conflicting `saveReplay` and `permanentLive` parameter set
3071 Disambiguate via `type`:
3072 - default type for a validation error
3073 - `live_conflicting_permanent_and_save_replay` for conflicting parameters set
3075 x-summary: live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
3077 Disambiguate via `type`:
3078 - `live_not_enabled` for a disabled live feature
3079 - `live_not_allowing_replay` for a disabled replay feature
3080 - `max_instance_lives_limit_reached` for the absolute concurrent live limit
3081 - `max_user_lives_limit_reached` for the user concurrent live limit
3084 multipart/form-data:
3089 description: Channel id that will contain this live video
3094 $ref: '#/components/schemas/LiveVideoReplaySettings'
3096 description: User can stream multiple times in a permanent live
3099 description: User can select live latency mode if enabled by the instance
3100 $ref: '#/components/schemas/LiveVideoLatencyMode'
3102 description: Live video/replay thumbnail file
3106 description: Live video/replay preview file
3110 $ref: '#/components/schemas/VideoPrivacySet'
3112 $ref: '#/components/schemas/VideoCategorySet'
3114 $ref: '#/components/schemas/VideoLicenceSet'
3116 $ref: '#/components/schemas/VideoLanguageSet'
3118 description: Live video/replay description
3121 description: A text tell the audience how to support the creator
3122 example: Please support our work on https://soutenir.framasoft.org/en/ <3
3125 description: Whether or not this live video/replay contains sensitive content
3128 description: Live video/replay name
3133 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
3142 description: Enable or disable comments for this live video/replay
3145 description: Enable or disable downloading for the replay of this live video
3152 contentType: image/jpeg
3154 contentType: image/jpeg
3156 /api/v1/videos/live/{id}:
3158 summary: Get information about a live
3159 operationId: getLiveId
3166 - $ref: '#/components/parameters/idOrUUID'
3169 description: successful operation
3173 $ref: '#/components/schemas/LiveVideoResponse'
3175 summary: Update information about a live
3176 operationId: updateLiveId
3183 - $ref: '#/components/parameters/idOrUUID'
3188 $ref: '#/components/schemas/LiveVideoUpdate'
3191 description: successful operation
3193 description: bad parameters or trying to update a live that has already started
3195 description: trying to save replay of the live but saving replay is not enabled on the instance
3196 /api/v1/videos/live/{id}/sessions:
3198 summary: List live sessions
3199 description: List all sessions created in a particular live
3205 - $ref: '#/components/parameters/idOrUUID'
3208 description: successful operation
3220 $ref: '#/components/schemas/LiveVideoSessionResponse'
3221 /api/v1/videos/{id}/live-session:
3223 summary: Get live session of a replay
3224 description: If the video is a replay of a live, you can find the associated live session using this endpoint
3230 - $ref: '#/components/parameters/idOrUUID'
3233 description: successful operation
3237 $ref: '#/components/schemas/LiveVideoSessionResponse'
3239 /api/v1/users/me/abuses:
3241 summary: List my abuses
3242 operationId: getMyAbuses
3251 description: only list the report with this id
3257 $ref: '#/components/schemas/AbuseStateSet'
3258 - $ref: '#/components/parameters/abusesSort'
3259 - $ref: '#/components/parameters/start'
3260 - $ref: '#/components/parameters/count'
3263 description: successful operation
3275 $ref: '#/components/schemas/Abuse'
3279 summary: List abuses
3280 operationId: getAbuses
3290 description: only list the report with this id
3293 - name: predefinedReason
3295 description: predefined reason the listed reports should contain
3297 $ref: '#/components/schemas/PredefinedAbuseReasons'
3300 description: plain search that will match with video titles, reporter names and more
3306 $ref: '#/components/schemas/AbuseStateSet'
3307 - name: searchReporter
3309 description: only list reports of a specific reporter
3312 - name: searchReportee
3313 description: only list reports of a specific reportee
3319 description: only list reports of a specific video
3322 - name: searchVideoChannel
3324 description: only list reports of a specific video channel
3329 description: only list deleted or blocklisted videos
3337 description: only list account, comment or video reports
3344 - $ref: '#/components/parameters/start'
3345 - $ref: '#/components/parameters/count'
3346 - $ref: '#/components/parameters/abusesSort'
3349 description: successful operation
3361 $ref: '#/components/schemas/Abuse'
3363 summary: Report an abuse
3376 description: Reason why the user reports this video
3381 $ref: '#/components/schemas/PredefinedAbuseReasons'
3386 description: Video id to report
3388 - $ref: '#/components/schemas/Video/properties/id'
3392 description: Timestamp in the video that marks the beginning of the report
3397 description: Timestamp in the video that marks the ending of the report
3403 description: Comment id to report
3405 - $ref: '#/components/schemas/VideoComment/properties/id'
3410 description: Account id to report
3416 description: successful operation
3426 $ref: '#/components/schemas/id'
3428 description: incorrect request parameters
3430 '/api/v1/abuses/{abuseId}':
3432 summary: Update an abuse
3440 - $ref: '#/components/parameters/abuseId'
3448 $ref: '#/components/schemas/AbuseStateSet'
3451 description: Update the report comment visible only to the moderation team
3456 description: successful operation
3458 description: abuse not found
3462 summary: Delete an abuse
3468 - $ref: '#/components/parameters/abuseId'
3471 description: successful operation
3473 description: block not found
3475 '/api/v1/abuses/{abuseId}/messages':
3477 summary: List messages of an abuse
3483 - $ref: '#/components/parameters/abuseId'
3486 description: successful operation
3498 $ref: '#/components/schemas/AbuseMessage'
3500 summary: Add message to an abuse
3506 - $ref: '#/components/parameters/abuseId'
3515 description: Message to send
3523 description: successful operation
3525 description: incorrect request parameters
3527 '/api/v1/abuses/{abuseId}/messages/{abuseMessageId}':
3529 summary: Delete an abuse message
3535 - $ref: '#/components/parameters/abuseId'
3536 - $ref: '#/components/parameters/abuseMessageId'
3539 description: successful operation
3541 '/api/v1/videos/{id}/blacklist':
3543 summary: Block a video
3544 operationId: addVideoBlock
3552 - $ref: '#/components/parameters/idOrUUID'
3555 description: successful operation
3557 summary: Unblock a video by its id
3558 operationId: delVideoBlock
3566 - $ref: '#/components/parameters/idOrUUID'
3569 description: successful operation
3571 description: block not found
3573 /api/v1/videos/blacklist:
3577 summary: List video blocks
3578 operationId: getVideoBlocks
3587 list only blocks that match this type:
3591 - `2`: automatic block that needs review
3599 description: plain search that will match with video titles, and more
3602 - $ref: '#/components/parameters/start'
3603 - $ref: '#/components/parameters/count'
3604 - $ref: '#/components/parameters/blacklistsSort'
3607 description: successful operation
3619 $ref: '#/components/schemas/VideoBlacklist'
3621 /api/v1/videos/{id}/captions:
3623 summary: List captions of a video
3624 operationId: getVideoCaptions
3628 - $ref: '#/components/parameters/idOrUUID'
3631 description: successful operation
3643 $ref: '#/components/schemas/VideoCaption'
3645 /api/v1/videos/{id}/captions/{captionLanguage}:
3647 summary: Add or replace a video caption
3648 operationId: addVideoCaption
3655 - $ref: '#/components/parameters/idOrUUID'
3656 - $ref: '#/components/parameters/captionLanguage'
3659 multipart/form-data:
3664 description: The file to upload.
3669 contentType: text/vtt, application/x-subrip, text/plain
3672 description: successful operation
3674 description: video or language not found
3676 summary: Delete a video caption
3677 operationId: delVideoCaption
3684 - $ref: '#/components/parameters/idOrUUID'
3685 - $ref: '#/components/parameters/captionLanguage'
3688 description: successful operation
3690 description: video or language or caption for that language not found
3692 /api/v1/video-channels:
3694 summary: List video channels
3695 operationId: getVideoChannels
3699 - $ref: '#/components/parameters/start'
3700 - $ref: '#/components/parameters/count'
3701 - $ref: '#/components/parameters/sort'
3704 description: successful operation
3708 $ref: '#/components/schemas/VideoChannelList'
3710 summary: Create a video channel
3711 operationId: addVideoChannel
3718 description: successful operation
3728 $ref: '#/components/schemas/id'
3733 $ref: '#/components/schemas/VideoChannelCreate'
3735 '/api/v1/video-channels/{channelHandle}':
3737 summary: Get a video channel
3738 operationId: getVideoChannel
3742 - $ref: '#/components/parameters/channelHandle'
3745 description: successful operation
3749 $ref: '#/components/schemas/VideoChannel'
3751 summary: Update a video channel
3752 operationId: putVideoChannel
3758 - $ref: '#/components/parameters/channelHandle'
3761 description: successful operation
3766 $ref: '#/components/schemas/VideoChannelUpdate'
3768 summary: Delete a video channel
3769 operationId: delVideoChannel
3775 - $ref: '#/components/parameters/channelHandle'
3778 description: successful operation
3780 '/api/v1/video-channels/{channelHandle}/videos':
3782 summary: List videos of a video channel
3783 operationId: getVideoChannelVideos
3788 - $ref: '#/components/parameters/channelHandle'
3789 - $ref: '#/components/parameters/categoryOneOf'
3790 - $ref: '#/components/parameters/isLive'
3791 - $ref: '#/components/parameters/tagsOneOf'
3792 - $ref: '#/components/parameters/tagsAllOf'
3793 - $ref: '#/components/parameters/licenceOneOf'
3794 - $ref: '#/components/parameters/languageOneOf'
3795 - $ref: '#/components/parameters/nsfw'
3796 - $ref: '#/components/parameters/isLocal'
3797 - $ref: '#/components/parameters/include'
3798 - $ref: '#/components/parameters/privacyOneOf'
3799 - $ref: '#/components/parameters/hasHLSFiles'
3800 - $ref: '#/components/parameters/hasWebtorrentFiles'
3801 - $ref: '#/components/parameters/skipCount'
3802 - $ref: '#/components/parameters/start'
3803 - $ref: '#/components/parameters/count'
3804 - $ref: '#/components/parameters/videosSort'
3805 - $ref: '#/components/parameters/excludeAlreadyWatched'
3808 description: successful operation
3812 $ref: '#/components/schemas/VideoListResponse'
3814 '/api/v1/video-channels/{channelHandle}/video-playlists':
3816 summary: List playlists of a channel
3821 - $ref: '#/components/parameters/channelHandle'
3822 - $ref: '#/components/parameters/start'
3823 - $ref: '#/components/parameters/count'
3824 - $ref: '#/components/parameters/sort'
3825 - $ref: '#/components/parameters/videoPlaylistType'
3828 description: successful operation
3840 $ref: '#/components/schemas/VideoPlaylist'
3842 '/api/v1/video-channels/{channelHandle}/followers':
3846 summary: 'List followers of a video channel'
3849 operationId: getVideoChannelFollowers
3851 - $ref: '#/components/parameters/channelHandle'
3852 - $ref: '#/components/parameters/start'
3853 - $ref: '#/components/parameters/count'
3854 - $ref: '#/components/parameters/followersSort'
3855 - $ref: '#/components/parameters/search'
3858 description: successful operation
3870 $ref: '#/components/schemas/Follow'
3872 '/api/v1/video-channels/{channelHandle}/avatar/pick':
3874 summary: Update channel avatar
3880 - $ref: '#/components/parameters/channelHandle'
3883 description: successful operation
3892 $ref: '#/components/schemas/ActorImage'
3894 description: image file too large
3896 X-File-Maximum-Size:
3900 description: Maximum file size for the avatar
3903 multipart/form-data:
3908 description: The file to upload.
3913 contentType: image/png, image/jpeg
3915 '/api/v1/video-channels/{channelHandle}/avatar':
3917 summary: Delete channel avatar
3923 - $ref: '#/components/parameters/channelHandle'
3926 description: successful operation
3928 '/api/v1/video-channels/{channelHandle}/banner/pick':
3930 summary: Update channel banner
3936 - $ref: '#/components/parameters/channelHandle'
3939 description: successful operation
3948 $ref: '#/components/schemas/ActorImage'
3950 description: image file too large
3952 X-File-Maximum-Size:
3956 description: Maximum file size for the banner
3959 multipart/form-data:
3964 description: The file to upload.
3969 contentType: image/png, image/jpeg
3971 '/api/v1/video-channels/{channelHandle}/banner':
3973 summary: Delete channel banner
3979 - $ref: '#/components/parameters/channelHandle'
3982 description: successful operation
3984 '/api/v1/video-channels/{channelHandle}/import-videos':
3986 summary: Import videos in channel
3987 description: Import a remote channel/playlist videos into a channel
3994 - $ref: '#/components/parameters/channelHandle'
3999 $ref: '#/components/schemas/ImportVideosInChannelCreate'
4002 description: successful operation
4004 '/api/v1/video-channel-syncs':
4006 summary: Create a synchronization for a video channel
4007 operationId: addVideoChannelSync
4016 $ref: '#/components/schemas/VideoChannelSyncCreate'
4019 description: successful operation
4026 $ref: "#/components/schemas/VideoChannelSync"
4028 '/api/v1/video-channel-syncs/{channelSyncId}':
4030 summary: Delete a video channel synchronization
4031 operationId: delVideoChannelSync
4037 - $ref: '#/components/parameters/channelSyncId'
4040 description: successful operation
4042 '/api/v1/video-channel-syncs/{channelSyncId}/sync':
4044 summary: Triggers the channel synchronization job, fetching all the videos from the remote channel
4045 operationId: triggerVideoChannelSync
4051 - $ref: '#/components/parameters/channelSyncId'
4054 description: successful operation
4057 /api/v1/video-playlists/privacies:
4059 summary: List available playlist privacy policies
4060 operationId: getPlaylistPrivacyPolicies
4065 description: successful operation
4074 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
4076 /api/v1/video-playlists:
4078 summary: List video playlists
4079 operationId: getPlaylists
4083 - $ref: '#/components/parameters/start'
4084 - $ref: '#/components/parameters/count'
4085 - $ref: '#/components/parameters/sort'
4086 - $ref: '#/components/parameters/videoPlaylistType'
4089 description: successful operation
4101 $ref: '#/components/schemas/VideoPlaylist'
4103 summary: Create a video playlist
4104 description: If the video playlist is set as public, `videoChannelId` is mandatory.
4105 operationId: addPlaylist
4112 description: successful operation
4122 $ref: '#/components/schemas/VideoPlaylist/properties/id'
4124 $ref: '#/components/schemas/VideoPlaylist/properties/uuid'
4126 $ref: '#/components/schemas/VideoPlaylist/properties/shortUUID'
4129 multipart/form-data:
4134 description: Video playlist display name
4139 description: Video playlist thumbnail file
4143 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4145 description: Video playlist description
4151 - $ref: '#/components/schemas/id'
4152 description: Video channel in which the playlist will be published
4157 contentType: image/jpeg
4159 /api/v1/video-playlists/{playlistId}:
4161 summary: Get a video playlist
4165 - $ref: '#/components/parameters/playlistId'
4168 description: successful operation
4172 $ref: '#/components/schemas/VideoPlaylist'
4174 summary: Update a video playlist
4175 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
4182 description: successful operation
4184 - $ref: '#/components/parameters/playlistId'
4187 multipart/form-data:
4192 description: Video playlist display name
4197 description: Video playlist thumbnail file
4201 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4203 description: Video playlist description
4207 - $ref: '#/components/schemas/id'
4208 description: Video channel in which the playlist will be published
4211 contentType: image/jpeg
4213 summary: Delete a video playlist
4219 - $ref: '#/components/parameters/playlistId'
4222 description: successful operation
4224 /api/v1/video-playlists/{playlistId}/videos:
4226 summary: 'List videos of a playlist'
4227 operationId: getVideoPlaylistVideos
4232 - $ref: '#/components/parameters/playlistId'
4233 - $ref: '#/components/parameters/start'
4234 - $ref: '#/components/parameters/count'
4237 description: successful operation
4241 $ref: '#/components/schemas/VideoListResponse'
4243 summary: Add a video in a playlist
4244 operationId: addVideoPlaylistVideo
4251 - $ref: '#/components/parameters/playlistId'
4254 description: successful operation
4260 videoPlaylistElement:
4274 - $ref: '#/components/schemas/Video/properties/uuid'
4275 - $ref: '#/components/schemas/Video/properties/id'
4276 description: Video to add in the playlist
4280 description: Start the video at this specific timestamp
4284 description: Stop the video at this specific timestamp
4288 /api/v1/video-playlists/{playlistId}/videos/reorder:
4290 summary: 'Reorder a playlist'
4291 operationId: reorderVideoPlaylist
4297 - $ref: '#/components/parameters/playlistId'
4300 description: successful operation
4309 description: 'Start position of the element to reorder'
4311 insertAfterPosition:
4313 description: 'New position for the block to reorder, to add the block before the first element'
4317 description: 'How many element from `startPosition` to reorder'
4321 - insertAfterPosition
4323 /api/v1/video-playlists/{playlistId}/videos/{playlistElementId}:
4325 summary: Update a playlist element
4326 operationId: putVideoPlaylistVideo
4332 - $ref: '#/components/parameters/playlistId'
4333 - $ref: '#/components/parameters/playlistElementId'
4336 description: successful operation
4346 description: Start the video at this specific timestamp
4350 description: Stop the video at this specific timestamp
4352 summary: Delete an element from a playlist
4353 operationId: delVideoPlaylistVideo
4359 - $ref: '#/components/parameters/playlistId'
4360 - $ref: '#/components/parameters/playlistElementId'
4363 description: successful operation
4365 '/api/v1/users/me/video-playlists/videos-exist':
4367 summary: Check video exists in my playlists
4376 description: The video ids to check
4380 $ref: '#/components/schemas/Video/properties/id'
4383 description: successful operation
4404 '/api/v1/accounts/{name}/video-playlists':
4406 summary: List playlists of an account
4411 - $ref: '#/components/parameters/name'
4412 - $ref: '#/components/parameters/start'
4413 - $ref: '#/components/parameters/count'
4414 - $ref: '#/components/parameters/sort'
4415 - $ref: '#/components/parameters/search'
4416 - $ref: '#/components/parameters/videoPlaylistType'
4419 description: successful operation
4431 $ref: '#/components/schemas/VideoPlaylist'
4433 '/api/v1/accounts/{name}/video-channels':
4435 summary: List video channels of an account
4440 - $ref: '#/components/parameters/name'
4443 description: include daily view statistics for the last 30 days and total views (only if authentified as the account user)
4446 - $ref: '#/components/parameters/start'
4447 - $ref: '#/components/parameters/count'
4448 - $ref: '#/components/parameters/sort'
4451 description: successful operation
4455 $ref: '#/components/schemas/VideoChannelList'
4457 '/api/v1/accounts/{name}/video-channel-syncs':
4459 summary: List the synchronizations of video channels of an account
4465 - $ref: '#/components/parameters/name'
4466 - $ref: '#/components/parameters/start'
4467 - $ref: '#/components/parameters/count'
4468 - $ref: '#/components/parameters/sort'
4471 description: successful operation
4475 $ref: '#/components/schemas/VideoChannelSyncList'
4477 '/api/v1/accounts/{name}/ratings':
4479 summary: List ratings of an account
4485 - $ref: '#/components/parameters/name'
4486 - $ref: '#/components/parameters/start'
4487 - $ref: '#/components/parameters/count'
4488 - $ref: '#/components/parameters/sort'
4492 description: Optionally filter which ratings to retrieve
4500 description: successful operation
4506 $ref: '#/components/schemas/VideoRating'
4508 '/api/v1/videos/{id}/comment-threads':
4510 summary: List threads of a video
4514 - $ref: '#/components/parameters/idOrUUID'
4515 - $ref: '#/components/parameters/start'
4516 - $ref: '#/components/parameters/count'
4517 - $ref: '#/components/parameters/commentsSort'
4520 description: successful operation
4524 $ref: '#/components/schemas/CommentThreadResponse'
4526 summary: Create a thread
4532 - $ref: '#/components/parameters/idOrUUID'
4535 description: successful operation
4539 $ref: '#/components/schemas/CommentThreadPostResponse'
4541 description: video does not exist
4550 - $ref: '#/components/schemas/VideoComment/properties/text'
4556 '/api/v1/videos/{id}/comment-threads/{threadId}':
4558 summary: Get a thread
4562 - $ref: '#/components/parameters/idOrUUID'
4563 - $ref: '#/components/parameters/threadId'
4566 description: successful operation
4570 $ref: '#/components/schemas/VideoCommentThreadTree'
4572 '/api/v1/videos/{id}/comments/{commentId}':
4574 summary: Reply to a thread of a video
4580 - $ref: '#/components/parameters/idOrUUID'
4581 - $ref: '#/components/parameters/commentId'
4584 description: successful operation
4588 $ref: '#/components/schemas/CommentThreadPostResponse'
4590 description: thread or video does not exist
4599 - $ref: '#/components/schemas/VideoComment/properties/text'
4605 summary: Delete a comment or a reply
4611 - $ref: '#/components/parameters/idOrUUID'
4612 - $ref: '#/components/parameters/commentId'
4615 description: successful operation
4617 description: cannot remove comment of another user
4619 description: comment or video does not exist
4621 description: comment is already deleted
4623 '/api/v1/videos/{id}/rate':
4625 summary: Like/dislike a video
4631 - $ref: '#/components/parameters/idOrUUID'
4647 description: successful operation
4649 description: video does not exist
4651 '/api/v1/videos/{id}/hls':
4653 summary: Delete video HLS files
4659 operationId: delVideoHLS
4661 - $ref: '#/components/parameters/idOrUUID'
4664 description: successful operation
4666 description: video does not exist
4667 '/api/v1/videos/{id}/webtorrent':
4669 summary: Delete video WebTorrent files
4675 operationId: delVideoWebTorrent
4677 - $ref: '#/components/parameters/idOrUUID'
4680 description: successful operation
4682 description: video does not exist
4684 '/api/v1/videos/{id}/transcoding':
4686 summary: Create a transcoding job
4692 operationId: createVideoTranscoding
4694 - $ref: '#/components/parameters/idOrUUID'
4710 description: successful operation
4712 description: video does not exist
4714 /api/v1/search/videos:
4718 summary: Search videos
4719 operationId: searchVideos
4724 allowEmptyValue: false
4726 String to search. If the user can make a remote URI search, and the string is an URI then the
4727 PeerTube instance will fetch the remote object and add it to its database. Then,
4728 you can use the REST API to fetch the complete video information and interact with it.
4731 - $ref: '#/components/parameters/categoryOneOf'
4732 - $ref: '#/components/parameters/isLive'
4733 - $ref: '#/components/parameters/tagsOneOf'
4734 - $ref: '#/components/parameters/tagsAllOf'
4735 - $ref: '#/components/parameters/licenceOneOf'
4736 - $ref: '#/components/parameters/languageOneOf'
4737 - $ref: '#/components/parameters/nsfw'
4738 - $ref: '#/components/parameters/isLocal'
4739 - $ref: '#/components/parameters/include'
4740 - $ref: '#/components/parameters/privacyOneOf'
4741 - $ref: '#/components/parameters/uuids'
4742 - $ref: '#/components/parameters/hasHLSFiles'
4743 - $ref: '#/components/parameters/hasWebtorrentFiles'
4744 - $ref: '#/components/parameters/skipCount'
4745 - $ref: '#/components/parameters/start'
4746 - $ref: '#/components/parameters/count'
4747 - $ref: '#/components/parameters/searchTarget'
4748 - $ref: '#/components/parameters/videosSearchSort'
4749 - $ref: '#/components/parameters/excludeAlreadyWatched'
4752 description: Get videos that are published after this date
4758 description: Get videos that are published before this date
4762 - name: originallyPublishedStartDate
4764 description: Get videos that are originally published after this date
4768 - name: originallyPublishedEndDate
4770 description: Get videos that are originally published before this date
4776 description: Get videos that have this minimum duration
4781 description: Get videos that have this maximum duration
4785 'searchTarget === search-index':
4786 $ref: '#/components/callbacks/searchIndex'
4789 description: successful operation
4793 $ref: '#/components/schemas/VideoListResponse'
4795 description: search index unavailable
4797 /api/v1/search/video-channels:
4801 summary: Search channels
4802 operationId: searchChannels
4808 String to search. If the user can make a remote URI search, and the string is an URI then the
4809 PeerTube instance will fetch the remote object and add it to its database. Then,
4810 you can use the REST API to fetch the complete channel information and interact with it.
4813 - $ref: '#/components/parameters/start'
4814 - $ref: '#/components/parameters/count'
4815 - $ref: '#/components/parameters/searchTarget'
4816 - $ref: '#/components/parameters/sort'
4818 'searchTarget === search-index':
4819 $ref: '#/components/callbacks/searchIndex'
4822 description: successful operation
4826 $ref: '#/components/schemas/VideoChannelList'
4828 description: search index unavailable
4830 /api/v1/search/video-playlists:
4834 summary: Search playlists
4835 operationId: searchPlaylists
4841 String to search. If the user can make a remote URI search, and the string is an URI then the
4842 PeerTube instance will fetch the remote object and add it to its database. Then,
4843 you can use the REST API to fetch the complete playlist information and interact with it.
4846 - $ref: '#/components/parameters/start'
4847 - $ref: '#/components/parameters/count'
4848 - $ref: '#/components/parameters/searchTarget'
4849 - $ref: '#/components/parameters/sort'
4851 'searchTarget === search-index':
4852 $ref: '#/components/callbacks/searchIndex'
4855 description: successful operation
4867 $ref: '#/components/schemas/VideoPlaylist'
4869 description: search index unavailable
4871 /api/v1/blocklist/status:
4876 summary: Get block status of accounts/hosts
4881 description: 'Check if these accounts are blocked'
4882 example: [ 'goofy@example.com', 'donald@example.com' ]
4890 description: 'Check if these hosts are blocked'
4891 example: [ 'example.com' ]
4898 description: successful operation
4902 $ref: '#/components/schemas/BlockStatus'
4904 /api/v1/server/blocklist/accounts:
4908 summary: List account blocks
4913 - $ref: '#/components/parameters/start'
4914 - $ref: '#/components/parameters/count'
4915 - $ref: '#/components/parameters/sort'
4918 description: successful operation
4922 summary: Block an account
4934 example: chocobozzz@example.org
4935 description: account to block, in the form `username@domain`
4940 description: successful operation
4942 description: self-blocking forbidden
4944 '/api/v1/server/blocklist/accounts/{accountName}':
4948 summary: Unblock an account by its handle
4956 description: account to unblock, in the form `username@domain`
4961 description: successful operation
4963 description: account or account block does not exist
4965 /api/v1/server/blocklist/servers:
4969 summary: List server blocks
4974 - $ref: '#/components/parameters/start'
4975 - $ref: '#/components/parameters/count'
4976 - $ref: '#/components/parameters/sort'
4979 description: successful operation
4983 summary: Block a server
4996 description: server domain to block
5001 description: successful operation
5003 description: self-blocking forbidden
5005 '/api/v1/server/blocklist/servers/{host}':
5009 summary: Unblock a server by its domain
5017 description: server domain to unblock
5023 description: successful operation
5025 description: account block does not exist
5027 /api/v1/server/redundancy/{host}:
5030 - Instance Redundancy
5031 summary: Update a server redundancy policy
5039 description: server domain to mirror
5051 description: allow mirroring of the host's local videos
5056 description: successful operation
5058 description: server is not already known
5060 /api/v1/server/redundancy/videos:
5064 summary: List videos being mirrored
5065 operationId: getMirroredVideos
5073 description: direction of the mirror
5079 - $ref: '#/components/parameters/start'
5080 - $ref: '#/components/parameters/count'
5081 - $ref: '#/components/parameters/videoRedundanciesSort'
5084 description: successful operation
5090 $ref: '#/components/schemas/VideoRedundancy'
5094 summary: Mirror a video
5095 operationId: putMirroredVideo
5106 $ref: '#/components/schemas/Video/properties/id'
5111 description: successful operation
5113 description: cannot mirror a local video
5115 description: video does not exist
5117 description: video is already mirrored
5119 /api/v1/server/redundancy/videos/{redundancyId}:
5123 summary: Delete a mirror done on a video
5124 operationId: delMirroredVideo
5129 - name: redundancyId
5132 description: id of an existing redundancy on a video
5137 description: successful operation
5139 description: video redundancy not found
5141 /api/v1/server/stats:
5145 summary: Get instance stats
5146 description: Get instance public statistics. This endpoint is cached.
5147 operationId: getInstanceStats
5150 description: successful operation
5154 $ref: '#/components/schemas/ServerStats'
5156 /api/v1/server/logs/client:
5160 summary: Send client log
5161 operationId: sendClientLog
5166 $ref: '#/components/schemas/SendClientLog'
5169 description: successful operation
5171 /api/v1/server/logs:
5175 summary: Get instance logs
5176 operationId: getInstanceLogs
5182 description: successful operation
5190 /api/v1/server/audit-logs:
5194 summary: Get instance audit logs
5195 operationId: getInstanceAuditLogs
5201 description: successful operation
5213 summary: List plugins
5214 operationId: getPlugins
5227 - $ref: '#/components/parameters/start'
5228 - $ref: '#/components/parameters/count'
5229 - $ref: '#/components/parameters/sort'
5232 description: successful operation
5236 $ref: '#/components/schemas/PluginResponse'
5238 /api/v1/plugins/available:
5242 summary: List available plugins
5243 operationId: getAvailablePlugins
5256 - name: currentPeerTubeEngine
5260 - $ref: '#/components/parameters/start'
5261 - $ref: '#/components/parameters/count'
5262 - $ref: '#/components/parameters/sort'
5265 description: successful operation
5269 $ref: '#/components/schemas/PluginResponse'
5271 description: plugin index unavailable
5273 /api/v1/plugins/install:
5277 summary: Install a plugin
5278 operationId: addPlugin
5291 example: peertube-plugin-auth-ldap
5294 additionalProperties: false
5301 additionalProperties: false
5304 description: successful operation
5306 description: should have either `npmName` or `path` set
5308 /api/v1/plugins/update:
5312 summary: Update a plugin
5313 operationId: updatePlugin
5326 example: peertube-plugin-auth-ldap
5329 additionalProperties: false
5336 additionalProperties: false
5339 description: successful operation
5341 description: should have either `npmName` or `path` set
5343 description: existing plugin not found
5345 /api/v1/plugins/uninstall:
5349 summary: Uninstall a plugin
5350 operationId: uninstallPlugin
5362 description: name of the plugin/theme in its package.json
5363 example: peertube-plugin-auth-ldap
5368 description: successful operation
5370 description: existing plugin not found
5372 /api/v1/plugins/{npmName}:
5376 summary: Get a plugin
5377 operationId: getPlugin
5382 - $ref: '#/components/parameters/npmName'
5385 description: successful operation
5389 $ref: '#/components/schemas/Plugin'
5391 description: plugin not found
5393 /api/v1/plugins/{npmName}/settings:
5397 summary: Set a plugin's settings
5402 - $ref: '#/components/parameters/npmName'
5411 additionalProperties: true
5414 description: successful operation
5416 description: plugin not found
5418 /api/v1/plugins/{npmName}/public-settings:
5422 summary: Get a plugin's public settings
5424 - $ref: '#/components/parameters/npmName'
5427 description: successful operation
5432 additionalProperties: true
5434 description: plugin not found
5436 /api/v1/plugins/{npmName}/registered-settings:
5440 summary: Get a plugin's registered settings
5445 - $ref: '#/components/parameters/npmName'
5448 description: successful operation
5453 additionalProperties: true
5455 description: plugin not found
5457 /api/v1/metrics/playback:
5459 summary: Create playback metrics
5460 description: These metrics are exposed by OpenTelemetry metrics exporter if enabled.
5467 $ref: '#/components/schemas/PlaybackMetricCreate'
5470 description: successful operation
5473 - url: 'https://peertube2.cpy.re'
5474 description: Live Test Server (live data - latest nightly version)
5475 - url: 'https://peertube3.cpy.re'
5476 description: Live Test Server (live data - latest RC version)
5477 - url: 'https://peertube.cpy.re'
5478 description: Live Test Server (live data - stable version)
5485 description: Offset used to paginate results
5493 description: "Number of items to return"
5503 description: Sort column
5511 description: Plain text search, applied to various parts of the model depending on endpoint
5519 If the administrator enabled search index support, you can override the default search target.
5522 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
5523 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
5524 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
5525 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
5526 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
5527 * 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
5528 the data from the origin instance API
5551 Sort videos by criteria (prefixing with `-` means `DESC` order):
5552 * `hot` - Adaptation of Reddit "hot" algorithm taking into account video views, likes, dislikes and comments and publication date
5553 * `best` - Same than `hot`, but also takes into account user video history
5554 * `trending` - Sort videos by recent views ("recent" is defined by the admin)
5555 * `views` - Sort videos using their `views` counter
5556 * `publishedAt` - Sort by video publication date (when it became publicly available)
5562 Sort videos by criteria (prefixing with `-` means `DESC` order):
5577 description: Sort comments by criteria
5587 description: Sort blocklists by criteria
5603 description: Plain text search that will match with user usernames or emails
5610 description: Filter results down to (un)banned users
5617 description: Sort users by criteria
5628 description: Sort abuses by criteria
5635 videoRedundanciesSort:
5639 description: Sort abuses by criteria
5648 description: Sort followers by criteria
5658 description: The username or handle of the account
5661 example: chocobozzz | chocobozzz@example.org
5666 description: Entity id
5668 $ref: '#/components/schemas/id'
5670 name: registrationId
5673 description: Registration ID
5675 $ref: '#/components/schemas/id'
5680 description: The object id, uuid or short uuid
5683 - $ref: '#/components/schemas/id'
5684 - $ref: '#/components/schemas/UUIDv4'
5685 - $ref: '#/components/schemas/shortUUID'
5690 description: Playlist id
5692 $ref: '#/components/schemas/VideoPlaylist/properties/id'
5694 name: playlistElementId
5697 description: Playlist element id
5699 $ref: '#/components/schemas/id'
5704 description: Abuse id
5706 $ref: '#/components/schemas/Abuse/properties/id'
5708 name: abuseMessageId
5711 description: Abuse message id
5713 $ref: '#/components/schemas/AbuseMessage/properties/id'
5715 name: captionLanguage
5718 description: The caption language
5720 $ref: '#/components/schemas/VideoLanguageSet'
5725 description: The video channel handle
5728 example: my_username | my_username@example.com
5733 description: Channel Sync id
5735 $ref: '#/components/schemas/Abuse/properties/id'
5737 name: subscriptionHandle
5740 description: The subscription handle
5743 example: my_username | my_username@example.com
5748 description: The thread id (root comment id)
5755 description: The comment id
5757 $ref: '#/components/schemas/VideoComment/properties/id'
5762 description: whether or not the video is a live
5769 description: category id of the video (see [/videos/categories](#operation/getCategories))
5772 - $ref: '#/components/schemas/VideoCategorySet'
5775 $ref: '#/components/schemas/VideoCategorySet'
5782 description: tag(s) of the video
5796 description: tag(s) of the video, where all should be present in the video
5809 description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language
5812 - $ref: '#/components/schemas/VideoLanguageSet'
5815 $ref: '#/components/schemas/VideoLanguageSet'
5822 description: licence id of the video (see [/videos/licences](#operation/getLicences))
5825 - $ref: '#/components/schemas/VideoLicenceSet'
5828 $ref: '#/components/schemas/VideoLicenceSet'
5835 description: if you don't need the `total` in the response
5846 description: whether to include nsfw videos, if any
5858 description: '**PeerTube >= 4.0** Display only local or remote videos'
5865 description: '**PeerTube >= 4.0** Display only videos that have HLS files'
5867 name: hasWebtorrentFiles
5872 description: '**PeerTube >= 4.0** Display only videos that have WebTorrent files'
5878 $ref: '#/components/schemas/VideoPrivacySet'
5879 description: '**PeerTube >= 4.0** Display only videos in this specific privacy/privacies'
5880 excludeAlreadyWatched:
5881 name: excludeAlreadyWatched
5883 description: Whether or not to exclude videos that are in the user's video history
5893 description: 'Find videos with specific UUIDs'
5907 **PeerTube >= 4.0** Include additional videos in results (can be combined using bitwise or operator)
5911 - `1` NOT_PUBLISHED_STATE
5922 description: list of uris to check if each is part of the user subscriptions
5932 description: name of the plugin/theme on npmjs.com or in its package.json
5935 example: peertube-plugin-auth-ldap
5940 description: job type
5944 - activitypub-follow
5945 - activitypub-http-broadcast
5946 - activitypub-http-fetcher
5947 - activitypub-http-unicast
5952 - videos-views-stats
5953 - activitypub-refresher
5956 - video-channel-import
5980 description: Filename
5984 name: videoFileToken
5987 description: Video file token [generated](#operation/requestVideoToken) by PeerTube so you don't need to provide an OAuth token in the request header.
5990 reinjectVideoFileToken:
5991 name: reinjectVideoFileToken
5994 description: Ask the server to reinject videoFileToken in URLs in m3u8 playlist
6002 $ref: '#/components/schemas/VideoPlaylistTypeSet'
6007 Authenticating via OAuth requires the following steps:
6008 - Have an activated account
6009 - [Generate] an access token for that account at `/api/v1/users/token`.
6010 - Make requests with the *Authorization: Bearer <token\>* header
6011 - Profit, depending on the role assigned to the account
6013 Note that the __access token is valid for 1 day__ and is given
6014 along with a __refresh token valid for 2 weeks__.
6016 [Generate]: https://docs.joinpeertube.org/api/rest-getting-started
6020 tokenUrl: /api/v1/users/token
6023 moderator: Moderator scope
6026 # Reusable core properties
6034 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
6035 pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
6040 description: translation of a uuid v4 with a bigger alphabet to have a shorter uuid
6041 example: 2y84q2MQUMWPbiEcxNXMgC
6044 description: immutable name of the user, used to find or mention its actor
6046 pattern: '/^[a-z0-9._]+$/'
6051 description: immutable name of the channel, used to interact with its actor
6052 example: framasoft_videos
6053 pattern: '/^[a-zA-Z0-9\\-_.:]+$/'
6064 description: category id of the video (see [/videos/categories](#operation/getCategories))
6066 VideoConstantNumber-Category:
6069 $ref: '#/components/schemas/VideoCategorySet'
6072 example: Science & Technology
6076 description: licence id of the video (see [/videos/licences](#operation/getLicences))
6078 VideoConstantNumber-Licence:
6081 $ref: '#/components/schemas/VideoLicenceSet'
6084 example: Attribution - Share Alike
6088 description: language id of the video (see [/videos/languages](#operation/getLanguages))
6090 VideoConstantString-Language:
6093 $ref: '#/components/schemas/VideoLanguageSet'
6098 VideoPlaylistPrivacySet:
6104 description: Video playlist privacy policy (see [/video-playlists/privacies](#operation/getPlaylistPrivacyPolicies))
6105 VideoPlaylistPrivacyConstant:
6108 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
6112 VideoPlaylistTypeSet:
6117 description: The video playlist type (Regular = `1`, Watch Later = `2`)
6118 VideoPlaylistTypeConstant:
6121 $ref: '#/components/schemas/VideoPlaylistTypeSet'
6132 description: privacy id of the video (see [/videos/privacies](#operation/getVideoPrivacyPolicies))
6133 VideoPrivacyConstant:
6136 $ref: '#/components/schemas/VideoPrivacySet'
6144 additionalProperties:
6145 x-additionalPropertiesName: account
6154 additionalProperties:
6155 x-additionalPropertiesName: host
6176 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
6183 description: 'Admin flags for the user (None = `0`, Bypass video blocklist = `1`)'
6186 LiveVideoLatencyMode:
6192 description: 'The live latency mode (Default = `1`, High latency = `2`, Small Latency = `3`)'
6194 LiveVideoReplaySettings:
6198 # description: Video playlist privacy policy (see [../video-playlists/privacies])
6199 $ref: '#/components/schemas/VideoPrivacySet'
6221 - `4`: Waiting for live stream
6223 - `6`: To move to an external storage (object storage...)
6224 - `7`: Transcoding failed
6225 - `8`: Moving to an external storage failed
6226 - `9`: To edit using studio edition feature
6236 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
6240 $ref: '#/components/schemas/AbuseStateSet'
6243 AbusePredefinedReasons:
6256 example: [spamOrMisleading]
6261 Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`)
6263 `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos.
6265 VideoResolutionConstant:
6266 description: resolutions and their labels for the video
6269 $ref: '#/components/schemas/VideoResolutionSet'
6273 VideoScheduledUpdate:
6276 $ref: '#/components/schemas/VideoPrivacySet'
6280 description: When to update the video
6300 $ref: '#/components/schemas/ActorImage'
6301 VideoChannelSummary:
6304 $ref: '#/components/schemas/id'
6318 $ref: '#/components/schemas/ActorImage'
6332 - $ref: '#/components/schemas/Video'
6337 $ref: '#/components/schemas/id'
6341 description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file
6342 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
6344 $ref: '#/components/schemas/VideoResolutionConstant'
6347 description: Video file size in bytes
6350 description: Direct URL of the torrent file
6354 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
6358 description: Direct URL of the video
6362 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
6366 description: Frames per second of the video file
6370 description: URL dereferencing the output of ffprobe on the file
6371 VideoStreamingPlaylists:
6376 $ref: '#/components/schemas/id'
6384 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS'
6385 VideoStreamingPlaylists-HLS:
6396 Video files associated to this playlist.
6398 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.)
6400 $ref: '#/components/schemas/VideoFile'
6412 $ref: '#/components/schemas/Video/properties/id'
6414 $ref: '#/components/schemas/Video/properties/uuid'
6416 $ref: '#/components/schemas/Video/properties/name'
6420 description: object id for the video
6422 - $ref: '#/components/schemas/id'
6424 description: universal identifier for the video, that can be used across instances
6426 - $ref: '#/components/schemas/UUIDv4'
6429 - $ref: '#/components/schemas/shortUUID'
6435 example: 2017-10-01T10:52:46.396Z
6436 description: time at which the video object was first drafted
6440 example: 2018-10-01T10:52:46.396Z
6441 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
6445 example: 2021-05-04T08:01:01.502Z
6446 description: last time the video's metadata was modified
6447 originallyPublishedAt:
6450 example: 2010-10-01T10:52:46.396Z
6451 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
6454 - $ref: '#/components/schemas/VideoConstantNumber-Category'
6455 description: category in which the video is classified
6458 - $ref: '#/components/schemas/VideoConstantNumber-Licence'
6459 description: licence under which the video is distributed
6462 - $ref: '#/components/schemas/VideoConstantString-Language'
6463 description: main language used in the video
6466 - $ref: '#/components/schemas/VideoPrivacyConstant'
6467 description: privacy policy used to distribute the video
6471 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n
6472 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr...
6476 truncated description of the video, written in Markdown.
6477 Resolve `descriptionPath` to get the full description of maximum `10000` characters.
6482 description: duration of the video in seconds
6487 description: title of the video
6488 example: What is PeerTube?
6493 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
6496 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
6499 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
6516 - $ref: '#/components/schemas/VideoStateConstant'
6517 description: represents the internal state of the video processing within the PeerTube instance
6521 - $ref: '#/components/schemas/VideoScheduledUpdate'
6529 $ref: '#/components/schemas/AccountSummary'
6531 $ref: '#/components/schemas/VideoChannelSummary'
6540 - $ref: '#/components/schemas/Video'
6545 description: If the video is a live, you have the amount of current viewers
6548 example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description
6549 description: path at which to get the full description of maximum `10000` characters
6552 description: A text tell the audience how to support the video creator
6553 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6557 $ref: '#/components/schemas/VideoChannel'
6559 $ref: '#/components/schemas/Account'
6561 example: [flowers, gardening]
6579 - https://peertube2.cpy.re/tracker/announce
6580 - wss://peertube2.cpy.re/tracker/socket
6584 $ref: '#/components/schemas/VideoFile'
6586 WebTorrent/raw video files. If WebTorrent is disabled on the server:
6588 - field will be empty
6589 - video files will be found in `streamingPlaylists[].files` field
6593 $ref: '#/components/schemas/VideoStreamingPlaylists'
6595 HLS playlists/manifest files. If HLS is disabled on the server:
6597 - field will be empty
6598 - video files will be found in `files` field
6599 FileRedundancyInformation:
6602 $ref: '#/components/schemas/id'
6627 $ref: '#/components/schemas/id'
6634 $ref: '#/components/schemas/UUIDv4'
6641 $ref: '#/components/schemas/FileRedundancyInformation'
6645 $ref: '#/components/schemas/FileRedundancyInformation'
6646 VideoImportStateConstant:
6654 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
6661 additionalProperties: false
6665 $ref: '#/components/schemas/VideoImport/properties/targetUrl'
6666 required: [targetUrl]
6669 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
6670 required: [magnetUri]
6673 $ref: '#/components/schemas/VideoImport/properties/torrentfile'
6674 required: [torrentfile]
6675 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6684 - $ref: '#/components/schemas/id'
6688 description: remote URL where to find the import's source video
6689 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
6693 description: magnet URI allowing to resolve the import's source video
6694 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
6699 description: Torrent file containing only the video file
6706 - $ref: '#/components/schemas/VideoImportStateConstant'
6722 - $ref: '#/components/schemas/Video'
6732 $ref: '#/components/schemas/VideoImport'
6736 $ref: '#/components/schemas/id'
6739 example: The video is a spam
6743 $ref: '#/components/schemas/AbusePredefinedReasons'
6745 $ref: '#/components/schemas/Account'
6747 $ref: '#/components/schemas/AbuseStateConstant'
6750 example: Decided to ban the server since it spams us regularly
6754 $ref: '#/components/schemas/VideoInfo'
6761 $ref: '#/components/schemas/id'
6772 $ref: '#/components/schemas/AccountSummary'
6776 $ref: '#/components/schemas/id'
6778 $ref: '#/components/schemas/Video/properties/id'
6790 $ref: '#/components/schemas/UUIDv4'
6808 $ref: '#/components/schemas/id'
6810 $ref: '#/components/schemas/UUIDv4'
6813 - $ref: '#/components/schemas/shortUUID'
6836 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
6838 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
6840 $ref: '#/components/schemas/AccountSummary'
6842 $ref: '#/components/schemas/VideoChannelSummary'
6846 $ref: '#/components/schemas/id'
6853 description: Text of the comment
6855 example: This video is wonderful!
6857 $ref: '#/components/schemas/id'
6861 - $ref: '#/components/schemas/id'
6863 $ref: '#/components/schemas/Video/properties/id'
6878 totalRepliesFromVideoAuthor:
6885 $ref: '#/components/schemas/Account'
6886 VideoCommentThreadTree:
6889 $ref: '#/components/schemas/VideoComment'
6893 $ref: '#/components/schemas/VideoCommentThreadTree'
6897 $ref: '#/components/schemas/VideoConstantString-Language'
6919 $ref: '#/components/schemas/id'
6930 $ref: '#/components/schemas/ActorImage'
6934 $ref: '#/components/schemas/id'
6939 description: immutable name of the actor, used to find or mention it
6941 - $ref: '#/components/schemas/username'
6945 description: server on which the actor is resident
6946 hostRedundancyAllowed:
6948 description: whether this actor's host allows redundancy of its videos
6952 description: number of actors subscribed to by this actor, as seen by this instance
6956 description: number of followers of this actor, as seen by this instance
6965 - $ref: '#/components/schemas/Actor'
6968 description: object id for the user tied to this account
6970 - $ref: '#/components/schemas/User/properties/id'
6973 description: editable name of the account, displayed in its representations
6978 description: text or bio displayed on the account's profile
6986 description: timestamp within the video, in seconds
6993 Event since last viewing call:
6994 * `seek` - If the user seeked the video
7017 VideoStatsRetention:
7029 VideoStatsTimeserie:
7106 allowedForCurrentIP:
7108 requiresEmailVerification:
7126 $ref: '#/components/schemas/VideoResolutionSet'
7143 videoChannelSynchronization:
7216 example: 16810141515
7257 description: URL of the current user page
7264 description: Stack trace of the error if there is one
7267 description: User agent of the web browser that sends the message
7270 description: Additional information regarding this log
7280 totalDailyActiveUsers:
7282 totalWeeklyActiveUsers:
7284 totalMonthlyActiveUsers:
7288 totalLocalVideoViews:
7290 description: Total video views made on the instance
7291 totalLocalVideoComments:
7293 description: Total comments made by local users
7294 totalLocalVideoFilesSize:
7300 totalLocalVideoChannels:
7302 totalLocalDailyActiveVideoChannels:
7304 totalLocalWeeklyActiveVideoChannels:
7306 totalLocalMonthlyActiveVideoChannels:
7308 totalLocalPlaylists:
7310 totalInstanceFollowers:
7312 totalInstanceFollowing:
7329 totalActivityPubMessagesProcessed:
7331 totalActivityPubMessagesSuccesses:
7333 totalActivityPubMessagesErrors:
7336 activityPubMessagesProcessedPerSecond:
7338 totalActivityPubMessagesWaiting:
7415 requiresEmailVerification:
7430 description: Settings that apply to new users, if registration is enabled
7434 example: 16810141515
7440 description: Settings pertaining to transcoding jobs
7444 allowAdditionalExtensions:
7446 description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos
7449 description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
7452 description: Amount of threads used by ffmpeg for 1 transcoding job
7455 description: Amount of transcoding jobs to execute in parallel
7461 New profiles can be added by plugins ; available in core PeerTube: 'default'.
7464 description: Resolutions to transcode _new videos_ to
7486 description: WebTorrent-specific settings
7492 description: HLS-specific settings
7512 video_channel_synchronization:
7547 $ref: '#/components/schemas/id'
7549 $ref: '#/components/schemas/Actor'
7551 $ref: '#/components/schemas/Actor'
7554 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
7567 PredefinedAbuseReasons:
7568 description: Reason categories that help triage reports
7586 $ref: '#/components/schemas/id'
7598 - activitypub-http-unicast
7599 - activitypub-http-broadcast
7600 - activitypub-http-fetcher
7601 - activitypub-follow
7606 - videos-views-stats
7607 - activitypub-refresher
7609 - video-channel-import
7612 additionalProperties: true
7615 additionalProperties: true
7631 $ref: '#/components/schemas/id'
7636 $ref: '#/components/schemas/id'
7637 VideoUploadRequestCommon:
7640 description: Video name
7642 example: What is PeerTube?
7646 description: Channel id that will contain this video
7651 $ref: '#/components/schemas/VideoPrivacySet'
7653 $ref: '#/components/schemas/VideoCategorySet'
7655 $ref: '#/components/schemas/VideoLicenceSet'
7657 $ref: '#/components/schemas/VideoLanguageSet'
7659 description: Video description
7662 **[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)**
7664 description: Whether or not we wait transcoding before publish the video
7667 description: A text tell the audience how to support the video creator
7668 example: Please support our work on https://soutenir.framasoft.org/en/ <3
7671 description: Whether or not this video contains sensitive content
7674 description: Video tags (maximum 5 tags each between 2 and 30 characters)
7687 description: Enable or disable comments for this video
7690 description: Enable or disable downloading for this video
7692 originallyPublishedAt:
7693 description: Date when the content was originally published
7697 $ref: '#/components/schemas/VideoScheduledUpdate'
7699 description: Video thumbnail file
7703 description: Video preview file
7709 VideoUploadRequestLegacy:
7711 - $ref: '#/components/schemas/VideoUploadRequestCommon'
7717 description: Video file
7720 VideoUploadRequestResumable:
7722 - $ref: '#/components/schemas/VideoUploadRequestCommon'
7728 description: Video filename including extension
7731 example: what_is_peertube.mp4
7733 description: Video thumbnail file
7737 description: Video preview file
7740 VideoUploadResponse:
7746 $ref: '#/components/schemas/Video/properties/id'
7748 $ref: '#/components/schemas/Video/properties/uuid'
7750 $ref: '#/components/schemas/Video/properties/shortUUID'
7751 CommentThreadResponse:
7760 $ref: '#/components/schemas/VideoComment'
7761 CommentThreadPostResponse:
7764 $ref: '#/components/schemas/VideoComment'
7784 $ref: '#/components/schemas/Video'
7788 $ref: '#/components/schemas/Account'
7791 description: Automatically start playing the upcoming video after the currently playing video
7792 autoPlayNextVideoPlaylist:
7794 description: Automatically start playing the video on the playlist after the currently playing video
7797 description: Automatically start playing the video on the watch page
7807 description: The user email
7810 description: Has the user confirmed their email address?
7813 - $ref: '#/components/schemas/id'
7817 description: Auth plugin to use to authenticate the user
7821 noInstanceConfigWarningModal:
7823 noAccountSetupWarningModal:
7828 $ref: '#/components/schemas/NSFWPolicy'
7833 $ref: '#/components/schemas/UserRole'
7842 description: Theme enabled by this user
7844 $ref: '#/components/schemas/username'
7848 $ref: '#/components/schemas/VideoChannel'
7851 description: The user video quota in bytes
7855 description: The user daily video quota in bytes
7859 description: Enable P2P in the player
7862 - $ref: '#/components/schemas/User'
7864 # optionally present fields: they require WITH_STATS scope
7867 description: Count of videos published
7870 description: Count of reports/abuses of which the user is a target
7871 abusesAcceptedCount:
7873 description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team
7876 description: Count of reports/abuses created by the user
7879 description: Count of comments published
7883 $ref: '#/components/schemas/username'
7885 $ref: '#/components/schemas/password'
7889 description: The user email
7892 description: The user video quota in bytes
7896 description: The user daily video quota in bytes
7899 $ref: '#/components/schemas/usernameChannel'
7901 $ref: '#/components/schemas/UserRole'
7903 $ref: '#/components/schemas/UserAdminFlags'
7912 description: The updated email of the user
7914 - $ref: '#/components/schemas/User/properties/email'
7917 description: Set the email as verified
7920 description: The updated video quota of the user in bytes
7923 description: The updated daily video quota of the user in bytes
7927 description: The auth plugin to use to authenticate the user
7928 example: 'peertube-plugin-auth-saml2'
7930 $ref: '#/components/schemas/UserRole'
7932 $ref: '#/components/schemas/UserAdminFlags'
7934 $ref: '#/components/schemas/password'
7936 # see shared/models/users/user-update-me.model.ts:
7939 $ref: '#/components/schemas/password'
7941 $ref: '#/components/schemas/password'
7943 description: new email used for login and service communications
7945 - $ref: '#/components/schemas/User/properties/email'
7948 description: new name of the user in its representations
7953 description: new NSFW display policy
7960 description: whether to enable P2P in the player or not
7963 description: new preference regarding playing videos automatically
7966 description: new preference regarding playing following videos automatically
7967 autoPlayNextVideoPlaylist:
7969 description: new preference regarding playing following playlist videos automatically
7970 videosHistoryEnabled:
7972 description: whether to keep track of watched history or not
7977 description: list of languages to filter videos down to
7980 noInstanceConfigWarningModal:
7982 noAccountSetupWarningModal:
7989 $ref: '#/components/schemas/id'
7996 description: Rating of the video
8003 $ref: '#/components/schemas/Video'
8010 description: Rating of the video
8018 description: immutable name of the user, used to find or mention its actor
8020 - $ref: '#/components/schemas/username'
8022 $ref: '#/components/schemas/password'
8026 description: email of the user, used for login or service communications
8029 description: editable name of the user, displayed in its representations
8034 description: channel base information used to create the first channel of the user
8037 $ref: '#/components/schemas/usernameChannel'
8045 UserRegistrationRequest:
8047 - $ref: '#/components/schemas/RegisterUser'
8052 description: reason for the user to register on the instance
8054 - registrationReason
8056 UserRegistrationAcceptOrReject:
8061 description: Moderation response to send to the user
8062 preventEmailDelivery:
8064 description: Set it to true if you don't want PeerTube to send an email to the user
8066 - moderationResponse
8071 $ref: '#/components/schemas/id'
8081 description: 'The registration state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
8111 description: If the registration has been accepted, this is a partial user object created by the registration
8114 $ref: '#/components/schemas/id'
8120 pattern: /^[a-z0-9]$/
8123 example: v1ikx5hnfop4mdpnci8nsqh93c45rldf
8126 pattern: /^[a-zA-Z0-9]$/
8129 example: AjWiOapPltI6EnsWQwlFarRtLh4u8tDt
8130 OAuthToken-password:
8132 - $ref: '#/components/schemas/OAuthClient'
8142 $ref: '#/components/schemas/User/properties/username'
8144 $ref: '#/components/schemas/password'
8151 OAuthToken-refresh_token:
8153 - $ref: '#/components/schemas/OAuthClient'
8164 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
8173 - $ref: '#/components/schemas/Actor'
8178 description: editable name of the channel, displayed in its representations
8179 example: Videos of Framasoft
8184 example: Videos made with <3 by Framasoft
8189 description: text shown by default on all videos of this channel, to tell the audience how to support it
8190 example: Please support our work on https://soutenir.framasoft.org/en/ <3
8203 $ref: '#/components/schemas/ActorImage'
8212 $ref: '#/components/schemas/UUIDv4'
8217 description: Channel display name
8219 description: Channel description
8221 description: How to support/fund the channel
8225 - $ref: '#/components/schemas/VideoChannelEdit'
8228 description: username of the channel to create
8230 - $ref: '#/components/schemas/usernameChannel'
8236 - $ref: '#/components/schemas/VideoChannelEdit'
8238 bulkVideosSupportUpdate:
8240 description: Update the support field for all videos of this channel
8251 - $ref: '#/components/schemas/VideoChannel'
8252 - $ref: '#/components/schemas/Actor'
8254 ImportVideosInChannelCreate:
8259 example: https://youtube.com/c/UC_myfancychannel
8262 description: If part of a channel sync process, specify its id to assign video imports to this channel synchronization
8264 - 'externalChannelUrl'
8270 $ref: '#/components/schemas/id'
8282 example: 'https://youtube.com/c/UC_myfancychannel'
8291 $ref: '#/components/schemas/VideoChannel'
8292 VideoChannelSyncList:
8302 - $ref: '#/components/schemas/VideoChannelSync'
8303 VideoChannelSyncCreate:
8308 example: https://youtube.com/c/UC_myfancychannel
8310 $ref: '#/components/schemas/id'
8314 name: 'media:peerLink'
8323 - application/x-bittorrent
8329 name: 'media:content'
8360 VideoCommentsForXML:
8395 description: video watch page URL
8398 description: video canonical URL
8402 description: video publication date
8405 description: video description
8408 description: video description
8411 description: publisher user name
8414 description: video category (MRSS)
8417 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
8432 description: video embed path, relative to the canonical URL domain (MRSS)
8441 description: video watch path, relative to the canonical URL domain (MRSS)
8462 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
8463 'media:description':
8470 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
8473 description: main streamable file for the video
8483 - application/x-bittorrent
8492 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)
8495 - $ref: '#/components/schemas/MRSSPeerLink'
8496 - $ref: '#/components/schemas/MRSSGroupContent'
8497 NotificationSettingValue:
8500 Notification type. One of the following values, or a sum of multiple values:
8510 $ref: '#/components/schemas/id'
8514 Notification type, following the `UserNotificationType` enum:
8516 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
8518 - `2` NEW_COMMENT_ON_MY_VIDEO
8520 - `3` NEW_ABUSE_FOR_MODERATORS
8522 - `4` BLACKLIST_ON_MY_VIDEO
8524 - `5` UNBLACKLIST_ON_MY_VIDEO
8526 - `6` MY_VIDEO_PUBLISHED
8528 - `7` MY_VIDEO_IMPORT_SUCCESS
8530 - `8` MY_VIDEO_IMPORT_ERROR
8532 - `9` NEW_USER_REGISTRATION
8536 - `11` COMMENT_MENTION
8538 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
8540 - `13` NEW_INSTANCE_FOLLOWER
8542 - `14` AUTO_INSTANCE_FOLLOWING
8544 - `15` ABUSE_STATE_CHANGE
8546 - `16` ABUSE_NEW_MESSAGE
8548 - `17` NEW_PLUGIN_VERSION
8550 - `18` NEW_PEERTUBE_VERSION
8556 - $ref: '#/components/schemas/VideoInfo'
8560 $ref: '#/components/schemas/ActorInfo'
8566 $ref: '#/components/schemas/id'
8569 $ref: '#/components/schemas/VideoInfo'
8574 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
8584 $ref: '#/components/schemas/id'
8588 $ref: '#/components/schemas/VideoInfo'
8590 $ref: '#/components/schemas/ActorInfo'
8596 $ref: '#/components/schemas/id'
8599 - $ref: '#/components/schemas/VideoInfo'
8605 $ref: '#/components/schemas/id'
8608 - $ref: '#/components/schemas/VideoInfo'
8612 - $ref: '#/components/schemas/ActorInfo'
8618 $ref: '#/components/schemas/id'
8620 $ref: '#/components/schemas/ActorInfo'
8648 NotificationListResponse:
8657 $ref: '#/components/schemas/Notification'
8662 example: peertube-plugin-auth-ldap
8690 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
8693 additionalProperties: true
8709 $ref: '#/components/schemas/Plugin'
8716 $ref: '#/components/schemas/LiveVideoReplaySettings'
8718 description: User can stream multiple times in a permanent live
8721 description: User can select live latency mode if enabled by the instance
8722 $ref: '#/components/schemas/LiveVideoLatencyMode'
8728 description: Included in the response if an appropriate token is provided
8731 description: Included in the response if an appropriate token is provided
8734 description: RTMP stream key to use to stream into this live video. Included in the response if an appropriate token is provided
8738 $ref: '#/components/schemas/LiveVideoReplaySettings'
8740 description: User can stream multiple times in a permanent live
8743 description: User can select live latency mode if enabled by the instance
8744 $ref: '#/components/schemas/LiveVideoLatencyMode'
8746 RequestTwoFactorResponse:
8753 description: The token to send to confirm this request
8756 description: The OTP secret
8759 description: The OTP URI
8761 VideoStudioCreateTask:
8809 title: add-watermark
8823 LiveVideoSessionResponse:
8830 description: Start date of the live session
8835 description: End date of the live session
8846 Error type if an error occurred during the live session:
8847 - `1`: Bad socket health (transcoding is too slow)
8848 - `2`: Max duration exceeded
8849 - `3`: Quota exceeded
8850 - `4`: Quota FFmpeg error
8851 - `5`: Video has been blacklisted during the live
8854 description: Video replay information
8859 $ref: '#/components/schemas/UUIDv4'
8861 $ref: '#/components/schemas/shortUUID'
8863 PlaybackMetricCreate:
8868 - 'p2p-media-loader'
8872 description: Current player video resolution
8875 description: Current player video fps
8878 description: How many resolution changes occured since the last metric creation
8881 description: How many errors occured since the last metric creation
8884 description: How many bytes were downloaded with P2P since the last metric creation
8885 downloadedBytesHTTP:
8887 description: How many bytes were downloaded with HTTP since the last metric creation
8890 description: How many bytes were uploaded with P2P since the last metric creation
8893 - $ref: '#/components/schemas/id'
8894 - $ref: '#/components/schemas/UUIDv4'
8895 - $ref: '#/components/schemas/shortUUID'
8900 - downloadedBytesP2P
8901 - downloadedBytesHTTP
8907 'https://search.example.org/api/v1/search/videos':
8909 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
8912 description: successful operation
8916 $ref: '#/components/schemas/VideoListResponse'