PeerTube · Example Payload

Post_Api_V1_Users_Id_Block

Prevent a user from logging in and interacting with the instance

Users

Post_Api_V1_Users_Id_Block is an example object payload from PeerTube, with 9 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

operationIdmethodpathsummarydescriptiontagsparametersrequestBodyresponses

Example Payload

Raw ↑
{
  "operationId": "post_api_v1_users_id_block",
  "method": "POST",
  "path": "/api/v1/users/{id}/block",
  "summary": "Block a user",
  "description": "Prevent a user from logging in and interacting with the instance",
  "tags": [
    "Users"
  ],
  "parameters": [
    {
      "name": null,
      "in": null,
      "required": false,
      "description": "",
      "schema": {}
    }
  ],
  "requestBody": {
    "contentType": "application/json",
    "schema": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string",
          "description": "Optional reason for blocking the user",
          "minLength": 0,
          "maxLength": 500
        }
      }
    },
    "example": {}
  },
  "responses": {
    "204": {
      "description": "successful operation",
      "examples": {}
    },
    "400": {
      "description": "invalid user id",
      "examples": {}
    },
    "403": {
      "description": "insufficient permissions to block users",
      "examples": {}
    },
    "404": {
      "description": "user not found",
      "examples": {}
    }
  }
}