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

# Creating a new hall

> Creates a new hall entity in the system.
This is a protected endpoint. Access is restricted to users with `admin` or `manager` roles. An attempt to access this endpoint with insufficient privileges will result in a 403 Forbidden error.




## OpenAPI

````yaml api-reference/openapi.json post /api/halls
openapi: 3.0.0
info:
  title: Tandem IT API
  version: 1.0.0
  description: API for tandem it backend
servers:
  - url: https://tandem.hlofiys.xyz
    description: Production server
security: []
tags:
  - name: Documentation
    description: API documentation endpoint
paths:
  /api/halls:
    post:
      tags:
        - 'Admin: Halls'
      summary: Creating a new hall
      description: >
        Creates a new hall entity in the system.

        This is a protected endpoint. Access is restricted to users with `admin`
        or `manager` roles. An attempt to access this endpoint with insufficient
        privileges will result in a 403 Forbidden error.
      operationId: createHall
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateHallRequest'
      responses:
        '201':
          description: The hall was successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Hall'
        '400':
          description: Validation error. Incorrect or missing data in the request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '401':
          description: >-
            Unauthorized. Authentication credentials were not provided or are
            invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Access denied. The user does not have permission to perform this
            action
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict. Hall with name and address already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth: []
components:
  schemas:
    CreateHallRequest:
      type: object
      required:
        - name
        - address
      properties:
        name:
          type: string
          description: Hall name
        address:
          type: string
          description: Hall address
    Hall:
      type: object
      required:
        - hall_id
        - name
        - address
        - seating_chart_image_url
      properties:
        hall_id:
          type: integer
          format: int64
          description: Unique hall ID
        name:
          type: string
          description: Hall name
        address:
          type: string
          description: Hall address
        seating_chart_image_url:
          type: string
          description: Link to download the hall seating chart
    ValidationError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          example: Validation failed
        errors:
          type: object
          description: A map of field names to their respective error messages.
          additionalProperties:
            type: string
          example:
            name: The name field is required.
            price: The price must be a valid number.
            hall_id: A valid hall_id is required.
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````