Developer
On this page

Notifications API

Send native OS notifications from your applet.

The ctx.sdk.notifications surface sends a native operating system notification, surfaced through the OS notification center.

Scope required: notifications:send

Usage

Call ctx.sdk.notifications.send inside a method’s run body:

import { defineMethod } from "@rightplace/applet-sdk/v2";

export default defineMethod({
  async run(_params, ctx) {
    await ctx.sdk.notifications.send({
      title: "New articles",
      body: "5 unread in The Verge",
      icon: "Rss",
    });
  },
});

The argument is a single object: title (required), plus optional body and icon.

Notes

  • Declare notifications:send in applet.json::scopes[] or the call is denied.
  • Notifications use the native OS system, so the user’s notification settings and Focus modes apply.
  • Keep the title and body brief and actionable. Avoid sending from cron or background loops.
  • Returns a Promise; await it before the method returns.