Notifications

Fóir delivers notifications to your users by email, in-app and push. You send one directly or let an event send it, and each user's preferences decide which channels it reaches them on.

Three channels

In-app notifications can reach a signed-in user live over a GraphQL subscription, filtered to their own. Push goes to iOS through APNs, to Android through FCM and to browsers through Web Push. You upload your own APNs and FCM credentials with the CLI, and push to a platform with none is dropped. Email is the third channel, and none is sent to your users until the project's app base URL is set.

Sending one

sendNotification sends to one user, and a bulk call sends to many. A notification has a title and can carry a message, a category, an action URL, an image, per-channel overrides, an expiry and an idempotency key.

A lifecycle hook can send one when an event fires. You set that up in the console's hook form with a title and a recipient rule: the record's owner, the project's team, or a named list of people.

Preferences per category

A preference is stored per person, per category and per channel, and your users read and change their own through the API. Fóir decides each delivery in order. A category marked required is always sent. Otherwise the recipient's own preference applies, then the category's default, and with neither the notification is sent. A category can also require an opt-in confirmed by email, where nothing switches on until the user follows a link, which expires after seven days.

What the email unsubscribe link does

A one-click unsubscribe switches off all email for that user, across every category. It is stored as a preference marked with its source and emits an event a hook can act on. Bounces and complaints reported by the mail provider write the same kind of row.

Read the detail

The notifications guide covers sending, live in-app delivery, preferences, opt-in by email and setting up push on each platform.