Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
82 lines (71 loc) · 2.8 KB

File metadata and controls

82 lines (71 loc) · 2.8 KB

Send Message

Send a message to a room.

Name Requires Auth Permission Setting
sendMessage Yes

Payload Parameters

Argument Example Required Description
message
 {
"_id": "8gMsLe9ApZjo2D2iB",
        "rid": "64a1f373376181965ab77f54",
        "msg": "Hello World!"
    }

| Required | The message object. |

The message object contains the following properties:

_id8gMsLe9ApZjo2D2iBThe message id
rid64a1f373376181965ab77f54The room id where the message should be sent
msgHello WorldThe message content to be sent.

Example Call

{
    "msg": "method",
    "method": "sendMessage",
    "id": "423",
    "params": [
        {
            "_id": "8gMsLe9A7pZjo2D2iB",
            "rid": "64a1f373376181965ab77f54",
            "msg": "Hello World!"
        }
    ]
}

Example Response

{
    "msg": "result",
    "id": "423",
    "result": {
        "_id": "8gMsLe9A7pZjo2D2iB",
        "rid": "64a1f373376181965ab77f54",
        "msg": "Hello World!",
        "ts": {
            "$date": 1688421337724
        },
        "u": {
            "_id": "LFdhbcNHx5zsMA7T4",
            "username": "test.rc",
            "name": "Test RC"
        },
        "_updatedAt": {
            "$date": 1688421337830
        },
        "urls": [],
        "mentions": [],
        "channels": [],
        "md": [
            {
                "type": "PARAGRAPH",
                "value": [
                    {
                        "type": "PLAIN_TEXT",
                        "value": "Hello World!"
                    }
                ]
            }
        ]
    }
}

{% hint style="info" %} To send a file, use the Upload File to a Room endpoint. {% endhint %}