Managing your group chat messages using RumbleTalk RESTful API


Send a system message to a group chat

POST
https://api.rumbletalk.com/chats/{chatId}/messages

Request format

  • Parameter
  • Type
  • Description
  • *text
  • string
  • The system message text
    *Messages are limited to 2048 bytes in length.
  • username
  • string
  • The displayed username
  • image
  • string
  • The displayed image
    * The username field is required for this field to display

Response format

  • Parameter
  • Type
  • Description
  • status
  • boolean
  • true on success, false otherwise

cURL example

curl \ -X POST \ "https://api.rumbletalk.com/chats/123/messages" \ -H "Authorization: Bearer <token>" \ -d "{\"text\":\"Hello World!\"}"

Response example

{ "status": true }

Reading your group chat messages

GET
https://api.rumbletalk.com/chats/{chatId}/messages

Response format

  • Parameter
  • Type
  • Description
  • status
  • boolean
  • true on success, false otherwise
  • count
  • integer
  • Total number of chats in the query
  • data
  • array
  • An array of objects, each representing a chat

Format of the data parameter

  • Parameter
  • Type
  • Description
  • messageId
  • integer
  • The ID of the message
  • time
  • timestamp
  • The date and time the message was posted on
  • userId
  • integer
  • The ID of the user who posted the message
  • image
  • string
  • The URL of the image of the user who posted the message
  • userName
  • string
  • The username of the user who posted the message
  • text
  • string
  • The message text

cURL example

curl \ -X GET \ "https://api.rumbletalk.com/chats/123/messages" \ -H "Authorization: Bearer <token>"

Response example

{ "status": true, "count": 2, "data": [ { "messageId": 654, "time": 1458934376, "userId": 1, "image": null, "userName": "John", "text": "Hello World!" }, ... ] }

Deleting a message from a group chat

DELETE
https://api.rumbletalk.com/chats/{chatId}/messages/{messageId}

Response format

  • Parameter
  • Type
  • Description
  • status
  • boolean
  • true on success, false otherwise

cURL example

curl \ -X DELETE \ "https://api.rumbletalk.com/chats/123/messages/654" \ -H "Authorization: Bearer <token>"

Response example

{ "status": true }

Deleting a few messages from a group chat

POST
https://api.rumbletalk.com/chats/{chatId}/messages/delete

Request format

Array of message IDs
* Limited to less than a 1000 message ids per request

Response format

  • Parameter
  • Type
  • Description
  • status
  • boolean
  • true on success, false otherwise

cURL example

curl \ -X POST \ "https://api.rumbletalk.com/chats/123/messages/delete" \ -H "Authorization: Bearer <token>" \ -d "[1, 2, 3]"

Response example

{ "status": true }

Delete all messages from a group chat

This method is irreversible and should be handled with care

DELETE
https://api.rumbletalk.com/chats/{chatId}/messages

Response format

  • Parameter
  • Type
  • Description
  • status
  • boolean
  • true on success, false otherwise

cURL example

curl \ -X DELETE \ "https://api.rumbletalk.com/chats/123/messages/654" \ -H "Authorization: Bearer <token>"

Response example

{ "status": true }