---
title: Send notifications from a device app
description: Create Wendy Notifications from an app running on WendyOS and deliver them to operators in Companion.
---

A WendyOS app can alert people in its organization through this path:

```text
WendyOS app → local Wendy Agent API → Wendy Cloud Notification → Companion inbox + APNs
```

This creates a canonical Wendy Notification. It is not a direct APNs request,
and there is currently no `wendy notification send` CLI command.

## Before you begin

This guide describes the Cloud v2 app-notification workflow. Use the
[Cloud guide](../../cloud/) to select the correct context and check
[migration requirements](../../cloud-migration/) for an existing v1 deployment.
Use a Companion build that supports your Cloud environment; the SDK and mobile
app have separate release tracks.

You need:

1. A Wendy device enrolled in the recipients' Wendy Cloud organization.
2. An app running on that device with the `notifications` entitlement.
3. Recipients using a Wendy Companion build with Cloud v2 sign-in, signed in
   to the same organization.

Use TestFlight Alpha or Beta now, or the
[App Store](https://apps.apple.com/app/wendy-companion/id6761771159) from the
next release. The current App Store build (2026.09.17) cannot sign in to Cloud v2.

Cloud v2 accepts Notifications from an enrolled device for its own organization;
the app or campaign name is only a label. No per-app grant, catalog entry, or
Cloud deployment assignment is required.

Wendy Companion must be installed to receive push notifications. Each recipient
must also allow notifications and have an active APNs registration. If push
delivery is unavailable, the stored Notification can still appear in the
Companion inbox.

## Add the app entitlement

Add `notifications` to the app's `wendy.json`:

```json
{
  "appId": "sh.wendy.voice-agent",
  "entitlements": [
    { "type": "notifications" }
  ]
}
```

WendyOS then exposes the app-private Agent socket at:

```text
WENDY_SYSTEM_SOCKET=/run/wendy/system/system.sock
```

The entitlement exposes the app's local socket. Cloud derives the organization
from the device's enrolled credential, never from the app's request.

## Send with Swift and WendyKit

WendyKit is currently the only application SDK for this API, and it is
Swift-only:

```swift
import WendyKit

let request = try WendyNotificationSendRequest(
    audience: WendyAudience(
        userIDs: ["<cloud-user-id>"],
        roles: [.owner, .admin]
    ),
    title: "Robot needs help",
    body: "Please come to the G1 booth to answer a question.",
    severity: .warning,
    deepLink: "wendy://devices/current/live"
)

let response = try await WendyNotification.send(request)
print("Created Notification \(response.notificationID)")
```

Use Cloud user IDs, not names or email addresses. User and organization role
selectors have union semantics: a user matching more than one selector receives
one Notification. Cloud v2 forwarding uses only these selectors.

These examples use `wendy.system.v1.NotificationAudience`. The separate Cloud v2
message adds `role_ids` and deprecates its enum `roles` field, but the local
app-facing API does not expose or forward `role_ids`. The WendyKit and gRPC
examples here continue to use the supported local selectors.

See the
[wendy-app-sdk README](https://github.com/wendylabsinc/wendy-app-sdk#send-a-notification)
for WendyKit package details.

## Use gRPC without WendyKit

To call this API without WendyKit, generate or provide a gRPC client from
`Proto/wendy/system/v1/notifications.proto`, connect through
the Unix socket in `$WENDY_SYSTEM_SOCKET`, and call:

```text
/wendy.system.v1.NotificationService/Send
```

The request shape is:

```text
SendRequest {
  audience {
    user_ids: "<cloud-user-id>"
  }
  title: "Robot needs help"
  body: "Please come to the G1 booth to answer a question."
  severity: NOTIFICATION_SEVERITY_WARNING
  deep_link: "wendy://devices/current/live"
  notification_id: "<new UUID v4>"
}
```

Do not include an app, device, or organization ID. Wendy Agent supplies the
trusted app identity, and Cloud derives the device and organization from its
enrollment credentials.

See [Examples/WendyNotify](https://github.com/wendylabsinc/WendyOS/tree/main/Examples/WendyNotify)
for a Swift app that calls this API with grpc-swift directly and shows the real
errors and rate limit.

## Delivery and limits

- On Cloud v2, the app can select only users or roles in the device's
  organization. Team selectors are refused.
- At most 100 selectors and 100 resolved recipients are accepted for a
  device-app send.
- Device-app sources may create 10 accepted Notifications per minute. The agent
  also smooths bursts locally. Repeated Cloud rate-limit violations can
  quarantine that app/device source for 15 minutes.
- The title is 1 to 120 UTF-8 bytes and the body is 1 to 2,000. Each is one
  line: a line break, tab or other control character is refused with
  `INVALID_ARGUMENT`, and so is leading or trailing whitespace. Join the lines
  of a multi-line message before sending it.
- Generate a new UUID v4 for each Notification. Reusing an accepted ID returns
  `ALREADY_EXISTS`; a request rejected locally does not claim the UUID.
- Device-originated deep links are restricted to the source device. Use
  `wendy://devices/current/live` as the portable form.
- A successful call means Cloud accepted and stored the Notification, not that
  APNs reached every phone. APNs delivery is best-effort.
- For a device-originated push, the APNs banner title is
  `Wendy · <Cloud app name>`; the custom title remains on the stored
  Notification.

Calling APNs directly from the device would require Apple provider credentials
and device tokens and would bypass Wendy's organization authorization,
attribution, durable inbox record, and deep-link handling. Use the Wendy Agent
API instead.

For field validation, error semantics, and the complete protobuf contract, see
the [Notifications API reference](../../advanced/cloud/notifications-api/#app-facing-api-wendysystemv1).
