palbaseDocs

Palbase Notify · API

POST/notify/push

Push to users

Queues one push per user — each whose preferences take its category — delivered to each of their devices through the project's own FCM, APNs or Expo account: an Expo token through Expo, a VoIP token through APNs, an iOS token through APNs if the project has it (else FCM), Android and web through FCM. To a topic, it is one message the worker spreads to the followers. A dead token is forgotten. A quota that refuses past its limit stops pushes until the next month.

Called by your server, with the project's secret key.

Headers

Idempotency-Keystring · optionalMakes the write safe to send again (at most 255 characters). A retry with the same key and the same request gets the first answer back, marked `Idempotent-Replayed: true`, and changes nothing; the same key with a different request is refused with 422, and while the first request still runs a retry gets 409 with Retry-After. Answers are kept for 24 hours. A refusal made before the request ran — a limit or a quota reached, a provider or a template it needs, its recipient, its body — is not kept: a retry with the same key runs it again, and may succeed.

Request body

alert_loc_keystring · optionalThe app's localized placeholder banner key, shown until the extension rewrites it.
badgeinteger · optional
bodystring | object · optionalA text, or one per locale: each device gets the one in its language (its locale, that language, default_locale, the project's default, English), filled with variables (Handlebars, as a template) and cut to what a banner shows (65 characters for a title, 240 for a body).
categorystring · optionalThe message's kind: transactional (the default) reaches every user; any other — marketing, news — only users who did not turn it off on this channel (preferences). 1 to 64 of a-z, 0-9, _ . -.
collapse_keystring · optional
content_availableboolean · optional
couponstring · optionalOne of iap's coupons: {{coupon}} is each user's own code of it, given as the push goes (a shared coupon's code, or one of its one-time codes, recorded as theirs). A push to an installation of no one fails: a code is a user's.
dataobject · optionalKey-value data for the app (4 KiB at most).
deep_linkstring · optionalA URL with a scheme (https://, myapp://); not javascript:.
default_localestring · optional
imagestring · optionalAn https URL.
inboxboolean · optionalWhether the push leaves its copy in its person's inbox as it is delivered (once, whatever their devices take); the project's inbox.push_copy unless it says.
metadataobject · optionalThe project's own data about the message (a JSON object, 4 KiB at most), kept with its report; null is none.
mutable_contentboolean · optionalAn alert the app's notification service extension rewrites before it shows (an end-to-end encrypted message's wake).
priority"high" | "normal" · optional
push_type"voip" · optionalvoip: a PushKit call ring, to ios_voip devices only; none: every other device.
scheduleobject · optionalWhen a send goes: at a moment for everyone (at), or at an hour on each recipient's own clock (local_time: a date and time with no zone, 2026-10-15T10:00) — their device's time zone, the project's default_timezone for one whose devices say none. A local time already past on a recipient's clock goes to them at once. Within 30 days.
silentboolean · optionalA background push the user does not see.
soundstring · optional
templatestring · optionalA push template of the project's (notify/templates/push), by slug: its title, body, image and link, filled with variables, in place of a title and a body.
titlestring | object · optionalA text, or one per locale: each device gets the one in its language (its locale, that language, default_locale, the project's default, English), filled with variables (Handlebars, as a template) and cut to what a banner shows (65 characters for a title, 240 for a body).
toobject · requiredWho the push is for: users, installations (a device whoever is signed in on it, no one included), the followers of a topic, or the members of an analytics audience — one of them.
ttlinteger · optionalSeconds, up to 28 days.
variablesobject · optionalKey-value data for the app (4 KiB at most).
curl
curl -X POST "https://<your-ref>.palbase.studio/notify/push" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"to":{"audience":"00000000-0000-0000-0000-000000000000","installation_ids":["string"],"topic":"string","user_ids":["string"]}}'

Responses

202Queued

400Validation failed or a required field is missing

401Missing or invalid API key

403Not the project's secret key, or not what the shared sender sends for it (`own_provider_required`; `auth_template_reserved`: auth's templates, which auth's own flows alone send through it, but for an organization's invitation, auth.org_invitation); or a change to the platform's own project (`owner_only`) without its owner's access token (X-Palbase-Owner) or its operator's token (X-Palbase-Operator) beside the key. An owner's sign-in that is not a passkey one from the last 15 minutes is 401 `insufficient_user_authentication`.

404No such provider, template or message

409A request with this Idempotency-Key is still running

422A variable the template uses was not passed, or the Idempotency-Key was sent with a different request

429Over the project's request limit, or its shared sends for this window

503Temporarily unavailable; retrying is safe after Retry-After

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation SendPush of notify's contract.