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

# Add a room member

> Adds a user to a group room. Caller must be a room admin; cannot be used on direct-message rooms.



## OpenAPI

````yaml /openapi/shared.yaml post /api/v1/chat/rooms/{room_id}/members
openapi: 3.0.3
info:
  title: Shared Service API
  version: 1.0.0
  description: |2-

        **Shared Service API** - Comprehensive shared service and management system.

        ## Versionings
        The API uses URL path versioning (e.g., `/api/v1/`, `/api/v2/`).
        Current version: **v1**
        
  contact:
    name: API Support
    email: thakacreations@gmail.com
  license:
    name: thakacreations
servers: []
security: []
paths:
  /api/v1/chat/rooms/{room_id}/members:
    post:
      tags:
        - chat
      summary: Add a room member
      description: >-
        Adds a user to a group room. Caller must be a room admin; cannot be used
        on direct-message rooms.
      operationId: chat_rooms_members_add
      parameters:
        - in: path
          name: room_id
          schema:
            type: string
            format: uuid
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddMemberRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AddMemberRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AddMemberRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoomMemberAddResponse'
          description: ''
      security:
        - bearerAuth: []
components:
  schemas:
    AddMemberRequest:
      type: object
      properties:
        user_id:
          type: string
          format: uuid
      required:
        - user_id
    RoomMemberAddResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          $ref: '#/components/schemas/RoomMemberAddData'
      required:
        - data
        - message
        - success
    RoomMemberAddData:
      type: object
      properties:
        user_id:
          type: string
        role:
          type: string
      required:
        - role
        - user_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Enter your JWT token in the format: Bearer <token>'

````