Accounts

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

GET
https://peertube2.cpy.re/api/v1/accounts/{name}

Parameters

namestringrequiredpath

The username or handle of the account

Response

successful operation

Response fields application/json
idid>= 1
Example
42
urlstring<url>
nameusername

immutable name of the actor, used to find or mention it

Show child attributes

immutable name of the user, used to find or mention its actor

username
Example
chocobozzz
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
hoststring<hostname>

server on which the actor is resident

hostRedundancyAllowedboolean | null

whether this actor's host allows redundancy of its videos

followingCountinteger>= 0

number of actors subscribed to by this actor, as seen by this instance

followersCountinteger>= 0

number of followers of this actor, as seen by this instance

createdAtstring<date-time>
updatedAtstring<date-time>
userIdid | null

object id for the user tied to this account

Show child attributes
id>= 1
Example
42
displayNamestring

editable name of the account, displayed in its representations

descriptionstring | null

text or bio displayed on the account's profile

404Not Found

account not found

List videos of an account

GET
https://peertube2.cpy.re/api/v1/accounts/{name}/videos

Parameters

namestringrequiredpath

The username or handle of the account

startinteger>= 0query

Offset used to paginate results

countinteger[1, 100]15query

Number of items to return

skipCountstringtruefalsefalsequery

if you don't need the total in the response

sortstringname-duration-createdAt-publishedAt-views-likes-comments-trending-hot-bestquery
nsfwstringtruefalsequery

whether to include nsfw videos, if any

nsfwFlagsIncludedNSFWFlag0124query
nsfwFlagsExcludedNSFWFlag0124query
aiUsageOneOfVideoAIUsageSet | Array<VideoAIUsageSet>query

PeerTube >= 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

isLivebooleanquery

whether or not the video is a live

includeScheduledLivebooleanquery

whether or not include live that are scheduled for later

categoryOneOfVideoCategorySet | Array<VideoCategorySet>query

category id of the video (see /videos/categories)

licenceOneOfVideoLicenceSet | Array<VideoLicenceSet>query

licence id of the video (see /videos/licences)

languageOneOfVideoLanguageSet | Array<VideoLanguageSet>query

language id of the video (see /videos/languages). Use _unknown to filter on videos that don't have a video language

tagsOneOfstring | Array<string>query

tag(s) of the video

tagsAllOfstring | Array<string>query

tag(s) of the video, where all should be present in the video

isLocalbooleanquery

PeerTube >= 4.0 Display only local or remote objects

includeinteger012481632query

Only administrators and moderators can use this parameter

Include additional videos in results (can be combined using bitwise or operator)

  • 0 NONE
  • 1 NOT_PUBLISHED_STATE
  • 2 BLACKLISTED
  • 4 BLOCKED_OWNER
  • 8 FILES
  • 16 CAPTIONS
  • 32 VIDEO SOURCE
hasHLSFilesbooleanquery

PeerTube >= 4.0 Display only videos that have HLS files

hasWebVideoFilesbooleanquery

PeerTube >= 6.0 Display only videos that have Web Video files

hoststringquery

Find elements owned by this host

autoTagOneOfstring | Array<string>query

PeerTube >= 6.2 Admins and moderators only filter on videos that contain one of these automatic tags

stateOneOfid | Array<id>query

PeerTube >= 8.2 Admins and moderators only filter on videos that have one of these states

privacyOneOfVideoPrivacySet12345query

PeerTube >= 4.0 Display only videos in this specific privacy/privacies

excludeAlreadyWatchedbooleanquery

Whether or not to exclude videos that are in the user's video history

searchstringquery

Plain text search, applied to various parts of the model depending on endpoint

Response

successful operation

Response fields application/json
totalinteger
Example
1
Show child attributes
idid

object id for the video

Show child attributes
id>= 1
Example
42
uuidUUIDv4

universal identifier for the video, that can be used across instances

Show child attributes
UUIDv4<uuid>
Example
9c9de5e8-0a1e-484a-b099-e80766180a6d
shortUUIDshortUUID
Show child attributes

translation of a uuid v4 with a bigger alphabet to have a shorter uuid

shortUUID
Example
2y84q2MQUMWPbiEcxNXMgC
isLiveboolean
liveSchedulesArray<LiveSchedule>
Show child attributes
startAtstring<date-time>

Date when the stream is scheduled to air at

createdAtstring<date-time>

time at which the video object was first drafted

Example
2017-10-01T10:52:46.396Z
publishedAtstring<date-time>

time at which the video was marked as ready for playback (with restrictions depending on privacy). Usually set after a state evolution.

Example
2018-10-01T10:52:46.396Z
updatedAtstring<date-time>

last time the video's metadata was modified

Example
2021-05-04T08:01:01.502Z
originallyPublishedAtstring<date-time> | null

used to represent a date of first publication, prior to the practical publication date of publishedAt

Example
2010-10-01T10:52:46.396Z
categoryVideoConstantNumber-Category

category in which the video is classified

Show child attributes

category id of the video (see /videos/categories)

Example
15
labelstring
Example
Science & Technology
licenceVideoConstantNumber-Licence

licence under which the video is distributed

Show child attributes

licence id of the video (see /videos/licences)

Example
2
labelstring
Example
Attribution - Share Alike
languageVideoConstantString-Language

main language used in the video

Show child attributes

language id of the video (see /videos/languages)

Example
en
labelstring
Example
English
privacyVideoPrivacyConstant

privacy policy used to distribute the video

Show child attributes

privacy id of the video (see /videos/privacies)

labelstring
truncatedDescriptionstring | null

truncated description of the video, written in Markdown.

Example
**[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)**\r\n*A decentralized video hosting network, based on fr...
durationinteger<seconds>

duration of the video in seconds

Example
1419
aspectRationumber<float> | null

PeerTube >= 6.1 Aspect ratio of the video stream

Example
1.778
isLocalboolean
namename

title of the video

Example
What is PeerTube?
thumbnailPathstring | nulldeprecated

Deprecated in PeerTube v8.1, use thumbnails instead. Null if the file is stored in object storage: use the non-deprecated field instead.

previewPathstring | nulldeprecated

Deprecated in PeerTube v8.1, use thumbnails instead. Null if the file is stored in object storage: use the non-deprecated field instead.

PeerTube >= 8.1 Array of thumbnails for the video

Show child attributes
fileUrlstring
widthinteger
heightinteger
aspectRatiostring
Example
16:9
embedPathstring
Example
/videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
viewsinteger
Example
1337
likesinteger
Example
42
dislikesinteger
Example
7
commentsinteger

PeerTube >= 7.2 Number of comments on the video

nsfwboolean
nsfwFlagsNSFWFlag
Show child attributes

NSFW flags (can be combined using bitwise or operator)

  • 0 NONE
  • 1 VIOLENT
  • 2 EXPLICIT_SEX
NSFWFlag0124
nsfwSummarystring

PeerTube >= 7.2 More information about the sensitive content of the video

Show child attributes

PeerTube >= 9.0 Use of AI in the video, declared by the video creator:

  • 1 Not specified
  • 2 No AI-generated content: nothing seen or heard in the video has been generated by AI
  • 3 Contains AI-generated content: some parts of the video have been generated by AI
  • 4 AI-generated: the whole video, or most of it, has been generated by AI
labelstring
Show child attributes

PeerTube >= 9.0 Commercial content in the video, declared by the video creator:

  • 1 None
  • 2 Promotional content: the creator promotes their own products, services or business
  • 3 Paid partnership: a third party paid, or provided goods or services, in exchange for the promotion
labelstring
Show child attributes

Videos that can be recommended next to a video:

  • 1 All videos
  • 2 Only videos of the platform that owns the reference video (or of the current platform if no video is given)
  • 3 Only videos of the account that owns the reference video
  • 4 Only videos of the channel of the reference video

This is a preference of the video owner: applications displaying recommendations may not apply it

labelstring
waitTranscodingboolean | null
stateVideoStateConstant

represents the internal state of the video processing within the PeerTube instance

Show child attributes
idid123456789101112131415

The video state:

  • 1: Published
  • 2: To transcode
  • 3: To import
  • 4: Waiting for live stream
  • 5: Live ended
  • 6: To move to an external storage (object storage...)
  • 7: Transcoding failed
  • 8: Moving to an external storage failed
  • 9: To edit using studio edition feature
  • 10: To move to the file system
  • 11: Moving to the file system failed
  • 12: Import failed
  • 13: To duplicate, the files of another video are being copied
  • 14: Duplication failed, the files of the other video could not be copied
  • 15: The studio edition of a video saved as a new video failed

Same fields as data.id

labelstring
scheduledUpdateVideoScheduledUpdate | null
Show child attributes
privacyVideoPrivacySet12345

privacy id of the video (see /videos/privacies)

updateAtstring<date-time>required

When to update the video

blacklistedboolean | null
blacklistedReasonstring | null
Show child attributes
idinteger
namestring
displayNamestring
urlstring<url>
hoststring<hostname>
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
Show child attributes
idid>= 1
Example
42

Same fields as data.id

namestring
displayNamestring
urlstring<url>
hoststring<hostname>
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
userHistoryobject | null
Show child attributes
currentTimeinteger
captionLanguagesArray<string>

PeerTube >= 9.0 Languages of the video captions. Only returned by video lists

List followers of an account

GET
https://peertube2.cpy.re/api/v1/accounts/{name}/followers

Parameters

namestringrequiredpath

The username or handle of the account

startinteger>= 0query

Offset used to paginate results

countinteger[1, 100]15query

Number of items to return

sortstringcreatedAtquery

Sort followers by criteria

searchstringquery

Plain text search, applied to various parts of the model depending on endpoint

Response

200OKobject

successful operation

Response fields application/json
totalinteger
Example
1
Show child attributes
idid>= 1
Example
42
followerActor
Show child attributes
idid>= 1
Example
42
urlstring<url>
nameusername

immutable name of the actor, used to find or mention it

Show child attributes

immutable name of the user, used to find or mention its actor

username
Example
chocobozzz
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
hoststring<hostname>

server on which the actor is resident

hostRedundancyAllowedboolean | null

whether this actor's host allows redundancy of its videos

followingCountinteger>= 0

number of actors subscribed to by this actor, as seen by this instance

followersCountinteger>= 0

number of followers of this actor, as seen by this instance

createdAtstring<date-time>
updatedAtstring<date-time>
followingActor
Show child attributes
idid>= 1
Example
42
urlstring<url>
nameusername

immutable name of the actor, used to find or mention it

Show child attributes

immutable name of the user, used to find or mention its actor

username
Example
chocobozzz
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
hoststring<hostname>

server on which the actor is resident

hostRedundancyAllowedboolean | null

whether this actor's host allows redundancy of its videos

followingCountinteger>= 0

number of actors subscribed to by this actor, as seen by this instance

followersCountinteger>= 0

number of followers of this actor, as seen by this instance

createdAtstring<date-time>
updatedAtstring<date-time>
scorenumber

score reflecting the reachability of the actor, with steps of 10 and a base score of 1000.

statestringpendingaccepted
createdAtstring<date-time>
updatedAtstring<date-time>

Authorization

OAuth2oauth2

Authenticating 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

GET
https://peertube2.cpy.re/api/v1/accounts

Parameters

startinteger>= 0query

Offset used to paginate results

countinteger[1, 100]15query

Number of items to return

sortstringquery

Sort column

Response

200OKobject

successful operation

Response fields application/json
totalinteger
Example
1
Show child attributes
idid>= 1
Example
42
urlstring<url>
nameusername

immutable name of the actor, used to find or mention it

Show child attributes

immutable name of the user, used to find or mention its actor

username
Example
chocobozzz
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
hoststring<hostname>

server on which the actor is resident

hostRedundancyAllowedboolean | null

whether this actor's host allows redundancy of its videos

followingCountinteger>= 0

number of actors subscribed to by this actor, as seen by this instance

followersCountinteger>= 0

number of followers of this actor, as seen by this instance

createdAtstring<date-time>
updatedAtstring<date-time>
userIdid | null

object id for the user tied to this account

Show child attributes
id>= 1
Example
42
displayNamestring

editable name of the account, displayed in its representations

descriptionstring | null

text or bio displayed on the account's profile

List playlists of an account

GET
https://peertube2.cpy.re/api/v1/accounts/{name}/video-playlists

Parameters

namestringrequiredpath

The username or handle of the account

startinteger>= 0query

Offset used to paginate results

countinteger[1, 100]15query

Number of items to return

sortstringquery

Sort column

searchstringquery

Plain text search, applied to various parts of the model depending on endpoint

playlistTypeVideoPlaylistTypeSet12query
includeCollaborationsbooleanquery

PeerTube >= 8.0 Include objects from collaborated channels

channelNameOneOfstring | Array<string>query

PeerTube >= 8.0 Filter on playlists that are published on a channel with one of these names

Response

200OKobject

successful operation

Response fields application/json
totalinteger
Example
1
Show child attributes
idid>= 1
Example
42
Example
9c9de5e8-0a1e-484a-b099-e80766180a6d
shortUUIDshortUUID
Show child attributes

translation of a uuid v4 with a bigger alphabet to have a shorter uuid

shortUUID
Example
2y84q2MQUMWPbiEcxNXMgC
createdAtstring<date-time>
updatedAtstring<date-time>
descriptionstring
displayNamestring
isLocalboolean
videoLengthinteger>= 0
thumbnailPathstring | nulldeprecated

Deprecated in PeerTube v8.1, use thumbnails instead. Null if the file is stored in object storage: use the non-deprecated field instead.

PeerTube >= 8.1 Array of thumbnails for the playlist

Show child attributes
fileUrlstring
widthinteger
heightinteger
aspectRatiostring
Example
16:9
Show child attributes

Video playlist privacy policy (see /video-playlists/privacies)

labelstring
Show child attributes

The video playlist type (Regular = 1, Watch Later = 2)

labelstring
ownerAccountAccountSummary
Show child attributes
idinteger
namestring
displayNamestring
urlstring<url>
hoststring<hostname>
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
Show child attributes
idid>= 1
Example
42
namestring
displayNamestring
urlstring<url>
hoststring<hostname>
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
videoChannelPositioninteger>= 1

Position of the playlist in the channel

List video channels of an account

GET
https://peertube2.cpy.re/api/v1/accounts/{name}/video-channels

Parameters

namestringrequiredpath

The username or handle of the account

withStatsbooleanquery

include view statistics time series and total views (only if authenticated as the account user)

statsDaysinteger3090365030query

number 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>= 0query

Offset used to paginate results

countinteger[1, 100]15query

Number of items to return

searchstringquery

Plain text search, applied to various parts of the model depending on endpoint

sortstringquery

Sort column

includeCollaborationsbooleanquery

PeerTube >= 8.0 Include objects from collaborated channels

Response

successful operation

Response fields application/json
totalinteger
Example
1
dataArray<Actor & object & Actor>
Show child attributes
idid>= 1
Example
42
urlstring<url>
nameusername

immutable name of the actor, used to find or mention it

Show child attributes

immutable name of the user, used to find or mention its actor

username
Example
chocobozzz
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
hoststring<hostname>

server on which the actor is resident

hostRedundancyAllowedboolean | null

whether this actor's host allows redundancy of its videos

followingCountinteger>= 0

number of actors subscribed to by this actor, as seen by this instance

followersCountinteger>= 0

number of followers of this actor, as seen by this instance

createdAtstring<date-time>
updatedAtstring<date-time>
displayNamestring

editable name of the channel, displayed in its representations

Example
Videos of Framasoft
descriptionstring | null
Example
Videos made with <3 by Framasoft
supportstring | null

text shown by default on all videos of this channel, to tell the audience how to support it

Example
Please support our work on https://soutenir.framasoft.org/en/ <3
publicEmailstring<email> | null

Public email visible in podcast RSS feeds

isLocalboolean
updatedAtstring<date-time>
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
ownerAccountActor & any
Show child attributes
idid>= 1
Example
42
urlstring<url>
nameusername

immutable name of the actor, used to find or mention it

Show child attributes

immutable name of the user, used to find or mention its actor

username
Example
chocobozzz
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
hoststring<hostname>

server on which the actor is resident

hostRedundancyAllowedboolean | null

whether this actor's host allows redundancy of its videos

followingCountinteger>= 0

number of actors subscribed to by this actor, as seen by this instance

followersCountinteger>= 0

number of followers of this actor, as seen by this instance

createdAtstring<date-time>
updatedAtstring<date-time>
userIdid | null

object id for the user tied to this account

Show child attributes
id>= 1
Example
42
displayNamestring

editable name of the account, displayed in its representations

descriptionstring | null

text or bio displayed on the account's profile

videosCountinteger

only included when withStats is true

viewsPerDayArray<object>

only included when withStats is true. Chronologically ordered, spans the whole statsDays range. Each point aggregates viewsGroupInterval worth of views, starting at date

Show child attributes
datestring<date-time>
viewsinteger
viewsGroupIntervalstringdayweekmonth

bucket size of viewsPerDay, only included when withStats is true

totalViewsinteger

lifetime views of all the channel videos, only included when withStats is true

idid>= 1
Example
42
urlstring<url>
nameusername

immutable name of the actor, used to find or mention it

Show child attributes

immutable name of the user, used to find or mention its actor

username
Example
chocobozzz
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
hoststring<hostname>

server on which the actor is resident

hostRedundancyAllowedboolean | null

whether this actor's host allows redundancy of its videos

followingCountinteger>= 0

number of actors subscribed to by this actor, as seen by this instance

followersCountinteger>= 0

number of followers of this actor, as seen by this instance

createdAtstring<date-time>
updatedAtstring<date-time>

List the synchronizations of video channels of an account

GET
https://peertube2.cpy.re/api/v1/accounts/{name}/video-channel-syncs

Parameters

namestringrequiredpath

The username or handle of the account

startinteger>= 0query

Offset used to paginate results

countinteger[1, 100]15query

Number of items to return

sortstringquery

Sort column

includeCollaborationsbooleanquery

PeerTube >= 8.0 Include objects from collaborated channels

Response

successful operation

Response fields application/json
totalinteger
Example
1
dataArray<VideoChannelSync>
Show child attributes
idid>= 1
Example
42
stateobject
Show child attributes
idinteger
Example
2
labelstring
Example
PROCESSING
externalChannelUrlstring
Example
https://youtube.com/c/UC_myfancychannel
createdAtstring<date-time>
lastSyncAtstring<date-time> | null
Show child attributes
idid>= 1
Example
42
urlstring<url>
nameusername

immutable name of the actor, used to find or mention it

Show child attributes

immutable name of the user, used to find or mention its actor

username
Example
chocobozzz
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
hoststring<hostname>

server on which the actor is resident

hostRedundancyAllowedboolean | null

whether this actor's host allows redundancy of its videos

followingCountinteger>= 0

number of actors subscribed to by this actor, as seen by this instance

followersCountinteger>= 0

number of followers of this actor, as seen by this instance

createdAtstring<date-time>
updatedAtstring<date-time>
displayNamestring

editable name of the channel, displayed in its representations

Example
Videos of Framasoft
descriptionstring | null
Example
Videos made with <3 by Framasoft
supportstring | null

text shown by default on all videos of this channel, to tell the audience how to support it

Example
Please support our work on https://soutenir.framasoft.org/en/ <3
publicEmailstring<email> | null

Public email visible in podcast RSS feeds

isLocalboolean
updatedAtstring<date-time>
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
ownerAccountActor & any
Show child attributes
idid>= 1
Example
42
urlstring<url>
nameusername

immutable name of the actor, used to find or mention it

Show child attributes

immutable name of the user, used to find or mention its actor

username
Example
chocobozzz
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
hoststring<hostname>

server on which the actor is resident

hostRedundancyAllowedboolean | null

whether this actor's host allows redundancy of its videos

followingCountinteger>= 0

number of actors subscribed to by this actor, as seen by this instance

followersCountinteger>= 0

number of followers of this actor, as seen by this instance

createdAtstring<date-time>
updatedAtstring<date-time>
userIdid | null

object id for the user tied to this account

Show child attributes
id>= 1
Example
42
displayNamestring

editable name of the account, displayed in its representations

descriptionstring | null

text or bio displayed on the account's profile

videosCountinteger

only included when withStats is true

viewsPerDayArray<object>

only included when withStats is true. Chronologically ordered, spans the whole statsDays range. Each point aggregates viewsGroupInterval worth of views, starting at date

Show child attributes
datestring<date-time>
viewsinteger
viewsGroupIntervalstringdayweekmonth

bucket size of viewsPerDay, only included when withStats is true

totalViewsinteger

lifetime views of all the channel videos, only included when withStats is true

videoPrivacyinteger | null

Default privacy of videos imported by this synchronization

List ratings of an account

GET
https://peertube2.cpy.re/api/v1/accounts/{name}/ratings

Parameters

namestringrequiredpath

The username or handle of the account

startinteger>= 0query

Offset used to paginate results

countinteger[1, 100]15query

Number of items to return

sortstringquery

Sort column

ratingstringlikedislikequery

Optionally filter which ratings to retrieve

Response

successful operation

Response fields application/json
Show child attributes
videoVideorequired
Show child attributes
idid

object id for the video

Show child attributes
id>= 1
Example
42
uuidUUIDv4

universal identifier for the video, that can be used across instances

Show child attributes
UUIDv4<uuid>
Example
9c9de5e8-0a1e-484a-b099-e80766180a6d
shortUUIDshortUUID
Show child attributes

translation of a uuid v4 with a bigger alphabet to have a shorter uuid

shortUUID
Example
2y84q2MQUMWPbiEcxNXMgC
isLiveboolean
liveSchedulesArray<LiveSchedule>
Show child attributes
startAtstring<date-time>

Date when the stream is scheduled to air at

createdAtstring<date-time>

time at which the video object was first drafted

Example
2017-10-01T10:52:46.396Z
publishedAtstring<date-time>

time at which the video was marked as ready for playback (with restrictions depending on privacy). Usually set after a state evolution.

Example
2018-10-01T10:52:46.396Z
updatedAtstring<date-time>

last time the video's metadata was modified

Example
2021-05-04T08:01:01.502Z
originallyPublishedAtstring<date-time> | null

used to represent a date of first publication, prior to the practical publication date of publishedAt

Example
2010-10-01T10:52:46.396Z
categoryVideoConstantNumber-Category

category in which the video is classified

Show child attributes

category id of the video (see /videos/categories)

Example
15
labelstring
Example
Science & Technology
licenceVideoConstantNumber-Licence

licence under which the video is distributed

Show child attributes

licence id of the video (see /videos/licences)

Example
2
labelstring
Example
Attribution - Share Alike
languageVideoConstantString-Language

main language used in the video

Show child attributes

language id of the video (see /videos/languages)

Example
en
labelstring
Example
English
privacyVideoPrivacyConstant

privacy policy used to distribute the video

Show child attributes

privacy id of the video (see /videos/privacies)

labelstring
truncatedDescriptionstring | null

truncated description of the video, written in Markdown.

Example
**[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)**\r\n*A decentralized video hosting network, based on fr...
durationinteger<seconds>

duration of the video in seconds

Example
1419
aspectRationumber<float> | null

PeerTube >= 6.1 Aspect ratio of the video stream

Example
1.778
isLocalboolean
namename

title of the video

Example
What is PeerTube?
thumbnailPathstring | nulldeprecated

Deprecated in PeerTube v8.1, use thumbnails instead. Null if the file is stored in object storage: use the non-deprecated field instead.

previewPathstring | nulldeprecated

Deprecated in PeerTube v8.1, use thumbnails instead. Null if the file is stored in object storage: use the non-deprecated field instead.

PeerTube >= 8.1 Array of thumbnails for the video

Show child attributes
fileUrlstring
widthinteger
heightinteger
aspectRatiostring
Example
16:9
embedPathstring
Example
/videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
viewsinteger
Example
1337
likesinteger
Example
42
dislikesinteger
Example
7
commentsinteger

PeerTube >= 7.2 Number of comments on the video

nsfwboolean
nsfwFlagsNSFWFlag
Show child attributes

NSFW flags (can be combined using bitwise or operator)

  • 0 NONE
  • 1 VIOLENT
  • 2 EXPLICIT_SEX
NSFWFlag0124
nsfwSummarystring

PeerTube >= 7.2 More information about the sensitive content of the video

Show child attributes

PeerTube >= 9.0 Use of AI in the video, declared by the video creator:

  • 1 Not specified
  • 2 No AI-generated content: nothing seen or heard in the video has been generated by AI
  • 3 Contains AI-generated content: some parts of the video have been generated by AI
  • 4 AI-generated: the whole video, or most of it, has been generated by AI
labelstring
Show child attributes

PeerTube >= 9.0 Commercial content in the video, declared by the video creator:

  • 1 None
  • 2 Promotional content: the creator promotes their own products, services or business
  • 3 Paid partnership: a third party paid, or provided goods or services, in exchange for the promotion
labelstring
Show child attributes

Videos that can be recommended next to a video:

  • 1 All videos
  • 2 Only videos of the platform that owns the reference video (or of the current platform if no video is given)
  • 3 Only videos of the account that owns the reference video
  • 4 Only videos of the channel of the reference video

This is a preference of the video owner: applications displaying recommendations may not apply it

labelstring
waitTranscodingboolean | null
stateVideoStateConstant

represents the internal state of the video processing within the PeerTube instance

Show child attributes
idid123456789101112131415

The video state:

  • 1: Published
  • 2: To transcode
  • 3: To import
  • 4: Waiting for live stream
  • 5: Live ended
  • 6: To move to an external storage (object storage...)
  • 7: Transcoding failed
  • 8: Moving to an external storage failed
  • 9: To edit using studio edition feature
  • 10: To move to the file system
  • 11: Moving to the file system failed
  • 12: Import failed
  • 13: To duplicate, the files of another video are being copied
  • 14: Duplication failed, the files of the other video could not be copied
  • 15: The studio edition of a video saved as a new video failed

Same fields as video.id

labelstring
scheduledUpdateVideoScheduledUpdate | null
Show child attributes
privacyVideoPrivacySet12345

privacy id of the video (see /videos/privacies)

updateAtstring<date-time>required

When to update the video

blacklistedboolean | null
blacklistedReasonstring | null
Show child attributes
idinteger
namestring
displayNamestring
urlstring<url>
hoststring<hostname>
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
Show child attributes
idid>= 1
Example
42

Same fields as video.id

namestring
displayNamestring
urlstring<url>
hoststring<hostname>
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
userHistoryobject | null
Show child attributes
currentTimeinteger
captionLanguagesArray<string>

PeerTube >= 9.0 Languages of the video captions. Only returned by video lists

ratingstringlikedislikenonerequired

Rating of the video

Authorization

OAuth2oauth2

Authenticating 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.