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

# private/send_room_message

> Posts a plain-text message, not blank and at most 500 characters, to a chat room and returns it; chat.{room} subscribers receive it live. The message shows the caller's username (see private/get_chat_rooms), never its wallet address. The text must not contain control characters other than newlines, or bidi override characters (U+202A to U+202E and U+2066 to U+2069). The caller must be allowed to join the room: general is open to every wallet that is not banned, and fee_tier also needs a fee tier. A banned wallet gets chat_banned (15000); a wallet whose account is disabled gets account_disabled (16001); a wallet without a fee tier gets chat_room_not_allowed (15001) for fee_tier. Profanity and slurs in the text are masked with asterisks (for example s***) before the message is stored, so the returned message, the chat.{room} event and the room history all carry the masked text. Numbers, addresses and instrument names are never masked. Requires the account-info scope.



## OpenAPI

````yaml /openapi.json post /private/send_room_message
openapi: 3.1.0
info:
  title: Derive v3 API
  version: 0.2.0
  description: JSON-RPC 2.0 methods, served over WebSocket and HTTP POST.
servers:
  - url: https://api.derive.xyz/v3
    description: Production (HTTP POST base)
  - url: https://testnet.api.derive.xyz/v3
    description: Testnet (HTTP POST base)
security: []
tags:
  - name: Subaccounts
    description: >-
      List, inspect, and label subaccounts, portfolios, positions, and
      collateral.
  - name: Session Keys
    description: Register, edit, and list delegated signing keys.
  - name: Account
    description: Wallet-level account information and settings.
  - name: Orderbook
    description: Place, replace, cancel, and query orders, trigger orders, and algos.
  - name: RFQ
    description: 'Request-for-quote: send RFQs, quote, and execute block trades.'
  - name: Liquidations
    description: >-
      Open a Dutch auction against a breaching subaccount, quote the auctions
      running right now, bid on them, and review past ones.
  - name: Vault Shareholders
    description: >-
      Deposit into and withdraw from vaults, and track shares, requests, and
      performance.
  - name: Vault Curators
    description: >-
      Create and operate curated vaults: settle deposit and withdrawal requests,
      and manage vault metadata.
  - name: History
    description: >-
      Per-account historical records: orders, trades, transfers, and
      settlements.
  - name: Market Maker Protection
    description: Configure, read, and reset market-maker protection.
  - name: Transfers & Withdrawals
    description: Move collateral between subaccounts, to other wallets, and on-chain.
  - name: Onchain Actions
    description: >-
      L1 onchain actions submitted via OnchainActionManager: register deposit
      addresses, list pending deposits, and inspect onchain action history.
  - name: System
    description: Rate limits, transaction lookups, and live incidents.
  - name: Market Data
    description: Instruments, currencies, tickers, and market-wide feeds.
  - name: Maker Scoring
    description: Maker programs, score breakdowns, and detailed scoring snapshots.
  - name: Referrals
    description: Referral codes and program performance.
  - name: Chat
    description: Anonymous chat rooms and conversations with the concierge.
  - name: Other
    description: Uncategorized.
paths:
  /private/send_room_message:
    post:
      tags:
        - Chat
      summary: private/send_room_message
      description: >-
        Posts a plain-text message, not blank and at most 500 characters, to a
        chat room and returns it; chat.{room} subscribers receive it live. The
        message shows the caller's username (see private/get_chat_rooms), never
        its wallet address. The text must not contain control characters other
        than newlines, or bidi override characters (U+202A to U+202E and U+2066
        to U+2069). The caller must be allowed to join the room: general is open
        to every wallet that is not banned, and fee_tier also needs a fee tier.
        A banned wallet gets chat_banned (15000); a wallet whose account is
        disabled gets account_disabled (16001); a wallet without a fee tier gets
        chat_room_not_allowed (15001) for fee_tier. Profanity and slurs in the
        text are masked with asterisks (for example s***) before the message is
        stored, so the returned message, the chat.{room} event and the room
        history all carry the masked text. Numbers, addresses and instrument
        names are never masked. Requires the account-info scope.
      operationId: private_send_room_message
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendRoomMessageParams'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoomMessage'
        default:
          description: JSON-RPC error (see Error Codes)
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    $ref: '#/components/schemas/RPCError'
      security:
        - DeriveWallet: []
          DeriveTimestamp: []
          DeriveSignature: []
components:
  schemas:
    SendRoomMessageParams:
      type: object
      required:
        - room
        - text
        - wallet
      properties:
        room:
          $ref: '#/components/schemas/ChatRoom'
        text:
          description: >-
            Plain text: at most 500 characters, not blank, without control
            characters other than newlines or bidi override characters.
          type: string
        wallet:
          description: The session's wallet.
          type: string
    RoomMessage:
      type: object
      required:
        - creation_timestamp
        - message_id
        - room
        - text
        - username
      properties:
        creation_timestamp:
          type: integer
          format: int64
        message_id:
          description: UUID v4 string
          type: string
          format: uuid
        room:
          $ref: '#/components/schemas/ChatRoom'
        text:
          type: string
        username:
          type: string
    RPCError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int64
        data:
          type:
            - string
            - 'null'
        message:
          type: string
    ChatRoom:
      description: >-
        Every wallet not banned from chat may join `general`; `fee_tier` also
        needs a fee tier.
      type: string
      enum:
        - general
        - fee_tier
  securitySchemes:
    DeriveWallet:
      type: apiKey
      in: header
      name: X-DeriveWallet
      description: The wallet the request acts for.
    DeriveTimestamp:
      type: apiKey
      in: header
      name: X-DeriveTimestamp
      description: The current time in milliseconds, as a decimal string.
    DeriveSignature:
      type: apiKey
      in: header
      name: X-DeriveSignature
      description: >-
        EIP-191 signature of the timestamp, by the wallet or one of its session
        keys.

````

## Related topics

- [private/get_chat_rooms](https://docs.derive.xyz/api-reference/chat/privateget_chat_rooms.md)
- [Changelog](https://docs.derive.xyz/changelog.md)
- [Error Codes](https://docs.derive.xyz/error-codes.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.