PeerTube My History API

Operations related to your watch history.

Operations 3

GET /api/v1/users/me/history/videos List watched videos history #
DELETE /api/v1/users/me/history/videos/{videoIdOrUUID} Delete history element #
POST /api/v1/users/me/history/videos/remove Clear video history #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/peertube-my-history-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

peertube-my-history-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PeerTube My History 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.
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 History
  description: Operations related to your watch history.
paths:
  /api/v1/users/me/history/videos:
    get:
      summary: List watched videos history
      security:
      - OAuth2: []
      tags:
      - My History
      parameters:
      - $ref: '#/components/parameters/start'
      - $ref: '#/components/parameters/count'
      - $ref: '#/components/parameters/search'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoListResponse'
      operationId: getApiV1UsersMeHistoryVideos
      x-operation-id-source: derived
  /api/v1/users/me/history/videos/{videoIdOrUUID}:
    delete:
      summary: Delete history element
      security:
      - OAuth2: []
      tags:
      - My History
      parameters:
      - $ref: '#/components/parameters/videoIdOrUUID'
      responses:
        '204':
          description: successful operation
      operationId: deleteApiV1UsersMeHistoryVideosByVideoIdOrUUID
      x-operation-id-source: derived
  /api/v1/users/me/history/videos/remove:
    post:
      summary: Clear video history
      security:
      - OAuth2: []
      tags:
      - My History
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                beforeDate:
                  description: history before this date will be deleted
                  type: string
                  format: date-time
      responses:
        '204':
          description: successful operation
      operationId: postApiV1UsersMeHistoryVideosRemove
      x-operation-id-source: derived
components:
  schemas:
    LiveSchedule:
      properties:
        startAt:
          type: string
          format: date-time
          description: Date when the stream is scheduled to air at
    NSFWFlag:
      type: integer
      enum:
      - 0
      - 1
      - 2
      - 4
      description: '

        NSFW flags (can be combined using bitwise or operator)

        - `0` NONE

        - `1` VIOLENT

        - `2` EXPLICIT_SEX

        '
    Thumbnail:
      properties:
        fileUrl:
          type: string
        width:
          type: integer
        height:
          type: integer
        aspectRatio:
          type: string
          example: '16:9'
    VideoConstantNumber-Category:
      properties:
        id:
          $ref: '#/components/schemas/VideoCategorySet'
        label:
          type: string
          example: Science & Technology
    VideoCategorySet:
      type: integer
      description: category id of the video (see [/videos/categories](#operation/getCategories))
      example: 15
    Video:
      properties:
        id:
          description: object id for the video
          allOf:
          - $ref: '#/components/schemas/id'
        uuid:
          description: universal identifier for the video, that can be used across instances
          allOf:
          - $ref: '#/components/schemas/UUIDv4'
        shortUUID:
          allOf:
          - $ref: '#/components/schemas/shortUUID'
        isLive:
          type: boolean
        liveSchedules:
          type: array
          items:
            $ref: '#/components/schemas/LiveSchedule'
        createdAt:
          type: string
          format: date-time
          example: '2017-10-01T10:52:46.396000+00:00'
          description: time at which the video object was first drafted
        publishedAt:
          type: string
          format: date-time
          example: '2018-10-01T10:52:46.396000+00:00'
          description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
        updatedAt:
          type: string
          format: date-time
          example: '2021-05-04T08:01:01.502000+00:00'
          description: last time the video's metadata was modified
        originallyPublishedAt:
          type:
          - string
          - 'null'
          format: date-time
          example: '2010-10-01T10:52:46.396000+00:00'
          description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
        category:
          allOf:
          - $ref: '#/components/schemas/VideoConstantNumber-Category'
          description: category in which the video is classified
        licence:
          allOf:
          - $ref: '#/components/schemas/VideoConstantNumber-Licence'
          description: licence under which the video is distributed
        language:
          allOf:
          - $ref: '#/components/schemas/VideoConstantString-Language'
          description: main language used in the video
        privacy:
          allOf:
          - $ref: '#/components/schemas/VideoPrivacyConstant'
          description: privacy policy used to distribute the video
        truncatedDescription:
          type:
          - string
          - 'null'
          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...

            '
          minLength: 3
          maxLength: 250
          description: 'truncated description of the video, written in Markdown.

            '
        duration:
          type: integer
          example: 1419
          format: seconds
          description: duration of the video in seconds
        aspectRatio:
          type:
          - number
          - 'null'
          format: float
          example: 1.778
          description: '**PeerTube >= 6.1** Aspect ratio of the video stream'
        isLocal:
          type: boolean
        name:
          type: string
          description: title of the video
          example: What is PeerTube?
          minLength: 3
          maxLength: 120
        thumbnailPath:
          description: Deprecated in PeerTube v8.1, use thumbnails instead
          deprecated: true
          type: string
        previewPath:
          description: Deprecated in PeerTube v8.1, use thumbnails instead
          deprecated: true
          type: string
        thumbnails:
          description: '**PeerTube >= 8.1** Array of thumbnails for the video'
          type: array
          items:
            $ref: '#/components/schemas/Thumbnail'
        embedPath:
          type: string
          example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
        views:
          type: integer
          example: 1337
        likes:
          type: integer
          example: 42
        dislikes:
          type: integer
          example: 7
        comments:
          description: '**PeerTube >= 7.2** Number of comments on the video'
          type: integer
        nsfw:
          type: boolean
        nsfwFlags:
          allOf:
          - $ref: '#/components/schemas/NSFWFlag'
        nsfwSummary:
          type: string
          description: '**PeerTube >= 7.2** More information about the sensitive content of the video'
        waitTranscoding:
          type:
          - boolean
          - 'null'
        state:
          allOf:
          - $ref: '#/components/schemas/VideoStateConstant'
          description: represents the internal state of the video processing within the PeerTube instance
        scheduledUpdate:
          allOf:
          - $ref: '#/components/schemas/VideoScheduledUpdate'
        blacklisted:
          type:
          - boolean
          - 'null'
        blacklistedReason:
          type:
          - string
          - 'null'
        account:
          $ref: '#/components/schemas/AccountSummary'
        channel:
          $ref: '#/components/schemas/VideoChannelSummary'
        userHistory:
          type:
          - object
          - 'null'
          properties:
            currentTime:
              type: integer
    VideoConstantString-Language:
      properties:
        id:
          $ref: '#/components/schemas/VideoLanguageSet'
        label:
          type: string
          example: English
    VideoScheduledUpdate:
      properties:
        privacy:
          $ref: '#/components/schemas/VideoPrivacySet'
        updateAt:
          type: string
          format: date-time
          description: When to update the video
      required:
      - updateAt
    VideoConstantNumber-Licence:
      properties:
        id:
          $ref: '#/components/schemas/VideoLicenceSet'
        label:
          type: string
          example: Attribution - Share Alike
    shortUUID:
      type: string
      description: translation of a uuid v4 with a bigger alphabet to have a shorter uuid
      example: 2y84q2MQUMWPbiEcxNXMgC
    VideoChannelSummary:
      properties:
        id:
          $ref: '#/components/schemas/id'
        name:
          type: string
        displayName:
          type: string
        url:
          type: string
          format: url
        host:
          type: string
          format: hostname
        avatars:
          type: array
          items:
            $ref: '#/components/schemas/ActorImage'
    VideoPrivacyConstant:
      properties:
        id:
          $ref: '#/components/schemas/VideoPrivacySet'
        label:
          type: string
    VideoLanguageSet:
      type: string
      description: language id of the video (see [/videos/languages](#operation/getLanguages))
      example: en
    AccountSummary:
      properties:
        id:
          type: integer
        name:
          type: string
        displayName:
          type: string
        url:
          type: string
          format: url
        host:
          type: string
          format: hostname
        avatars:
          type: array
          items:
            $ref: '#/components/schemas/ActorImage'
    ActorImage:
      properties:
        path:
          description: Deprecated in PeerTube v8.0, use fileUrl instead
          deprecated: true
          type: string
        fileUrl:
          description: '**PeerTube >= 7.1**'
          type: string
        width:
          type: integer
        height:
          type: integer
          description: '**PeerTube >= 7.3**'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    VideoPrivacySet:
      type: integer
      enum:
      - 1
      - 2
      - 3
      - 4
      - 5
      description: privacy id of the video (see [/videos/privacies](#operation/getVideoPrivacyPolicies))
    VideoLicenceSet:
      type: integer
      description: licence id of the video (see [/videos/licences](#operation/getLicences))
      example: 2
    UUIDv4:
      type: string
      format: uuid
      example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
      pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      minLength: 36
      maxLength: 36
    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
    VideoListResponse:
      properties:
        total:
          type: integer
          example: 1
        data:
          type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/Video'
    id:
      type: integer
      minimum: 1
      example: 42
  parameters:
    count:
      name: count
      in: query
      required: false
      description: Number of items to return
      schema:
        type: integer
        default: 15
        maximum: 100
        minimum: 1
    search:
      name: search
      in: query
      required: false
      description: Plain text search, applied to various parts of the model depending on endpoint
      schema:
        type: string
    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'
    start:
      name: start
      in: query
      required: false
      description: Offset used to paginate results
      schema:
        type: integer
        minimum: 0
  securitySchemes:
    OAuth2:
      description: '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__.


        [Generate]: https://docs.joinpeertube.org/api/rest-getting-started

        '
      type: oauth2
      flows:
        password:
          tokenUrl: /api/v1/users/token
          scopes:
            admin: Admin scope
            moderator: Moderator scope
            user: User scope
externalDocs:
  url: https://docs.joinpeertube.org/api-rest-reference.html
x-tagGroups:
- name: Static endpoints
  tags:
  - Static Video Files
- name: Download
  tags:
  - Video Download
- name: Feeds
  tags:
  - Video Feeds
- name: Auth
  tags:
  - Register
  - Session
- name: Accounts
  tags:
  - Accounts
  - Users
  - User Exports
  - User Imports
  - My User
  - My Subscriptions
  - My Notifications
  - My History
- name: Videos
  tags:
  - Video
  - Video Upload
  - Video Imports
  - Video Captions
  - Video Chapters
  - Video Channels
  - Video Comments
  - Video Rates
  - Video Playlists
  - Video Stats
  - Ownership Change
  - Video Mirroring
  - Video Files
  - Video Transcoding
  - Live Videos
  - Channels Sync
  - Video Passwords
  - Video Embed Privacy
- name: Search
  tags:
  - Search
- name: Moderation
  tags:
  - Abuses
  - Video Blocks
  - Account Blocklist
  - Server Blocklist
  - Automatic Tags
  - Watched Words
- name: Instance
  tags:
  - Config
  - Client Config
  - Homepage
  - Instance Follows
  - Instance Redundancy
  - Plugins
  - Stats
  - Logs
  - Job
- name: Remote Jobs
  tags:
  - Runner Registration Token
  - Runner Jobs
  - Runners