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

# Send a message to a room

> Send a message to live sessions in a room

A message sent needs to be handled as below.
Unless it is handled by the client-side SDK, it does nothing.

```tsx theme={null}
<Pagecall
  onMessage={(message) => {
    // On a successful api call,
    // this callback is called with the same `message` value as in the request body
  }}
/>
```


## OpenAPI

````yaml POST /rooms/{room_id}/message
openapi: 3.0.0
info:
  title: Pagecall Public API - OpenAPI 3.0
  description: >-
    This is a official Pagecall API Documents written in OpenAPI 3.0.

    Responses from the Pagecall API may contain more information, but what is
    not stated in this document may change at any time without any notice.
  termsOfService: https://pplink.notion.site/774e4131813b47f8b06e3da4524604e8
  contact:
    email: support@pagecall.com
  version: 1.0.0
servers:
  - url: https://api.pagecall.com/v1
security: []
tags:
  - name: room
    description: Operations about room resources
paths:
  /rooms/{room_id}/message:
    parameters:
      - in: path
        name: room_id
        required: true
        schema:
          type: string
        description: room id
        example: 000585f36eed9e8fb6b655b4
    post:
      tags:
        - user
      summary: Send a message to a room
      description: Send a message to live sessions in a room
      operationId: roomsSendMessage
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - message
              properties:
                message:
                  type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '400':
          description: Invalid Parameters Supplied or Unauthenticated or Unauthorized
        '500':
          description: Validation exception
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: token

````