Coming soon. Abrova Chat is coming soon. This page describes how it will work; it can’t be used yet.
Messages
Send, receive, and manage Abrova Chat messages — text, images, files, reactions, replies, edits, deletes, pins. Per-message push variables via metadata.
Last updated: 27 Oct 2026
Send, receive, and manage messages across all platforms. Supports text, images, files, reactions, replies, edits, deletes, and pins.
Message Types
- Text — Plain text messages
- Image — Photo attachments
- File — Document uploads
- System — Automated notices
Send & Manage Messages#
Send text or attachments, reply to existing messages, paginate history, edit/delete, react, and pin — all from one client API.
Flutter
// Send a text message
await client.sendMessage(
room.id,
content: 'Your order has been shipped!',
metadata: {
'pushVariables': {'trackingNumber': 'TRK-789'},
},
);
// Send with attachment
await client.sendMessage(
room.id,
content: 'Receipt attached',
type: MessageType.file,
attachments: [
Attachment(url: '...', mimeType: 'application/pdf', name: 'receipt.pdf', size: 51200),
],
);
// Reply to a message
await client.sendMessage(room.id, content: 'Thanks!', replyToId: originalMsg.id);
// Get history (paginated, oldest first; pass the oldest id to load earlier ones)
final result = await client.getMessages(room.id, limit: 50);
final older = await client.getMessages(room.id, limit: 50, before: result.messages.first.id);
// Mark as read
await client.markAsRead(room.id);
// Edit / Delete
await client.editMessage(messageId, content: 'Updated content');
await client.deleteMessage(messageId);
// Reactions
await client.addReaction(messageId, emoji: '👍');
await client.removeReaction(messageId, emoji: '👍');
// Pin / Unpin
await client.pinMessage(messageId);
await client.unpinMessage(messageId);iOS
// Send a text message
let message = try await client.sendMessage(
room.id,
content: "Your order has been shipped!",
metadata: ["pushVariables": ["trackingNumber": "TRK-789"]]
)
// Send with attachment
try await client.sendMessage(
room.id,
content: "Receipt attached",
type: .file,
attachments: [
Attachment(url: "https://...", mimeType: "application/pdf", name: "receipt.pdf", size: 51200)
]
)
// Reply to a message
try await client.sendMessage(room.id, content: "Thanks!", replyToId: originalMsg.id)
// Get history (paginated, oldest first; pass the oldest id to load earlier ones)
let result = try await client.getMessages(room.id, limit: 50)
let older = try await client.getMessages(room.id, limit: 50, before: result.messages.first?.id)
// Mark as read
try await client.markAsRead(room.id)
// Edit / Delete
try await client.editMessage(messageId, content: "Updated content")
try await client.deleteMessage(messageId)
// Reactions
try await client.addReaction(messageId, emoji: "👍")
try await client.removeReaction(messageId, emoji: "👍")Android
// Send a text message
val message = client.sendMessage(
roomId = room.id,
content = "Your order has been shipped!",
metadata = mapOf("pushVariables" to mapOf("trackingNumber" to "TRK-789"))
)
// Send with attachment
client.sendMessage(
roomId = room.id,
content = "Receipt attached",
type = MessageType.FILE,
attachments = listOf(
Attachment(url = "https://...", mimeType = "application/pdf", name = "receipt.pdf", size = 51200)
)
)
// Reply to a message
client.sendMessage(roomId = room.id, content = "Thanks!", replyToId = originalMsg.id)
// Get history (paginated, oldest first; pass the oldest id to load earlier ones)
val result = client.getMessages(room.id, limit = 50)
val older = client.getMessages(room.id, limit = 50, before = result.messages.first().id)
// Mark as read
client.markAsRead(room.id)
// Edit / Delete
client.editMessage(messageId, content = "Updated content")
client.deleteMessage(messageId)
// Reactions
client.addReaction(messageId, emoji = "👍")
client.removeReaction(messageId, emoji = "👍")React Native
// Send a text message
const message = await client.sendMessage(roomId, 'Your order has been shipped!', {
metadata: { pushVariables: { trackingNumber: 'TRK-789' } },
});
// Send with attachment
await client.sendMessage(roomId, 'Receipt attached', {
type: 'file',
attachments: [
{ url: 'https://...', mimeType: 'application/pdf', name: 'receipt.pdf', size: 51200 },
],
});
// Reply to a message
await client.sendMessage(roomId, 'Thanks!', { replyToId: originalMsg.id });
// Get history (paginated, oldest first; pass the oldest id to load earlier ones)
const { messages } = await client.getMessages(roomId, { limit: 50 });
const older = await client.getMessages(roomId, { limit: 50, before: messages[0].id });
// Mark as read
await client.markAsRead(roomId, lastMessageId);
// Edit / Delete
await client.editMessage(roomId, messageId, 'Updated content');
await client.deleteMessage(roomId, messageId);
// Reactions
await client.addReaction(roomId, messageId, '👍');
await client.removeReaction(roomId, messageId, '👍');
// Pin / Unpin
await client.pinMessage(roomId, messageId);
await client.unpinMessage(roomId, messageId);Web
// Send a text message
const message = await client.sendMessage(roomId, 'Your order has been shipped!', {
metadata: { pushVariables: { trackingNumber: 'TRK-789' } },
});
// Send with attachment
await client.sendMessage(roomId, 'Receipt attached', {
type: 'file',
attachments: [
{ url: 'https://...', mimeType: 'application/pdf', name: 'receipt.pdf', size: 51200 },
],
});
// Reply to a message
await client.sendMessage(roomId, 'Thanks!', { replyToId: originalMsg.id });
// Get history (paginated, oldest first; pass the oldest id to load earlier ones)
const { messages } = await client.getMessages(roomId, { limit: 50 });
const older = await client.getMessages(roomId, { limit: 50, before: messages[0].id });
// Mark as read
await client.markAsRead(roomId);
// Edit / Delete
await client.editMessage(messageId, 'Updated content');
await client.deleteMessage(messageId);
// Reactions
await client.addReaction(messageId, '👍');
await client.removeReaction(messageId, '👍');
// Pin / Unpin
await client.pinMessage(messageId);
await client.unpinMessage(messageId);Node.js
// Send a text message
const message = await abrovaChat.messages.send(room.id, {
senderUserId: 'seller-1',
content: 'Your order has been shipped!',
metadata: { pushVariables: { trackingNumber: 'TRK-789' } },
});
// Send with attachment
await abrovaChat.messages.send(room.id, {
senderUserId: 'seller-1',
content: 'Receipt attached',
type: 'file',
attachments: [
{ url: 'https://...', mimeType: 'application/pdf', name: 'receipt.pdf', size: 51200 },
],
});
// Reply to a message
await abrovaChat.messages.send(room.id, {
senderUserId: 'buyer-2',
content: 'Thanks!',
replyToId: message.id,
});
// Get history (paginated)
const { messages, hasMore } = await abrovaChat.messages.getHistory(room.id, {
userId: 'buyer-2',
limit: 50,
});
// Mark as read
await abrovaChat.messages.markAsRead(room.id, 'buyer-2');
// Edit / Delete
await abrovaChat.messages.edit(messageId, 'seller-1', 'Updated content');
await abrovaChat.messages.delete(messageId, 'seller-1');
// Reactions
await abrovaChat.reactions.add(messageId, 'buyer-2', '👍');
await abrovaChat.reactions.remove(messageId, 'buyer-2', '👍');
// Pin / Unpin
await abrovaChat.pins.pin(messageId, 'seller-1');
await abrovaChat.pins.unpin(messageId, 'seller-1');
// Search messages
const results = await abrovaChat.messages.search(room.id, {
q: 'shipped',
userId: 'buyer-2',
});REST API
# Send message with custom push variables
curl -X POST "https://chat.abrova.ir/api/v1/rooms/{roomId}/messages" \
-H "X-API-Key: ab_live_your_api_key" \
-H "X-Server-Secret: $ABROVA_SERVER_SECRET" \
-H "Content-Type: application/json" \
-d '{
"senderUserId": "seller-1",
"content": "Your order has been shipped!",
"metadata": {
"pushVariables": {"trackingNumber": "TRK-789"}
}
}'
# Get messages (paginated)
curl "https://chat.abrova.ir/api/v1/rooms/{roomId}/messages?userId=buyer-2&limit=50" \
-H "X-API-Key: ab_live_your_api_key" -H "X-Server-Secret: $ABROVA_SERVER_SECRET"
# Mark as read
curl -X POST "https://chat.abrova.ir/api/v1/rooms/{roomId}/read" \
-H "X-API-Key: ab_live_your_api_key" -H "X-Server-Secret: $ABROVA_SERVER_SECRET" \
-H "Content-Type: application/json" -d '{"userId": "buyer-2"}'
# Edit message
curl -X PUT "https://chat.abrova.ir/api/v1/messages/{messageId}" \
-H "X-API-Key: ab_live_your_api_key" -H "X-Server-Secret: $ABROVA_SERVER_SECRET" \
-H "Content-Type: application/json" -d '{"userId": "seller-1", "content": "Updated"}'
# Reactions
curl -X POST "https://chat.abrova.ir/api/v1/messages/{messageId}/reactions" \
-H "X-API-Key: ab_live_your_api_key" -H "X-Server-Secret: $ABROVA_SERVER_SECRET" \
-H "Content-Type: application/json" -d '{"userId": "buyer-2", "emoji": "👍"}'
# Pin message
curl -X POST "https://chat.abrova.ir/api/v1/messages/{messageId}/pin" \
-H "X-API-Key: ab_live_your_api_key" -H "X-Server-Secret: $ABROVA_SERVER_SECRET" \
-H "Content-Type: application/json" -d '{"userId": "seller-1"}'Per-message push variables.
You can pass pushVariables per message via metadata.pushVariables. These variables are merged into your push notification templates at delivery time, allowing each message to customize the notification the recipient sees.
Was this page helpful?
Report a problem