PeerTube Server Blocklist API

The Server Blocklist API from PeerTube — 5 operation(s) for server blocklist.

Operations 7

GET /api/v1/blocklist/status Get block status of accounts/hosts #
GET /api/v1/server/blocklist/accounts List blocked accounts by server #
POST /api/v1/server/blocklist/accounts Block an account by server #
DELETE /api/v1/server/blocklist/accounts/{accountName} Unblock an account by server #
GET /api/v1/server/blocklist/servers List blocked servers by server #
POST /api/v1/server/blocklist/servers Block a server by server #
DELETE /api/v1/server/blocklist/servers/{host} Unblock a server by server #

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-server-blocklist-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-server-blocklist-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PeerTube Server Blocklist 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: Server Blocklist
paths:
  /api/v1/blocklist/status:
    get:
      tags:
      - Server Blocklist
      summary: Get block status of accounts/hosts
      parameters:
      - name: accounts
        in: query
        description: Check if these accounts are blocked
        example:
        - goofy@example.com
        - donald@example.com
        schema:
          type: array
          items:
            type: string
      - name: hosts
        in: query
        description: Check if these hosts are blocked
        example:
        - example.com
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockStatus'
      operationId: getApiV1BlocklistStatus
      x-operation-id-source: derived
  /api/v1/server/blocklist/accounts:
    get:
      tags:
      - Server Blocklist
      summary: List blocked accounts by server
      security:
      - OAuth2:
        - admin
      parameters:
      - $ref: '#/components/parameters/start'
      - $ref: '#/components/parameters/count'
      - $ref: '#/components/parameters/sort'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                    example: 1
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AccountBlock'
      operationId: getApiV1ServerBlocklistAccounts
      x-operation-id-source: derived
    post:
      tags:
      - Server Blocklist
      summary: Block an account by server
      security:
      - OAuth2:
        - admin
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                accountName:
                  type: string
                  example: chocobozzz@example.org
                  description: account to block, in the form `username@domain`
              required:
              - accountName
      responses:
        '200':
          description: successful operation
        '409':
          description: self-blocking forbidden
      operationId: postApiV1ServerBlocklistAccounts
      x-operation-id-source: derived
  /api/v1/server/blocklist/accounts/{accountName}:
    delete:
      tags:
      - Server Blocklist
      summary: Unblock an account by server
      security:
      - OAuth2:
        - admin
      parameters:
      - name: accountName
        in: path
        required: true
        description: account to unblock, in the form `username@domain`
        schema:
          type: string
      responses:
        '201':
          description: successful operation
        '404':
          description: account or account block does not exist
      operationId: deleteApiV1ServerBlocklistAccountsByAccountName
      x-operation-id-source: derived
  /api/v1/server/blocklist/servers:
    get:
      tags:
      - Server Blocklist
      summary: List blocked servers by server
      security:
      - OAuth2:
        - admin
      parameters:
      - $ref: '#/components/parameters/start'
      - $ref: '#/components/parameters/count'
      - $ref: '#/components/parameters/sort'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                    example: 1
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ServerBlock'
      operationId: getApiV1ServerBlocklistServers
      x-operation-id-source: derived
    post:
      tags:
      - Server Blocklist
      summary: Block a server by server
      security:
      - OAuth2:
        - admin
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                host:
                  type: string
                  format: hostname
                  description: server domain to block
              required:
              - host
      responses:
        '204':
          description: successful operation
        '409':
          description: self-blocking forbidden
      operationId: postApiV1ServerBlocklistServers
      x-operation-id-source: derived
  /api/v1/server/blocklist/servers/{host}:
    delete:
      tags:
      - Server Blocklist
      summary: Unblock a server by server
      security:
      - OAuth2:
        - admin
      parameters:
      - name: host
        in: path
        required: true
        description: server domain to unblock
        schema:
          type: string
          format: hostname
      responses:
        '204':
          description: successful operation
        '404':
          description: server block does not exist
      operationId: deleteApiV1ServerBlocklistServersByHost
      x-operation-id-source: derived
components:
  parameters:
    count:
      name: count
      in: query
      required: false
      description: Number of items to return
      schema:
        type: integer
        default: 15
        maximum: 100
        minimum: 1
    start:
      name: start
      in: query
      required: false
      description: Offset used to paginate results
      schema:
        type: integer
        minimum: 0
    sort:
      name: sort
      in: query
      required: false
      description: Sort column
      schema:
        type: string
        example: -createdAt
  schemas:
    AccountBlock:
      properties:
        byAccount:
          $ref: '#/components/schemas/Account'
        blockedAccount:
          $ref: '#/components/schemas/Account'
          type: boolean
        createdAt:
          type: string
          format: date-time
    BlockStatus:
      properties:
        accounts:
          type: object
          additionalProperties:
            x-additionalPropertiesName: account
            type: object
            properties:
              blockedByServer:
                type: boolean
              blockedByUser:
                type: boolean
        hosts:
          type: object
          additionalProperties:
            x-additionalPropertiesName: host
            type: object
            properties:
              blockedByServer:
                type: boolean
              blockedByUser:
                type: boolean
    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
    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
    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
    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
    ServerBlock:
      properties:
        byAccount:
          $ref: '#/components/schemas/Account'
        blockedServer:
          type: object
          properties:
            host:
              type: string
              format: hostname
        createdAt:
          type: string
          format: date-time
    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