PeerTube Ownership Change API

The Ownership Change API from PeerTube — 12 operation(s) for ownership change.

Operations 12

GET /api/v1/videos/ownership List video ownership changes #
POST /api/v1/videos/ownership/{id}/accept Accept ownership change request #
POST /api/v1/videos/ownership/{id}/refuse Refuse ownership change request #
DELETE /api/v1/videos/ownership/{id} Delete ownership change request #
GET /api/v1/videos/{videoIdOrUUID}/ownership List ownership change requests for a video #
POST /api/v1/videos/{videoIdOrUUID}/give-ownership Request ownership change #
GET /api/v1/video-channels/ownership List channel ownership changes #
POST /api/v1/video-channels/ownership/{id}/accept Accept channel ownership change request #
POST /api/v1/video-channels/ownership/{id}/refuse Refuse channel ownership change request #
DELETE /api/v1/video-channels/ownership/{id} Delete channel ownership change request #
GET /api/v1/video-channels/{channelHandle}/ownership List ownership change requests for a channel #
POST /api/v1/video-channels/{channelHandle}/give-ownership Request channel ownership change #

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-ownership-change-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-ownership-change-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PeerTube Ownership Change 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: Ownership Change
paths:
  /api/v1/videos/ownership:
    get:
      summary: List video ownership changes
      description: List ownership change requests received by the authenticated user and requests sent by a channel managed by the authenticated user
      tags:
      - Ownership Change
      security:
      - OAuth2: []
      parameters:
      - $ref: '#/components/parameters/start'
      - $ref: '#/components/parameters/count'
      - name: sort
        in: query
        required: false
        schema:
          type: string
          enum:
          - -createdAt
          - createdAt
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                    example: 1
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ChangeOwnership'
        '401':
          description: authentication required
      operationId: getApiV1VideosOwnership
      x-operation-id-source: derived
  /api/v1/videos/ownership/{id}/accept:
    post:
      summary: Accept ownership change request
      tags:
      - Ownership Change
      security:
      - OAuth2: []
      parameters:
      - $ref: '#/components/parameters/idOrUUID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                channelId:
                  type: integer
                  description: Target channel id owned by the authenticated user
              required:
              - channelId
      responses:
        '204':
          description: successful operation
        '400':
          description: ownership change request already accepted/refused or invalid target channel id
        '403':
          description: cannot terminate an ownership change of another user
        '413':
          description: quota exceeded for the target account/channel
        '404':
          description: video ownership change not found
      operationId: postApiV1VideosOwnershipByIdAccept
      x-operation-id-source: derived
  /api/v1/videos/ownership/{id}/refuse:
    post:
      summary: Refuse ownership change request
      tags:
      - Ownership Change
      security:
      - OAuth2: []
      parameters:
      - $ref: '#/components/parameters/idOrUUID'
      responses:
        '204':
          description: successful operation
        '400':
          description: ownership change request already accepted/refused
        '403':
          description: cannot terminate an ownership change of another user
        '404':
          description: video ownership change not found
      operationId: postApiV1VideosOwnershipByIdRefuse
      x-operation-id-source: derived
  /api/v1/videos/ownership/{id}:
    delete:
      summary: Delete ownership change request
      description: Delete an ownership change request. Only users who can manage the video can delete the request.
      tags:
      - Ownership Change
      security:
      - OAuth2: []
      parameters:
      - $ref: '#/components/parameters/idOrUUID'
      responses:
        '204':
          description: successful operation
        '400':
          description: ownership request already accepted or refused
        '403':
          description: only users who can manage the video can delete an ownership change request
        '404':
          description: video ownership change not found
      operationId: deleteApiV1VideosOwnershipById
      x-operation-id-source: derived
  /api/v1/videos/{videoIdOrUUID}/ownership:
    get:
      summary: List ownership change requests for a video
      description: List all ownership change requests for a specific video. The authenticated user must be able to manage the video.
      tags:
      - Ownership Change
      security:
      - OAuth2: []
      parameters:
      - $ref: '#/components/parameters/videoIdOrUUID'
      - name: state
        in: query
        required: false
        description: Filter by ownership change state
        schema:
          $ref: '#/components/schemas/ChangeOwnershipState'
      - $ref: '#/components/parameters/start'
      - $ref: '#/components/parameters/count'
      - name: sort
        in: query
        required: false
        schema:
          type: string
          enum:
          - -createdAt
          - createdAt
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                    example: 1
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ChangeOwnership'
        '403':
          description: cannot manage the video
        '404':
          description: video not found
      operationId: getApiV1VideosByVideoIdOrUUIDOwnership
      x-operation-id-source: derived
  /api/v1/videos/{videoIdOrUUID}/give-ownership:
    post:
      summary: Request ownership change
      tags:
      - Ownership Change
      security:
      - OAuth2: []
      parameters:
      - $ref: '#/components/parameters/videoIdOrUUID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
              required:
              - username
      responses:
        '204':
          description: successful operation
        '400':
          description: changing video ownership to a remote account is not supported yet or there is already a pending ownership request
        '403':
          description: cannot change ownership of this video
        '404':
          description: video not found
      operationId: postApiV1VideosByVideoIdOrUUIDGiveOwnership
      x-operation-id-source: derived
  /api/v1/video-channels/ownership:
    get:
      summary: List channel ownership changes
      description: List ownership change requests received by the authenticated user and requests sent by channels managed by the authenticated user
      tags:
      - Ownership Change
      security:
      - OAuth2: []
      parameters:
      - $ref: '#/components/parameters/start'
      - $ref: '#/components/parameters/count'
      - name: sort
        in: query
        required: false
        schema:
          type: string
          enum:
          - -createdAt
          - createdAt
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                    example: 1
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ChangeOwnership'
        '401':
          description: authentication required
      operationId: getApiV1VideoChannelsOwnership
      x-operation-id-source: derived
  /api/v1/video-channels/ownership/{id}/accept:
    post:
      summary: Accept channel ownership change request
      tags:
      - Ownership Change
      security:
      - OAuth2: []
      parameters:
      - $ref: '#/components/parameters/idOrUUID'
      responses:
        '204':
          description: successful operation
        '400':
          description: ownership change request already accepted/refused or request type mismatch
        '403':
          description: cannot terminate an ownership change of another user
        '404':
          description: channel ownership change not found
        '409':
          description: cannot accept transferring the last channel of the initiator account
        '413':
          description: quota exceeded for the target account
      operationId: postApiV1VideoChannelsOwnershipByIdAccept
      x-operation-id-source: derived
  /api/v1/video-channels/ownership/{id}/refuse:
    post:
      summary: Refuse channel ownership change request
      tags:
      - Ownership Change
      security:
      - OAuth2: []
      parameters:
      - $ref: '#/components/parameters/idOrUUID'
      responses:
        '204':
          description: successful operation
        '400':
          description: ownership change request already accepted/refused or request type mismatch
        '403':
          description: cannot terminate an ownership change of another user
        '404':
          description: channel ownership change not found
      operationId: postApiV1VideoChannelsOwnershipByIdRefuse
      x-operation-id-source: derived
  /api/v1/video-channels/ownership/{id}:
    delete:
      summary: Delete channel ownership change request
      description: Delete a channel ownership change request. Only channel owners can delete the request.
      tags:
      - Ownership Change
      security:
      - OAuth2: []
      parameters:
      - $ref: '#/components/parameters/idOrUUID'
      responses:
        '204':
          description: successful operation
        '400':
          description: ownership request already accepted/refused or request type mismatch
        '403':
          description: only channel owners can delete a channel ownership change request
        '404':
          description: channel ownership change not found
      operationId: deleteApiV1VideoChannelsOwnershipById
      x-operation-id-source: derived
  /api/v1/video-channels/{channelHandle}/ownership:
    get:
      summary: List ownership change requests for a channel
      description: List all ownership change requests for a specific channel. The authenticated user must be able to manage the channel.
      tags:
      - Ownership Change
      security:
      - OAuth2: []
      parameters:
      - $ref: '#/components/parameters/channelHandle'
      - name: state
        in: query
        required: false
        description: Filter by ownership change state
        schema:
          $ref: '#/components/schemas/ChangeOwnershipState'
      - $ref: '#/components/parameters/start'
      - $ref: '#/components/parameters/count'
      - name: sort
        in: query
        required: false
        schema:
          type: string
          enum:
          - -createdAt
          - createdAt
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                    example: 1
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ChangeOwnership'
        '400':
          description: invalid parameters
        '403':
          description: cannot manage the channel
        '404':
          description: channel not found
      operationId: getApiV1VideoChannelsByChannelHandleOwnership
      x-operation-id-source: derived
  /api/v1/video-channels/{channelHandle}/give-ownership:
    post:
      summary: Request channel ownership change
      tags:
      - Ownership Change
      security:
      - OAuth2: []
      parameters:
      - $ref: '#/components/parameters/channelHandle'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
              required:
              - username
      responses:
        '204':
          description: successful operation
        '400':
          description: changing channel ownership to this target is invalid or there is already a pending ownership request
        '403':
          description: cannot change ownership of this channel
        '404':
          description: channel not found
      operationId: postApiV1VideoChannelsByChannelHandleGiveOwnership
      x-operation-id-source: derived
components:
  parameters:
    idOrUUID:
      name: id
      in: path
      required: true
      description: The object id, uuid or short 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
    channelHandle:
      name: channelHandle
      in: path
      required: true
      description: The video channel handle
      schema:
        type: string
        example: my_username | my_username@example.com
    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'
    count:
      name: count
      in: query
      required: false
      description: Number of items to return
      schema:
        type: integer
        default: 15
        maximum: 100
        minimum: 1
  schemas:
    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'
    Account:
      allOf:
      - $ref: '#/components/schemas/Actor'
      - properties:
          userId:
            description: object id for the user tied to this account
            allOf:
            - $ref: '#/components/schemas/User/properties/id'
          displayName:
            type: string
            description: editable name of the account, displayed in its representations
            minLength: 3
            maxLength: 120
          description:
            type:
            - string
            - 'null'
            description: text or bio displayed on the account's profile
    VideoSummary:
      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'
        name:
          type: string
        isLive:
          type: boolean
        nsfw:
          type: boolean
        publishedAt:
          type: string
          format: date-time
        thumbnails:
          description: '**PeerTube >= 8.1** Array of thumbnails for the video'
          type: array
        channel:
          $ref: '#/components/schemas/VideoChannelSummary'
    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
          - 'null'
          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
    ChangeOwnership:
      type: object
      description: Representation of a ownership change
      properties:
        id:
          $ref: '#/components/schemas/id'
        state:
          properties:
            id:
              $ref: '#/components/schemas/ChangeOwnershipState'
            label:
              type: string
        initiatorAccount:
          $ref: '#/components/schemas/Account'
        nextOwnerAccount:
          $ref: '#/components/schemas/Account'
        video:
          $ref: '#/components/schemas/VideoSummary'
        videoChannel:
          $ref: '#/components/schemas/VideoChannelSummary'
        createdAt:
          type: string
          format: date-time
    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
    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
    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
    username:
      type: string
      description: immutable name of the user, used to find or mention its actor
      example: chocobozzz
      pattern: /^[a-z0-9._]+$/
      minLength: 1
      maxLength: 50
    ChangeOwnershipState:
      type: integer
      enum:
      - 1
      - 2
      - 3
      description: The ownership change state (Pending = `1`, Rejected = `2`, Accepted = `3`)
    id:
      type: integer
      minimum: 1
      example: 42
  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