Blarb provides two APIs: one for posting messages and another for retrieving messages in regular channels. Please note that these APIs are not supported in P2P channels.
/api/:channel
Sends a message to the specified channel.
Parameter | Type | Description |
---|---|---|
name |
string | The nickname of the sender |
message |
string | The message content to send |
POST /api/general
Content-Type: application/json
{
"name": "Alice",
"message": "Hello everyone!"
}
{
"status": "success",
"message": "Message sent"
}
/api/:channel
Retrieves the most recent 50 messages in the specified channel. Supports pagination using the skip
query parameter.
Parameter | Type | Description |
---|---|---|
skip |
integer | Number of messages to skip for pagination. Optional |
GET /api/general?skip=50
[
{
"name": "Alice",
"message": "Hello everyone!",
"timestamp": "2025-09-04T12:00:00Z"
},
{
"name": "Bob",
"message": "Hi Alice!",
"timestamp": "2025-09-04T12:01:00Z"
}
]