Accounts
Accounts encompass remote accounts discovered across the federation, and correspond to the main Actor, along with video channels a user can create, which are also Actors. When a comment is posted, it is done with your Account's Actor.
Get an account
Parameters
namestringrequiredpathThe username or handle of the account
Response
successful operation
account not found
List videos of an account
Parameters
namestringrequiredpathThe username or handle of the account
startinteger>= 0queryOffset used to paginate results
countinteger[1, 100]15queryNumber of items to return
skipCountstringtruefalsefalsequeryif you don't need the total in the response
sortstringname-duration-createdAt-publishedAt-views-likes-comments-trending-hot-bestquerynsfwstringtruefalsequerywhether to include nsfw videos, if any
aiUsageOneOfVideoAIUsageSet | Array<VideoAIUsageSet>queryPeerTube >= 9.0 Only list videos with one of these AI usages, declared by video creators.
If not provided, the preference of the authenticated user (aiUsagesHidden) is used
isLivebooleanquerywhether or not the video is a live
includeScheduledLivebooleanquerywhether or not include live that are scheduled for later
categoryOneOfVideoCategorySet | Array<VideoCategorySet>querycategory id of the video (see /videos/categories)
licenceOneOfVideoLicenceSet | Array<VideoLicenceSet>querylicence id of the video (see /videos/licences)
languageOneOfVideoLanguageSet | Array<VideoLanguageSet>querylanguage id of the video (see /videos/languages). Use _unknown to filter on videos that don't have a video language
tagsOneOfstring | Array<string>querytag(s) of the video
tagsAllOfstring | Array<string>querytag(s) of the video, where all should be present in the video
isLocalbooleanqueryPeerTube >= 4.0 Display only local or remote objects
includeinteger012481632queryOnly administrators and moderators can use this parameter
Include additional videos in results (can be combined using bitwise or operator)
0NONE1NOT_PUBLISHED_STATE2BLACKLISTED4BLOCKED_OWNER8FILES16CAPTIONS32VIDEO SOURCE
hasHLSFilesbooleanqueryPeerTube >= 4.0 Display only videos that have HLS files
hasWebVideoFilesbooleanqueryPeerTube >= 6.0 Display only videos that have Web Video files
hoststringqueryFind elements owned by this host
autoTagOneOfstring | Array<string>queryPeerTube >= 6.2 Admins and moderators only filter on videos that contain one of these automatic tags
stateOneOfid | Array<id>queryPeerTube >= 8.2 Admins and moderators only filter on videos that have one of these states
PeerTube >= 4.0 Display only videos in this specific privacy/privacies
excludeAlreadyWatchedbooleanqueryWhether or not to exclude videos that are in the user's video history
searchstringqueryPlain text search, applied to various parts of the model depending on endpoint
Response
successful operation
List followers of an account
Parameters
namestringrequiredpathThe username or handle of the account
startinteger>= 0queryOffset used to paginate results
countinteger[1, 100]15queryNumber of items to return
sortstringcreatedAtquerySort followers by criteria
searchstringqueryPlain text search, applied to various parts of the model depending on endpoint
Response
successful operation
Authorization
OAuth2oauth2Authenticating via OAuth requires the following steps:
- Have an activated account
- Generate an access token for that account at
/api/v1/users/token. - Make requests with the Authorization: Bearer <token> header
- Profit, depending on the role assigned to the account
Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.
List accounts
Parameters
startinteger>= 0queryOffset used to paginate results
countinteger[1, 100]15queryNumber of items to return
sortstringquerySort column
Response
successful operation
List playlists of an account
Parameters
namestringrequiredpathThe username or handle of the account
startinteger>= 0queryOffset used to paginate results
countinteger[1, 100]15queryNumber of items to return
sortstringquerySort column
searchstringqueryPlain text search, applied to various parts of the model depending on endpoint
includeCollaborationsbooleanqueryPeerTube >= 8.0 Include objects from collaborated channels
channelNameOneOfstring | Array<string>queryPeerTube >= 8.0 Filter on playlists that are published on a channel with one of these names
Response
successful operation
List video channels of an account
Parameters
namestringrequiredpathThe username or handle of the account
withStatsbooleanqueryinclude view statistics time series and total views (only if authenticated as the account user)
statsDaysinteger3090365030querynumber of days of view statistics to include in viewsPerDay when withStats is true (only if authenticated as the account user). 0 means all time (since the channel's earliest recorded stat). viewsPerDay always spans the whole requested range so channels can be compared to each other. Its bucket size is reported in viewsGroupInterval: it is derived from the requested range, narrowed to the channel history so that a young channel on a long range is not aggregated into a single coarse bucket. totalViews is unaffected by this parameter and always reports lifetime views.
startinteger>= 0queryOffset used to paginate results
countinteger[1, 100]15queryNumber of items to return
searchstringqueryPlain text search, applied to various parts of the model depending on endpoint
sortstringquerySort column
includeCollaborationsbooleanqueryPeerTube >= 8.0 Include objects from collaborated channels
Response
successful operation
List the synchronizations of video channels of an account
Parameters
namestringrequiredpathThe username or handle of the account
startinteger>= 0queryOffset used to paginate results
countinteger[1, 100]15queryNumber of items to return
sortstringquerySort column
includeCollaborationsbooleanqueryPeerTube >= 8.0 Include objects from collaborated channels
Response
successful operation
List ratings of an account
Parameters
namestringrequiredpathThe username or handle of the account
startinteger>= 0queryOffset used to paginate results
countinteger[1, 100]15queryNumber of items to return
sortstringquerySort column
ratingstringlikedislikequeryOptionally filter which ratings to retrieve
Response
successful operation
Authorization
OAuth2oauth2Authenticating via OAuth requires the following steps:
- Have an activated account
- Generate an access token for that account at
/api/v1/users/token. - Make requests with the Authorization: Bearer <token> header
- Profit, depending on the role assigned to the account
Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.
