PeerTube My User API

Operations related to your own User, when logged-in.

OpenAPI Specification

peertube-my-user-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: PeerTube Abuses My User API
  version: 8.1.0
  contact:
    name: PeerTube Community
    url: https://joinpeertube.org
  license:
    name: AGPLv3.0
    url: https://github.com/Chocobozzz/PeerTube/blob/master/LICENSE
  x-logo:
    url: https://joinpeertube.org/img/brand.png
    altText: PeerTube Project Homepage
  description: "The PeerTube API is built on HTTP(S) and is RESTful. You can use your favorite\nHTTP/REST library for your programming language to use PeerTube.\n\nSee the [REST API quick start](https://docs.joinpeertube.org/api/rest-getting-started) for a few\nexamples of using the PeerTube API.\n\n# Authentication\n\nWhen you sign up for an account on a PeerTube instance, you are given the possibility\nto generate sessions on it, and authenticate there using an access token. Only __one\naccess token can currently be used at a time__.\n\n## Roles\n\nAccounts are given permissions based on their role. There are three roles on\nPeerTube: Administrator, Moderator, and User. See the [roles guide](https://docs.joinpeertube.org/admin/managing-users#roles) for a detail of their permissions.\n\n# Errors\n\nThe API uses standard HTTP status codes to indicate the success or failure\nof the API call, completed by a [RFC7807-compliant](https://tools.ietf.org/html/rfc7807) response body.\n\n```\nHTTP 1.1 404 Not Found\nContent-Type: application/problem+json; charset=utf-8\n\n{\n  \"detail\": \"Video not found\",\n  \"docs\": \"https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo\",\n  \"status\": 404,\n  \"title\": \"Not Found\",\n  \"type\": \"about:blank\"\n}\n```\n\nWe provide error `type` (following RFC7807) and `code` (internal PeerTube code) values for [a growing number of cases](https://github.com/Chocobozzz/PeerTube/blob/develop/packages/models/src/server/server-error-code.enum.ts),\nbut it is still optional. Types are used to disambiguate errors that bear the same status code\nand are non-obvious:\n\n```\nHTTP 1.1 403 Forbidden\nContent-Type: application/problem+json; charset=utf-8\n\n{\n  \"detail\": \"Cannot get this video regarding follow constraints\",\n  \"docs\": \"https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo\",\n  \"status\": 403,\n  \"title\": \"Forbidden\",\n  \"type\": \"https://docs.joinpeertube.org/api-rest-reference.html#section/Errors/does_not_respect_follow_constraints\"\n}\n```\n\nHere a 403 error could otherwise mean that the video is private or blocklisted.\n\n### Validation errors\n\nEach parameter is evaluated on its own against a set of rules before the route validator\nproceeds with potential testing involving parameter combinations. Errors coming from validation\nerrors appear earlier and benefit from a more detailed error description:\n\n```\nHTTP 1.1 400 Bad Request\nContent-Type: application/problem+json; charset=utf-8\n\n{\n  \"detail\": \"Incorrect request parameters: id\",\n  \"docs\": \"https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo\",\n  \"instance\": \"/api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180\",\n  \"invalid-params\": {\n    \"id\": {\n      \"location\": \"params\",\n      \"msg\": \"Invalid value\",\n      \"param\": \"id\",\n      \"value\": \"9c9de5e8-0a1e-484a-b099-e80766180\"\n    }\n  },\n  \"status\": 400,\n  \"title\": \"Bad Request\",\n  \"type\": \"about:blank\"\n}\n```\n\nWhere `id` is the name of the field concerned by the error, within the route definition.\n`invalid-params.<field>.location` can be either 'params', 'body', 'header', 'query' or 'cookies', and\n`invalid-params.<field>.value` reports the value that didn't pass validation whose `invalid-params.<field>.msg`\nis about.\n\n### Deprecated error fields\n\nSome fields could be included with previous versions. They are still included but their use is deprecated:\n- `error`: superseded by `detail`\n\n# Rate limits\n\nWe are rate-limiting all endpoints of PeerTube's API. Custom values can be set by administrators:\n\n| Endpoint (prefix: `/api/v1`) | Calls         | Time frame   |\n|------------------------------|---------------|--------------|\n| `/*`                         | 50            | 10 seconds   |\n| `POST /users/token`          | 15            | 5 minutes    |\n| `POST /users/register`       | 2<sup>*</sup> | 5 minutes    |\n| `POST /users/ask-send-verify-email` | 3      | 5 minutes    |\n\nDepending on the endpoint, <sup>*</sup>failed requests are not taken into account. A service\nlimit is announced by a `429 Too Many Requests` status code.\n\nYou can get details about the current state of your rate limit by reading the\nfollowing headers:\n\n| Header                  | Description                                                |\n|-------------------------|------------------------------------------------------------|\n| `X-RateLimit-Limit`     | Number of max requests allowed in the current time period  |\n| `X-RateLimit-Remaining` | Number of remaining requests in the current time period    |\n| `X-RateLimit-Reset`     | Timestamp of end of current time period as UNIX timestamp  |\n| `Retry-After`           | Seconds to delay after the first `429` is received         |\n\n# CORS\n\nThis API features [Cross-Origin Resource Sharing (CORS)](https://fetch.spec.whatwg.org/),\nallowing cross-domain communication from the browser for some routes:\n\n| Endpoint                    |\n|------------------------- ---|\n| `/api/*`                    |\n| `/download/*`               |\n| `/lazy-static/*`            |\n| `/.well-known/webfinger`    |\n\nIn addition, all routes serving ActivityPub are CORS-enabled for all origins.\n"
servers:
- url: https://peertube2.cpy.re
  description: Live Test Server (live data - latest nightly version)
- url: https://peertube3.cpy.re
  description: Live Test Server (live data - latest RC version)
- url: https://peertube.cpy.re
  description: Live Test Server (live data - stable version)
tags:
- name: My User
  description: 'Operations related to your own User, when logged-in.

    '
paths:
  /api/v1/users/me:
    get:
      summary: Get my user information
      operationId: getUserInfo
      security:
      - OAuth2:
        - user
      tags:
      - My User
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/User'
    put:
      summary: Update my user information
      operationId: putUserInfo
      security:
      - OAuth2:
        - user
      tags:
      - My User
      responses:
        '204':
          description: successful operation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMe'
        required: true
    delete:
      summary: Delete my account
      operationId: deleteMe
      description: Delete the authenticated user's account and all associated data
      security:
      - OAuth2:
        - user
      tags:
      - My User
      responses:
        '204':
          description: successful operation - account deleted
        '400':
          description: invalid request parameters
        '401':
          description: authentication required
  /api/v1/users/me/videos/imports:
    get:
      summary: Get video imports of my user
      security:
      - OAuth2:
        - user
      tags:
      - My User
      parameters:
      - $ref: '#/components/parameters/start'
      - $ref: '#/components/parameters/count'
      - $ref: '#/components/parameters/sort'
      - $ref: '#/components/parameters/includeCollaborations'
      - name: videoId
        in: query
        required: false
        description: Filter on import video ID
        schema:
          type: integer
      - name: targetUrl
        in: query
        required: false
        description: Filter on import target URL
        schema:
          type: string
      - name: videoChannelSyncId
        in: query
        required: false
        description: Filter on imports created by a specific channel synchronization
        schema:
          type: number
      - name: search
        in: query
        required: false
        description: Search in video names
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoImportsList'
  /api/v1/users/me/video-quota-used:
    get:
      summary: Get my user used quota
      security:
      - OAuth2:
        - user
      tags:
      - My User
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  videoQuotaUsed:
                    type: number
                    description: The user video quota used so far in bytes
                    example: 16810141515
                  videoQuotaUsedDaily:
                    type: number
                    description: The user video quota used today in bytes
                    example: 1681014151
  /api/v1/users/me/videos/{videoIdOrUUID}/rating:
    get:
      summary: Get rate of my user for a video
      security:
      - OAuth2: []
      tags:
      - My User
      parameters:
      - $ref: '#/components/parameters/videoIdOrUUID'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMeVideoRating'
  /api/v1/users/me/videos:
    get:
      summary: List videos of my user
      security:
      - OAuth2:
        - user
      tags:
      - My User
      parameters:
      - $ref: '#/components/parameters/channelNameOneOf'
      - $ref: '#/components/parameters/start'
      - $ref: '#/components/parameters/count'
      - $ref: '#/components/parameters/skipCount'
      - $ref: '#/components/parameters/videosSort'
      - $ref: '#/components/parameters/nsfw'
      - $ref: '#/components/parameters/nsfwFlagsIncluded'
      - $ref: '#/components/parameters/nsfwFlagsExcluded'
      - $ref: '#/components/parameters/isLive'
      - $ref: '#/components/parameters/includeScheduledLive'
      - $ref: '#/components/parameters/categoryOneOf'
      - $ref: '#/components/parameters/licenceOneOf'
      - $ref: '#/components/parameters/languageOneOf'
      - $ref: '#/components/parameters/tagsOneOf'
      - $ref: '#/components/parameters/tagsAllOf'
      - $ref: '#/components/parameters/isLocal'
      - $ref: '#/components/parameters/include'
      - $ref: '#/components/parameters/hasHLSFiles'
      - $ref: '#/components/parameters/hasWebVideoFiles'
      - $ref: '#/components/parameters/host'
      - $ref: '#/components/parameters/autoTagOneOfVideo'
      - $ref: '#/components/parameters/stateOneOfVideo'
      - $ref: '#/components/parameters/privacyOneOf'
      - $ref: '#/components/parameters/excludeAlreadyWatched'
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/includeCollaborations'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoListResponse'
  /api/v1/users/me/new-feature-info/read:
    post:
      tags:
      - My User
      summary: Mark feature info as read
      description: '**PeerTube >= v8.0.0'
      security:
      - OAuth2:
        - user
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                feature:
                  $ref: '#/components/schemas/NewFeatureInfoType'
              required:
              - feature
      responses:
        '204':
          description: successful operation
  /api/v1/users/me/avatar/pick:
    post:
      summary: Update my user avatar
      security:
      - OAuth2: []
      tags:
      - My User
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  avatars:
                    type: array
                    items:
                      $ref: '#/components/schemas/ActorImage'
        '413':
          description: image file too large
          headers:
            X-File-Maximum-Size:
              schema:
                type: string
                format: Nginx size
              description: Maximum file size for the avatar
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                avatarfile:
                  description: The file to upload
                  type: string
                  format: binary
            encoding:
              avatarfile:
                contentType: image/png, image/jpeg
  /api/v1/users/me/avatar:
    delete:
      summary: Delete my avatar
      security:
      - OAuth2: []
      tags:
      - My User
      responses:
        '204':
          description: successful operation
  /api/v1/users/me/abuses:
    get:
      summary: List my abuses
      operationId: getMyAbuses
      security:
      - OAuth2: []
      tags:
      - My User
      parameters:
      - name: id
        in: query
        description: only list the report with this id
        schema:
          type: integer
      - name: state
        in: query
        schema:
          $ref: '#/components/schemas/AbuseStateSet'
      - $ref: '#/components/parameters/abusesSort'
      - $ref: '#/components/parameters/start'
      - $ref: '#/components/parameters/count'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                    example: 1
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Abuse'
components:
  parameters:
    abusesSort:
      name: sort
      in: query
      required: false
      description: Sort abuses by criteria
      schema:
        type: string
        enum:
        - -id
        - -createdAt
        - -state
    autoTagOneOfVideo:
      name: autoTagOneOf
      in: query
      required: false
      description: '**PeerTube >= 6.2** **Admins and moderators only** filter on videos that contain one of these automatic tags'
      schema:
        oneOf:
        - type: string
        - type: array
          items:
            type: string
      style: form
      explode: true
    hasWebVideoFiles:
      name: hasWebVideoFiles
      in: query
      required: false
      schema:
        type: boolean
      description: '**PeerTube >= 6.0** Display only videos that have Web Video files'
    sort:
      name: sort
      in: query
      required: false
      description: Sort column
      schema:
        type: string
        example: -createdAt
    tagsOneOf:
      name: tagsOneOf
      in: query
      required: false
      description: tag(s) of the video
      schema:
        oneOf:
        - type: string
        - type: array
          maxItems: 5
          items:
            type: string
      style: form
      explode: true
    include:
      name: include
      in: query
      required: false
      schema:
        type: integer
        enum:
        - 0
        - 1
        - 2
        - 4
        - 8
        - 16
        - 32
      description: '**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

        '
    languageOneOf:
      name: languageOneOf
      in: query
      required: false
      description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language
      schema:
        oneOf:
        - $ref: '#/components/schemas/VideoLanguageSet'
        - type: array
          items:
            $ref: '#/components/schemas/VideoLanguageSet'
      style: form
      explode: true
    includeScheduledLive:
      name: includeScheduledLive
      in: query
      required: false
      description: whether or not include live that are scheduled for later
      schema:
        type: boolean
    privacyOneOf:
      name: privacyOneOf
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/VideoPrivacySet'
      description: '**PeerTube >= 4.0** Display only videos in this specific privacy/privacies'
    host:
      name: host
      in: query
      required: false
      schema:
        type: string
      description: Find elements owned by this host
    hasHLSFiles:
      name: hasHLSFiles
      in: query
      required: false
      schema:
        type: boolean
      description: '**PeerTube >= 4.0** Display only videos that have HLS files'
    start:
      name: start
      in: query
      required: false
      description: Offset used to paginate results
      schema:
        type: integer
        minimum: 0
    categoryOneOf:
      name: categoryOneOf
      in: query
      required: false
      description: category id of the video (see [/videos/categories](#operation/getCategories))
      schema:
        oneOf:
        - $ref: '#/components/schemas/VideoCategorySet'
        - type: array
          items:
            $ref: '#/components/schemas/VideoCategorySet'
      style: form
      explode: true
    nsfw:
      name: nsfw
      in: query
      required: false
      description: whether to include nsfw videos, if any
      schema:
        type: string
        enum:
        - 'true'
        - 'false'
    count:
      name: count
      in: query
      required: false
      description: Number of items to return
      schema:
        type: integer
        default: 15
        maximum: 100
        minimum: 1
    nsfwFlagsExcluded:
      name: nsfwFlagsExcluded
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/NSFWFlag'
    nsfwFlagsIncluded:
      name: nsfwFlagsIncluded
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/NSFWFlag'
    search:
      name: search
      in: query
      required: false
      description: Plain text search, applied to various parts of the model depending on endpoint
      schema:
        type: string
    stateOneOfVideo:
      name: stateOneOf
      in: query
      required: false
      description: '**PeerTube >= 8.2** **Admins and moderators only** filter on videos that have one of these states'
      schema:
        oneOf:
        - $ref: '#/components/schemas/VideoStateConstant/properties/id'
        - type: array
          items:
            $ref: '#/components/schemas/VideoStateConstant/properties/id'
      style: form
      explode: true
    videoIdOrUUID:
      name: videoIdOrUUID
      in: path
      required: true
      description: Video id or UUID
      schema:
        oneOf:
        - $ref: '#/components/schemas/id'
        - $ref: '#/components/schemas/UUIDv4'
        - $ref: '#/components/schemas/shortUUID'
    licenceOneOf:
      name: licenceOneOf
      in: query
      required: false
      description: licence id of the video (see [/videos/licences](#operation/getLicences))
      schema:
        oneOf:
        - $ref: '#/components/schemas/VideoLicenceSet'
        - type: array
          items:
            $ref: '#/components/schemas/VideoLicenceSet'
      style: form
      explode: true
    videosSort:
      name: sort
      in: query
      required: false
      schema:
        type: string
        enum:
        - name
        - -duration
        - -createdAt
        - -publishedAt
        - -views
        - -likes
        - -comments
        - -trending
        - -hot
        - -best
        description: "Sort videos by criteria (prefixing with `-` means `DESC` order):\n  * `hot` - Adaptation of Reddit \"hot\" algorithm taking into account video views, likes, dislikes and comments and publication date\n  * `best` - Same than `hot`, but also takes into account user video history\n  * `trending` - Sort videos by recent views (\"recent\" is defined by the admin)\n  * `views` - Sort videos using their `views` counter\n  * `publishedAt` - Sort by video publication date (when it became publicly available)\n"
    isLocal:
      name: isLocal
      in: query
      required: false
      schema:
        type: boolean
      description: '**PeerTube >= 4.0** Display only local or remote objects'
    includeCollaborations:
      name: includeCollaborations
      in: query
      required: false
      description: '**PeerTube >= 8.0** Include objects from collaborated channels'
      schema:
        type: boolean
    channelNameOneOf:
      name: channelNameOneOf
      in: query
      required: false
      description: '**PeerTube >= 7.2** Filter on videos that are published by a channel with one of these names'
      schema:
        oneOf:
        - type: string
        - type: array
          items:
            type: string
      style: form
      explode: true
    isLive:
      name: isLive
      in: query
      required: false
      description: whether or not the video is a live
      schema:
        type: boolean
    skipCount:
      name: skipCount
      in: query
      required: false
      description: if you don't need the `total` in the response
      schema:
        type: string
        enum:
        - 'true'
        - 'false'
        default: 'false'
    tagsAllOf:
      name: tagsAllOf
      in: query
      required: false
      description: tag(s) of the video, where all should be present in the video
      schema:
        oneOf:
        - type: string
        - type: array
          items:
            type: string
      style: form
      explode: true
    excludeAlreadyWatched:
      name: excludeAlreadyWatched
      in: query
      description: Whether or not to exclude videos that are in the user's video history
      schema:
        type: boolean
  schemas:
    NotificationSettingValue:
      type: integer
      description: 'Notification type. One of the following values, or a sum of multiple values:

        - `0` NONE

        - `1` WEB

        - `2` EMAIL

        '
    VideoImportsList:
      properties:
        total:
          type: integer
          example: 1
        data:
          type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/VideoImport'
    VideoConstantNumber-Licence:
      properties:
        id:
          $ref: '#/components/schemas/VideoLicenceSet'
        label:
          type: string
          example: Attribution - Share Alike
    VideoStateConstant:
      properties:
        id:
          type: integer
          enum:
          - 1
          - 2
          - 3
          - 4
          - 5
          - 6
          - 7
          - 8
          - 9
          description: '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

            '
        label:
          type: string
    AbusePredefinedReasons:
      type: array
      items:
        type: string
        enum:
        - violentOrAbusive
        - hatefulOrAbusive
        - spamOrMisleading
        - privacy
        - rights
        - serverRules
        - thumbnails
        - captions
      example:
      - spamOrMisleading
    VideoConstantString-Language:
      properties:
        id:
          $ref: '#/components/schemas/VideoLanguageSet'
        label:
          type: string
          example: English
    UserAdminFlags:
      type: integer
      enum:
      - 0
      - 1
      description: Admin flags for the user (None = `0`, Bypass video blocklist = `1`)
      example: 1
    VideoListResponse:
      properties:
        total:
          type: integer
          example: 1
        data:
          type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/Video'
    Actor:
      properties:
        id:
          $ref: '#/components/schemas/id'
        url:
          type: string
          format: url
        name:
          description: immutable name of the actor, used to find or mention it
          allOf:
          - $ref: '#/components/schemas/username'
        avatars:
          type: array
          items:
            $ref: '#/components/schemas/ActorImage'
        host:
          type: string
          format: hostname
          description: server on which the actor is resident
        hostRedundancyAllowed:
          type: boolean
          nullable: true
          description: whether this actor's host allows redundancy of its videos
        followingCount:
          type: integer
          minimum: 0
          description: number of actors subscribed to by this actor, as seen by this instance
        followersCount:
          type: integer
          minimum: 0
          description: number of followers of this actor, as seen by this instance
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    User:
      properties:
        id:
          $ref: '#/components/schemas/id'
        username:
          $ref: '#/components/schemas/username'
        email:
          type: string
          format: email
          description: The user email
        emailVerified:
          type: boolean
          description: Has the user confirmed their email address?
        emailPublic:
          type: boolean
          description: Has the user accepted to display the email publicly?
        nsfwPolicy:
          $ref: '#/components/schemas/NSFWPolicy'
        nsfwFlagsDisplayed:
          $ref: '#/components/schemas/NSFWFlag'
        nsfwFlagsHidden:
          $ref: '#/components/schemas/NSFWFlag'
        nsfwFlagsWarned:
          $ref: '#/components/schemas/NSFWFlag'
        nsfwFlagsBlurred:
          $ref: '#/components/schemas/NSFWFlag'
        adminFlags:
          $ref: '#/components/schemas/UserAdminFlags'
        autoPlayNextVideo:
          type: boolean
          description: Automatically start playing the upcoming video after the currently playing video
        autoPlayNextVideoPlaylist:
          type: boolean
          description: Automatically start playing the video on the playlist after the currently playing video
        autoPlayVideo:
          type: boolean
          description: Automatically start playing the video on the watch page
        p2pEnabled:
          type: boolean
          description: whether to enable P2P in the player or not
        videosHistoryEnabled:
          type: boolean
          description: whether to keep track of watched history or not
        videoLanguages:
          type: array
          items:
            type: string
          description: list of languages to filter videos down to
        language:
          type: string
          description: default language for this user
        videoQuota:
          type: integer
          description: The user video quota in bytes
          example: -1
        videoQuotaDaily:
          type: integer
          description: The user daily video quota in bytes
          example: -1
        role:
          type: object
          properties:
            id:
              $ref: '#/components/schemas/UserRole'
            label:
              type: string
              enum:
              - User
              - Moderator
              - Administrator
        theme:
          type: string
          description: Theme enabled by this user
        account:
          $ref: '#/components/schemas/Account'
        notificationSettings:
          $ref: '#/components/schemas/UserNotificationSettings'
        videoChannels:
          type: array
          items:
            $ref: '#/components/schemas/VideoChannel'
        blocked:
          type: boolean
        blockedReason:
          type: string
        noInstanceConfigWarningModal:
          type: boolean
        noAccountSetupWarningModal:
          type: boolean
        noWelcomeModal:
          type: boolean
        createdAt:
          type: string
        pluginAuth:
          type: string
          description: Auth plugin to use to authenticate the user
        lastLoginDate:
          type: string
          format: date-time
        twoFactorEnabled:
          type: boolean
          description: Whether the user has enabled two-factor authentication or not
        newFeaturesInfoRead:
          type: number
          description: New features information the user has read
    NewFeatureInfoType:
      type: integer
      enum:
      - 1
      description: "Represent a new feature that can be displayed to inform users. One of the following values:\n\n  - `1` CHANNEL_COLLABORATION\n"
    Thumbnail:
      properties:
        fileUrl:
          type: string
        width:
          type: integer
        height:
          type: integer
        aspectRatio:
          type: string
          example: '16:9'
    AbuseStateSet:
      type: integer
      enum:
      - 1
      - 2
      - 3
      description: The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)
    UserRole:
      type: integer
      enum:
      - 0
      - 1
      - 2
      description: The user role (Admin = `0`, Moderator = `1`, User = `2`)
      example: 2
    VideoImport:
      properties:
        id:
          $ref: '#/components/schemas/id'
        targetUrl:
          type: string
          format: url
          description: remote URL where to find the import's source video
          example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
        magnetUri:
          type: string
          format: uri
          description: magnet URI allowing to resolve the import's source video
          pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
        torrentfile:
          type: string
          format: binary
          description: Torrent file containing only the video file
        torrentName:
          type: string
        state:
          allOf:
          - $ref: '#/components/schemas/VideoImportStateConstant'
        error:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        video:
          nullable: true
          allOf:
          - $ref: '#/components/schemas/Video'
    VideoPrivacyConstant:
      properties:
        id:
          $ref: '#/components/schemas/VideoPrivacySet'
        label:
          type: string
    AbuseStateConstant:
      properties:
        id:
          $ref: '#/components/schemas/AbuseStateSet'
        label:
          type: string
    id:
      type: integer
      minimum: 1
      example: 42
    VideoScheduledUpdate:
      properties:
        privacy:
          $ref: '#/components/schemas/VideoPrivacySet'
        updateAt:
          type: string
          format: date-time
          description: When to update the video
      required:
      - updateAt
    UserNotificationSettings:
      properties:
        abuseAsModerator:
          $ref: '#/components/schemas/NotificationSettingValue'
        videoAutoBlacklistAsModerator:
          $ref: '#/components/schemas/NotificationSettingValue'
        newUserRegistration:
          $ref: '#/components/schemas/NotificationSettingValue'
        newVideoFromSubscription:
          $ref: '#/components/schemas/NotificationSettingValue'
        blacklistOnMyVideo:
          $ref: '#/components/schemas/NotificationSettingValue'
        myVideoPublished:
          $ref: '#/components/schemas/NotificationSettingValue'
        myVideoImportFinished:
          $ref: '#/components/schemas/NotificationSettingValue'
        commentMention:
          $ref: '#/components/schema

# --- truncated at 32 KB (49 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/peertube/refs/heads/main/openapi/peertube-my-user-api-openapi.yml