Palbase Messaging
Palbase's messaging module: a project's people talking — direct and group conversations, their members, their messages with replies, threads, reactions, edits and removals, files, timers, messages seen once, vanish mode and messages sent later — in one shared, multi-tenant service; every project is isolated by row security in its database.
What a conversation says is kept sealed: each conversation has its own key (AES-256-GCM), itself sealed with the project's data key, whose own key is in the platform's key vault. A database dump, a backup or a disk holds no message. The platform holds the keys: this is not end-to-end encryption. Who wrote to whom, and when, is kept as it is: the order, the unread counts and the rights are read from it.
A person's app follows what changed for them with GET /messaging/sync and hears it as it happens on their own realtime channel, messaging:<ref>:<user_id> (events changes, carrying the same shape as a sync, and typing). Pushes go through notify. Files are uploaded encrypted by the app, to the project's storage.
The project's server, with its secret key, runs the module's settings, reads and removes messages (every time in the access log), and reads the reports its people made.
The contract itself: /openapi/messaging.openapi.json
Admin
/messaging/admin/access-logWhen the project's server read people's messagesGET/messaging/admin/conversationsThe project's conversationsPOST/messaging/admin/conversationsMake a conversation for peopleGET/messaging/admin/conversations/{conversation_id}A conversation with its peoplePATCH/messaging/admin/conversations/{conversation_id}Change a conversation, or make it read-onlyDELETE/messaging/admin/conversations/{conversation_id}Delete a conversationPOST/messaging/admin/conversations/{conversation_id}/membersAdd people to a groupDELETE/messaging/admin/conversations/{conversation_id}/members/{user_id}Take a person out of a groupGET/messaging/admin/conversations/{conversation_id}/messagesWhat a conversation saidPOST/messaging/admin/conversations/{conversation_id}/messagesSay something in a conversationDELETE/messaging/admin/conversations/{conversation_id}/messages/{message_id}Remove a messageGET/messaging/admin/conversations/{conversation_id}/messages/{message_id}/attachments/{attachment_id}Where a message's file is readPUT/messaging/admin/profiles/{user_id}A person's name and pictureGET/messaging/admin/reportsThe reports people madeGET/messaging/admin/reports/{report_id}One report, with what it carriesGET/messaging/admin/reports/{report_id}/attachments/{attachment_id}Where a report's file is readPOST/messaging/admin/reports/{report_id}/resolveResolve a reportSafety
Conversations
/messaging/conversationsThe reader's conversationsPOST/messaging/conversations/directThe direct conversation with a personPOST/messaging/conversations/groupMake a groupGET/messaging/conversations/{conversation_id}One of the reader's conversationsPATCH/messaging/conversations/{conversation_id}Change a conversationDELETE/messaging/conversations/{conversation_id}Delete a group for everyonePOST/messaging/conversations/{conversation_id}/clearClear a conversation for oneselfPOST/messaging/conversations/{conversation_id}/closeThe reader left the conversation's screenPOST/messaging/conversations/{conversation_id}/joinJoin an open groupGET/messaging/conversations/{conversation_id}/membersA conversation's peoplePOST/messaging/conversations/{conversation_id}/membersAdd people to a groupPATCH/messaging/conversations/{conversation_id}/members/{user_id}Change a member's roleDELETE/messaging/conversations/{conversation_id}/members/{user_id}Leave a group, or remove someonePUT/messaging/conversations/{conversation_id}/notificationsHow a conversation notifies the readerPOST/messaging/conversations/{conversation_id}/screenshotThe reader took a screenshotPOST/messaging/conversations/{conversation_id}/typingThe reader is typingGET/messaging/groups/openA space's open groupsMessages
/messaging/conversations/{conversation_id}/messagesA conversation's messagesPOST/messaging/conversations/{conversation_id}/messagesSend a messageGET/messaging/conversations/{conversation_id}/messages/{message_id}One messagePATCH/messaging/conversations/{conversation_id}/messages/{message_id}Change a messageDELETE/messaging/conversations/{conversation_id}/messages/{message_id}Remove a messageGET/messaging/conversations/{conversation_id}/messages/{message_id}/attachments/{attachment_id}Where a message's file is readPUT/messaging/conversations/{conversation_id}/messages/{message_id}/reactions/{emoji}React to a messageDELETE/messaging/conversations/{conversation_id}/messages/{message_id}/reactions/{emoji}Take a reaction backGET/messaging/conversations/{conversation_id}/messages/{message_id}/readersWho read a messageGET/messaging/conversations/{conversation_id}/messages/{message_id}/repliesA thread's answersPOST/messaging/conversations/{conversation_id}/messages/{message_id}/viewOpen a message seen oncePOST/messaging/conversations/{conversation_id}/uploadsA URL to upload a file toPOST/messaging/receiptsHow far the reader readGET/messaging/scheduledThe reader's scheduled messagesPATCH/messaging/scheduled/{scheduled_id}Change a scheduled messageDELETE/messaging/scheduled/{scheduled_id}Take a scheduled message backGET/messaging/searchFind messages by their words, or what they meanGET/messaging/threadsThe threads the reader follows