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

# Join a room

> Allows a user to join an existing video call room with less than 4 participants, or creates a new room if none are available. Also returns a list of potential invite candidates if a new room is created.



## OpenAPI

````yaml api-reference/openapi.json post /room_join
openapi: 3.0.0
info:
  title: Cati Main Server API
  version: 1.0.0
  description: >-
    API for managing Cati assistant users, app users, contacts, media,
    notifications and preferences.
servers:
  - url: /
security: []
paths:
  /room_join:
    post:
      tags:
        - Video Calls
      summary: Join or create a video call room
      description: >-
        Allows a user to join an existing video call room with less than 4
        participants, or creates a new room if none are available. Also returns
        a list of potential invite candidates if a new room is created.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoomJoinRequest'
      responses:
        '200':
          description: Room joined/created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoomJoinResponse'
        '500':
          description: Database or server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    RoomJoinRequest:
      type: object
      required:
        - user_id
      properties:
        user_id:
          type: integer
          description: ID of the user joining the room.
          example: 201
    RoomJoinResponse:
      allOf:
        - $ref: '#/components/schemas/SuccessResponse'
        - type: object
          properties:
            room_code:
              type: string
              description: The code of the room the user joined or created.
              example: Room123ABC
            invite_candidates:
              type: array
              items:
                type: integer
              description: >-
                List of user IDs that are available for invitation if a new room
                was created.
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          example: Database connection failed
    SuccessResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        message:
          type: string
          example: Operation completed successfully

````