sintoniadocs
API reference

Notification and presence APIs

Heartbeats, effective status, inbox reads and mute preferences.

On this pagePresenceCentralPreferences and pausesDelivery in the browserMinimised window and computer activityWeb Push in backgroundAutomatic presence by platformOnline, Don't disturb and callsAndroid with closed interfaceMessage reactions

Routes use Authorization: Bearer …. Conversation routes require X-Workspace-Id and real participation. Notification objects do not contain text or message key.

Presence#

POST /api/presence/heartbeat receives {"idleSeconds":0}. . Customer sends current idle time, between 0 and 86400 seconds, and the server uses its own clock to record activity. Returns status and idleAfterSeconds:300. . Current customers send heartbeats each 15 seconds while they can execute in the background.

GET /api/presence/me returns effective status and manualStatus. PUT /api/presence/me receives {"status":"auto"}; options auto, online (manual), away, busy, dnd and offline.

The activity is aggregated between valid sessions of the account. An active session keeps the account online. No heartbeat in any session in the last 90 seconds, the state is offline. In auto mode, 300 seconds since the latest activity result in away. Online manual choices, away, busy and dnd prevail over the timer while there is connected session; offline always prevails. Active call/reunion participation results in busy, except dnd/offline. Online is no longer an alias of self. The automatic state depends on the accuracy and availability of customer signals and does not constitute proof of productivity or physical presence.

The people returned by /api/people and /api/channels/{id}/members include status. . Direct conversations in /api/channels include peer_id and peer_status. . Events WebSocket presence They carry it. userId and status for members of workspaces in common; polling recovers states.

Central#

  • GET /api/notifications: up to 100 newer items still accessible, with id, user_id, channel_id, message_id, created_at, read_at, channel_name, author, workspace_id and alert.
  • POST /api/notifications/{id}/read: only marks one item from your own account.
  • POST /api/notifications/read-all: Marks all items in the account.
  • POST /api/notifications/read-channel: receives {"channelId":"UUID"} and requires access to the conversation.

New messages to other attendees create items; own messages do not create warning for you. Webhooks can also notify their creator. Items are metadata: reading the content continues depending on authorization and the device keys.

The event WebSocket notification informs id and channelId, and the client consults the center. The reconnection uses polling. The client avoids showing old alerts when starting and marks as read the items of the conversation that is open in the foreground.

Preferences and pauses#

GET/PUT /api/notifications/preferences returns/receives:

json
{"muteUntil":null,"mutedForever":false,"desktopEnabled":false}

GET/PUT /api/channels/{id}/notifications returns/receives:

json
{"muteUntil":null,"mutedForever":false}

muteUntil is epoch in milliseconds or null; accepts up to 366 days in the future. mutedForever maintains pause until explicitly deactivated. PUT replaces all fields: preserve desktopEnabled by changing only the global pause. The customer offers 15 minutes, 1 time, 8 hours, 24 hours, permanent and resume.

The server calculates alert: you need enabled notices, no global pause and different channel and manual dnd status. Silence does not remove messages or items from the center. The client requests notification permission only when the user enables the option. The operating system can still deny or silence the warning by its own settings.

System warnings are enabled by default for users without saved preference. The explicit option to disable and the existing pauses are preserved. Each browser/equipment still needs to grant its local permission. Warnings contain author and conversation, no text of the message. When clicking, the client checks the account/server and opens the conversation. In the browser, Web Push allows delivery with closed page subject to system rules; in native applications, remote push FCM/APNs is not yet implemented. Notifications and presence use the same backend chosen in the login and do not cross deployments yet.

Delivery in the browser#

Events received by WebSocket during the initial consultation or other ongoing consultation are preserved and reconciled, without repeating warnings already issued. The first shipment doesn't fire the unread history. In the visible tab, messages from another conversation also display an internal warning with Open. Currently visible and focused conversation is marked as read; it does not trigger a new message warning.

If warnings are enabled but local permission is missing, the application shows Allow warnings. Test notification also consults the active registration of the notice in the browser and informs the difference between sending/registration and display by the system. Site Permission does not warrant a macOS banner: Enable Firefox/Chrome notifications in System Adjustments and check Focus mode. The application does not change these settings. The internal warning remains available when the page is open; Web Push complements delivery in the browser.

Minimised window and computer activity#

In the application installed for macOS, Windows and X11, the automatic presence consults system inactivity and recognizes use in other programs. In the browser, minimizing the window does not allow you to conclude whether the person is using another application or has moved away from the computer.

On the web, automatic status stays online as long as there is connection. We do not use Idle Detection or page events to mark absence; manual status remains available. The five-minute automatic detection remains in mobile/desktop applications. The suspension/discard of the flap may interrupt heartbeats and result in Disconnected.

Web Push in background#

The browser registers an application after login, authorization of the device and permission of notifications. worker sintonia-push-sw.js receives messages and call invitations without keeping the page open. Requires HTTPS (localhost is allowed for development), access to browser push providers and system-enabled notifications. On iPhone/iPad with iOS/iPadOS 16.4 or higher, add the site to the Home Screen, open by this icon and grant permission. Closing the browser by force, battery saving, Focus mode or system locks can prevent/delay delivery. Push does not keep a call or its continuous touch active after closing the page.

Warnings use the Sintonia logo and identify author and conversation/channel. Payload includes display names, message/thread/talk identifiers and public installation key, never text or chat keys. These metadata can appear on the locked screen as per system preferences. Click validates account/installation and opens the exact message; call still depends on valid invitation. Global, channel and Do not disturb preferences are checked at the time of upload. Messages have a brief wait to avoid warnings of items already read; the provider can deliver a notice in transit after a read or change of preference.

API and operation#

  • GET /api/notifications/push/config: authenticated; returns enabled and public key VAPID when enabled.
  • POST /api/notifications/push: authenticated and session linked to reliable device; receives deviceId, endpoint, p256dh and auth. . Accept endpoints HTTPS of providers Google, Mozilla, Apple and Windows; does not accept arbitrary or redirect destinations. Returns 200. .
  • DELETE /api/notifications/push: removes entries from the current session; returns 200. Logout and session removal revoke the registration by foreign key.

WEB_PUSH_ENABLED=true is the default; WEB_PUSH_SUBJECT=https://sintonia.one identifies the operator with the provider. It doesn't require a Firebase project. V8 persists registration and queue, and generates a VAPID key per installation, encrypted with the existing operating key. Preserve bank and operating key in backups. Do not print endpoints/registration keys. Registration expire after 60 days without customer renewal; 404/410 endpoints are removed. The queue has limited attempts and expiration, with worker itself to not block email/retention tasks. The provider and operating system remain responsible for final delivery; there is no guarantee of real-time delivery.

Automatic presence by platform#

On the web, the automatic presence keeps Online while connected, including with minimized flap/window. You do not request Idle Detection permission or use no keyboard/mouse on the page to infer that the computer is inactive. The user can still select Absent, Busy or Disconnected manually. Closed browser, execution suspension or connection loss may still lead to Disconnected after the heartbeat expires; no permanent presence is promised with the browser suspended. The five-minute automatic inactivity stays in mobile/desktop applications, using system activity when supported and the app's life/activity cycle on the other platforms.

Online, Don't disturb and calls#

The menu shows Online for automatic mode (auto in the API), with color indicator for each state. Don't disturb. (dnd) silences warnings and touches, preserving the items of the plant. Calls and approved meetings with active heartbeat show Busy automatically; on exit, return the previous choice. Don't disturb it prevails during the call. Busy alone does not silence notifications. Effective presence requires valid session/appearance.

Inclusion/removal/output of channels produces notifications channel-added, channel-removed or channel-left, with channel name and actor, without message content. These items belong to the recipient and can be read after leaving the channel; they do not grant access to the content.

Global search, directory, receipts and non-read center: see People, messages and unread. Silence alerts does not mark content as read.

Android with closed interface#

APK maintains its own connection to the instance in Profile and notifications → Configure notifications → Receive with closed app. Grant the permission of notifications. A permanent warning Sintonia connected indicates the running service; deactivating the option or exiting the account closes the service. The preference is local on account/instant. It's not up to Firebase.

The service consults metadata every 15 seconds, with progressive wait in failure; shows author/conversation and logo, without text, files or keys E2EE. Touch opens the corresponding message in the correct account/instance. A separate credentials, limited to reading notices, is linked to the session and to the device; it is revoked/expired with them without allowing login or access to the history. The native storage is encrypted by Android Keystore. It does not issue presence or keep the person online.

It is not an immediate delivery guarantee: Twelve, battery saving, manufacturer policies, force stopped, restart the device or expire the session can prevent the service. Reopen the app to reconnect. iOS with closed process still needs APN integration; this service is exclusive to Android. Desktop depends on the running application; browsers use already existing Web Push.

References: Foreground services and restrictions Twelve.

API restricted from background warnings#

  • POST /api/notifications/background, authenticated session and { "deviceId": "…" }: emits opaque credentials to the trusted device of this session; reissue replaces the previous one.
  • GET /api/notifications/background/events, X-Notification-Token header: only authorized metadata up to 100 unread warnings created after concession. Don't use that credentials as a session token. Silenced events have alert: false and should not generate warning.
  • DELETE /api/notifications/background, authenticated session: abrogates granting of the session.

Requires updated backend with updated Flyway V19 and updated APK. Migration is applied on startup; it does not change messages, identities or backups.

Message reactions#

Use Can not open message to choose The count appears below the message; tap the reaction to add it or remove yours. The same person counts once per emoji, and can use different emojis. The reactions persist in the instance, sync between devices and appear also in the threads and common chat within the call. Deleted messages hide reactions and do not accept changes until restored. API checks link to the channel and history limit of each account; it is not enough to know the message ID.

Reactions are metadata of the service: emoji, link to the message and author of the reaction stay on the server; the body of the message remains encrypted. Summaries are loaded in batch with each page of up to a hundred messages, no query per line. The meeting-specific chat is separate and has the scope documented in Meetings.

Search channels, QR codes, uploads, security…

↑ ↓ navigate ↵ open result