> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Player Ban

> Create a new ban



## OpenAPI

````yaml post /players/bans/{workspaceId}
openapi: 3.0.3
info:
  title: Hyra API
  description: Hyra Monolythic API
  version: 2.0.0
servers:
  - url: https://api.hyra.io
security: []
paths:
  /players/bans/{workspaceId}:
    post:
      tags:
        - Players
      description: Create a new ban
      parameters:
        - schema:
            type: string
          in: path
          name: workspaceId
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                player:
                  type: string
                reason:
                  type: string
                source:
                  type: string
                actor:
                  type: string
              required:
                - player
                - reason
                - source
        required: true
      responses:
        '200':
          description: Ban created successfully
          content:
            application/json:
              schema:
                type: object
                description: Ban created successfully
                properties:
                  actor:
                    type: string
                  victim:
                    type: string
                  workspace:
                    type: string
                  reason:
                    type: string
                  removed_by:
                    type: string
                  removed_at:
                    type: string
                  ban_incremental_id:
                    type: number
                  source:
                    type: string
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  _id:
                    type: string
                required:
                  - actor
                  - victim
                  - workspace
                  - reason
                  - ban_incremental_id
                  - createdAt
                  - updatedAt
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````