Send notifications
Every send goes to one listener token.
The payload is JSON with title and body.
{
"title": "Build finished",
"body": "Ready to ship."
}HTTP
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:
npm install palmpushSend without waiting for the response:
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.
const response = await client.pushStrict({
title: 'Build finished',
body: 'The deployment completed successfully.',
});
console.log(response.delivery.sentCount);Multiple listeners
client.push({
listenerIds: [
'abc123abc123abc123abc123abc123ab',
'def456def456def456def456def456de',
],
title: 'Build finished',
body: 'The deployment completed successfully.',
});Notes
listenerIdandlistenerTokenmean the same value.titlecan be up to 120 characters.bodycan 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: falseand no delivery history is written.