Home

Send notifications

Every send goes to one listener token.

The payload is JSON with title and body.

json
{
  "title": "Build finished",
  "body": "Ready to ship."
}

HTTP

bash
curl -X POST "https://push.palmpush.com/send/<listener-token>" \
  -H "Content-Type: application/json" \
  -d '{"title":"Build finished","body":"Ready to ship."}'

Any HTTP client works. Use the full URL copied from the iOS app, or replace <listener-token> with the copied listener id.

JavaScript

In JavaScript, use the official SDK. It is the recommended way to send palmpush notifications from JavaScript apps, scripts, and backend jobs without hand-writing HTTP requests.

Install it:

bash
npm install palmpush

Send without waiting for the response:

js
import palmpush from 'palmpush';

const client = palmpush({
  listenerId: 'abc123abc123abc123abc123abc123ab',
});

client.push({
  title: 'Agent done',
  body: 'The draft is ready for review.',
});

push(...) is fire-and-forget by default. It catches failures so your script or app does not crash just because a notification failed.

Strict sends

Use pushStrict(...) when your code needs the delivery response or should fail on errors.

js
const response = await client.pushStrict({
  title: 'Build finished',
  body: 'The deployment completed successfully.',
});

console.log(response.delivery.sentCount);

Multiple listeners

js
client.push({
  listenerIds: [
    'abc123abc123abc123abc123abc123ab',
    'def456def456def456def456def456de',
  ],
  title: 'Build finished',
  body: 'The deployment completed successfully.',
});

Notes

  • listenerId and listenerToken mean the same value.
  • title can be up to 120 characters.
  • body can be up to 4096 characters.
  • Node.js 18 or newer is required for the SDK because it uses native fetch.
  • If a listener is disabled in the app, sends return a response with deliveryEnabled: false and no delivery history is written.