Instance

Config

Each server exposes public information regarding supported videos and options.

Get instance public configuration

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

Response

successful operation

Response fields application/json
instanceobject
Show child attributes
namestring
shortDescriptionstring
defaultClientRoutestring
isNSFWboolean
defaultNSFWPolicystring
serverCountrystring
defaultLanguagestring
supportobject
Show child attributes
textstring
socialobject
Show child attributes
customizationsobject
Show child attributes
javascriptstring
cssstring
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
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>
searchobject
Show child attributes
remoteUriobject
Show child attributes
usersboolean
anonymousboolean
pluginobject
Show child attributes
registeredArray<string>
themeobject
Show child attributes
registeredArray<string>
emailobject
Show child attributes
enabledboolean
contactFormobject
Show child attributes
enabledboolean
serverVersionstring
serverCommitstring
signupobject
Show child attributes
allowedboolean
allowedForCurrentIPboolean
requiresEmailVerificationboolean
transcodingobject
Show child attributes
hlsobject
Show child attributes
enabledboolean
web_videosobject
Show child attributes
enabledboolean
enabledResolutionsArray<VideoResolutionSet>
importobject
Show child attributes
videosobject
Show child attributes
httpobject
Show child attributes
enabledboolean
torrentobject
Show child attributes
enabledboolean
videoChannelSynchronizationobject
Show child attributes
enabledboolean
usersobject
Show child attributes
enabledboolean
resumableUploadobject
Show child attributes
minChunkSizenumber

In bytes. Minimum size of a user archive import chunk (except the last one), 0 if there is no minimum

exportobject
Show child attributes
usersobject
Show child attributes
enabledboolean
exportExpirationnumber

In milliseconds

maxUserVideoQuotanumber

In bytes

autoBlacklistobject
Show child attributes
videosobject
Show child attributes
ofUsersobject
Show child attributes
enabledboolean
blocklistobject
Show child attributes
publicLogobject
Show child attributes
enabledboolean
avatarobject
Show child attributes
fileobject
Show child attributes
sizeobject
Show child attributes
maxinteger
extensionsArray<string>
videoobject
Show child attributes
imageobject
Show child attributes
extensionsArray<string>
sizeobject
Show child attributes
maxinteger
fileobject
Show child attributes
extensionsArray<string>
videoCaptionobject
Show child attributes
fileobject
Show child attributes
sizeobject
Show child attributes
maxinteger
extensionsArray<string>
userobject
Show child attributes
videoQuotainteger

In bytes

Example
16810141515
videoQuotaDailyinteger

In bytes

Example
1681014151
trendingobject
Show child attributes
videosobject
Show child attributes
intervalDaysinteger
trackerobject
Show child attributes
enabledboolean
followingsobject
Show child attributes
instanceobject
Show child attributes
autoFollowIndexobject
Show child attributes
indexUrlstring<url>
federationobject
Show child attributes
enabledboolean
homepageobject
Show child attributes
enabledboolean
openTelemetryobject

PeerTube >= 6.1

Show child attributes
metricsobject
Show child attributes
enabledboolean
playbackStatsIntervalnumber

Milliseconds

viewsobject

PeerTube >= 6.1

Show child attributes
videosobject
Show child attributes
countViewAfternumber

Milliseconds

watchingIntervalobject
Show child attributes
anonymousnumber

Milliseconds

usersnumber

Milliseconds

Get instance "About" information

GET
https://peertube2.cpy.re/api/v1/config/about

Translatable information is returned in the language of the request, using the x-peertube-language header or the Accept-Language header. If the instance has no translation for this language, the default information is returned.

Parameters

x-peertube-languagestringheader

Locale of the web interface (fr-FR, pt-BR...) used to translate the instance information

Response

successful operation

Response fields application/json
instanceobject
Show child attributes
namestring
shortDescriptionstring
descriptionstring
termsstring
codeOfConductstring
hardwareInformationstring
creationReasonstring
moderationInformationstring
administratorstring
maintenanceLifetimestring
businessModelstring
supportobject
Show child attributes
textstring
languagesArray<string>
categoriesArray<integer>
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
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>

Get instance runtime configuration

GET
https://peertube2.cpy.re/api/v1/config/custom

Response

successful operation

Response fields application/json
instanceobject
Show child attributes
namestring
shortDescriptionstring
descriptionstring
termsstring
codeOfConductstring
creationReasonstring
moderationInformationstring
administratorstring
maintenanceLifetimestring
businessModelstring
hardwareInformationstring

Translations of the instance information. Empty fields fall back to the default instance information

Show child attributes
languagestring

Locale of the web interface

Example
fr-FR
shortDescriptionstring
descriptionstring
termsstring
codeOfConductstring
moderationInformationstring
administratorstring
creationReasonstring
maintenanceLifetimestring
businessModelstring
hardwareInformationstring
supportTextstring
languagesArray<string>
categoriesArray<number>
isNSFWboolean
defaultNSFWPolicystring
serverCountrystring
supportobject
Show child attributes
textstring
socialobject
Show child attributes
defaultClientRoutestring
customizationsobject
Show child attributes
javascriptstring
cssstring
themeobject
Show child attributes
defaultstring
servicesobject
Show child attributes
twitterobject
Show child attributes
usernamestring
cacheobject
Show child attributes
previewsobject
Show child attributes
sizeinteger
captionsobject
Show child attributes
sizeinteger
signupobject
Show child attributes
enabledboolean
limitinteger
requiresEmailVerificationboolean
adminobject
Show child attributes
emailstring<email>
contactFormobject
Show child attributes
enabledboolean
userobject

Settings that apply to new users, if registration is enabled

Show child attributes
videoQuotainteger
Example
16810141515
videoQuotaDailyinteger
Example
1681014151
transcodingobject

Settings pertaining to transcoding jobs

Show child attributes
enabledboolean
originalFileobject
Show child attributes
keepboolean
allowAdditionalExtensionsboolean

Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos

allowAudioFilesboolean

If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file

threadsinteger

Amount of threads used by ffmpeg for 1 transcoding job

concurrencynumber

Amount of transcoding jobs to execute in parallel

profilestringdefault

New profiles can be added by plugins ; available in core PeerTube: 'default'.

resolutionsobject

Resolutions to transcode new videos to

Show child attributes
0pboolean
144pboolean
240pboolean
360pboolean
480pboolean
720pboolean
1080pboolean
1440pboolean
2160pboolean
web_videosobject

Web Video specific settings

Show child attributes
enabledboolean
hlsobject

HLS specific settings

Show child attributes
enabledboolean
splitAudioAndVideoboolean
importobject
Show child attributes
videosobject
Show child attributes
httpobject
Show child attributes
enabledboolean
torrentobject
Show child attributes
enabledboolean
video_channel_synchronizationobject
Show child attributes
enabledboolean
autoBlacklistobject
Show child attributes
videosobject
Show child attributes
ofUsersobject
Show child attributes
enabledboolean
blocklistobject
Show child attributes
publicLogobject
Show child attributes
enabledboolean
followersobject
Show child attributes
instanceobject
Show child attributes
enabledboolean
manualApprovalboolean
storyboardobject
Show child attributes
enabledboolean
defaultsobject
Show child attributes
publishobject
Show child attributes
downloadEnabledboolean
commentsPolicyVideoCommentsPolicySet123

Comments policy of the video (Enabled = 1, Disabled = 2, Requires Approval = 3)

recommendationScopeVideoRecommendationScopeSet1234

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

privacyVideoPrivacySet12345

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

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

Example
2
p2pobject
Show child attributes
webappobject
Show child attributes
enabledboolean
embedobject
Show child attributes
enabledboolean
playerobject
Show child attributes
autoPlayboolean

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.

Scopes: admin

Set instance runtime configuration

PUT
https://peertube2.cpy.re/api/v1/config/custom

Changing instance.customizations.javascript or instance.customizations.css requires a password confirmation: set currentPassword at the root of the request body.

Response

200OK

successful operation

400Bad Request

Arises when:

  • the emailer is disabled and the instance is open to registrations
  • web videos and hls are disabled with transcoding enabled - you need at least one enabled
  • the custom JavaScript or CSS changed and currentPassword is missing
403Forbidden

invalid currentPassword, or password confirmation unavailable for this user

429Too Many Requests

too many failed password confirmations

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.

Scopes: admin

Delete instance runtime configuration

DELETE
https://peertube2.cpy.re/api/v1/config/custom

Response

200OK

successful operation

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.

Scopes: admin

Update instance banner

POST
https://peertube2.cpy.re/api/v1/config/instance-banner/pick

Body

multipart/form-data
multipart/form-dataobject
Encoding
bannerfileimage/png, image/jpeg
bannerfilestring<binary>

The file to upload.

Response

204No Content

successful operation

413Payload Too Large

image file too large

Response headers
X-File-Maximum-Sizestring<Nginx size>header

Maximum file size for the banner

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.

Scopes: admin

Delete instance banner

DELETE
https://peertube2.cpy.re/api/v1/config/instance-banner

Response

204No Content

successful operation

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.

Scopes: admin

Update instance avatar

POST
https://peertube2.cpy.re/api/v1/config/instance-avatar/pick

Body

multipart/form-data
multipart/form-dataobject
Encoding
avatarfileimage/png, image/jpeg
avatarfilestring<binary>

The file to upload.

Response

204No Content

successful operation

413Payload Too Large

image file too large

Response headers
X-File-Maximum-Sizestring<Nginx size>header

Maximum file size for the avatar

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.

Scopes: admin

Delete instance avatar

DELETE
https://peertube2.cpy.re/api/v1/config/instance-avatar

Response

204No Content

successful operation

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.

Scopes: admin

Update instance logo

POST
https://peertube2.cpy.re/api/v1/config/instance-logo/{logoType}/pick

Body

multipart/form-data
multipart/form-dataobject
Encoding
logofileimage/png, image/jpeg
logofilestring<binary>

The file to upload.

Parameters

logoTypestringfaviconheader-wideheader-squareopengraphrequiredpath

Response

204No Content

successful operation

413Payload Too Large

image file too large

Response headers
X-File-Maximum-Sizestring<Nginx size>header

Maximum file size for the banner

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.

Scopes: admin

Delete instance logo

DELETE
https://peertube2.cpy.re/api/v1/config/instance-logo/{logoType}

Parameters

logoTypestringfaviconheader-wideheader-squareopengraphrequiredpath

Response

204No Content

successful operation

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.

Scopes: admin