Skip to content
Preview: the PushFleet API isn't live yet. Join the waitlist

Send

POST /v1/send

Send to one of your users, and PushFleet delivers to every device they’ve registered. Needs a secret key, or a restricted key with messages: write.

{"to":"user_8f3k","title":"Your order shipped","body":"Arriving Thursday"}

That’s 74 bytes. With a template it’s 66:

{"to":"user_8f3k","template":"order_shipped","vars":{"eta":"Thu"}}
await fleet.send({
  to: "user_8f3k",
  title: "Your order shipped",
  body: "Arriving Thursday",
});
Field Type Notes
to string Your user ID. Required unless device is set.
device string A dev_ ID, to target one device instead of a user.
title, body string One of title, body or template is required.
template, vars string, object A saved template and its variables. Fields sent alongside override the template.
data object Custom key/values delivered to your app.
badge, sound, thread number, string, string Map to the APNs and FCM equivalents.
priority "normal" | "high" Default normal.
ttl number Seconds to keep trying. Default 86400.
collapse string Newer messages with the same key replace older ones on the device.
apns, fcm object Raw platform fields merged last, for anything the shared fields don’t cover.

The whole notification has to fit in 4 KB once built for Apple or Google (Apple’s limit). Larger ones get 413 payload_too_large.

await fleet.send({
  to: "user_8f3k",
  template: "order_shipped",
  vars: { eta: "Thu" },
});

202 Accepted, as soon as the message is queued:

{"id":"msg_2Xk9fQ","status":"queued"}

Use the ID to look up delivery. Add an Idempotency-Key header to make retries safe.