Skip to Content
API v1EndpointsChat Endpoints

Chat Endpoints

Get Chat Rooms

File: api/chatRooms.php Method: POST Auth: Required JWT (POST body)

ParamTypeDescription
jwtstringUser JWT

Returns all chat rooms the user is a member of. Each room includes:

  • room_id, room_name, created_at, updated_at
  • contract_status - “Contract Accepted” (status > 0) or “Contract Pending”
  • house_id, house_address, house_title, house_image (first image from JSON array)

Flow:

  1. Decodes JWT to get user ID
  2. Queries chat_room_members for user’s rooms
  3. For each room, fetches room details from chat_rooms
  4. For each room, fetches associated house details from houses

Get Single Chat Room

File: api/chatRoomSingle.php Method: POST Auth: Required JWT

Returns details for a specific chat room.

Create Chat Room

File: api/createChatRoom.php Method: POST Auth: Required JWT

Creates a new chat room (typically associated with a house viewing/contract).

Add Room Member

File: api/addRoomMember.php Method: POST Auth: Required JWT

Adds a user to an existing chat room.

Room Members

File: api/roomMembers.php Method: POST Auth: Required JWT

Returns the list of members in a chat room.

Update Chat Numbers

File: api/updateChatNumbers.php Method: POST Auth: Required JWT

Updates chat-related counters or numbers.

Landlord Email Chat In/Out

Files: api/landlordEmailChatIn.php, api/landlordEmailChatOut.php

Handles email-based chat for landlords who interact via email rather than the app.

Moderator Email Chat Out

File: api/moderatorEmailChatOut.php

Handles outgoing email notifications for moderated chat (US).

Note on Chat Architecture

Real-time chat messaging is handled via Firebase Realtime Database, not through this API. These endpoints manage the chat room metadata and membership. The actual message storage and real-time delivery happens in Firebase. See Firebase integration for details.

Last updated on