Preview: the PushFleet API isn't live yet. Join the waitlist
Batch send
POST /v1/send/batch
Fields at the top level apply to every message, so a campaign names its template once and each message carries only what’s different. Takes up to 1,000 messages. Needs messages: write.
{"template":"order_shipped","messages":[{"to":"u1","vars":{"eta":"Thu"}},{"to":"u2","vars":{"eta":"Fri"}}]}await fleet.sendBatch({
template: "order_shipped",
messages: [{ to: "u1", vars: { eta: "Thu" } }, { to: "u2", vars: { eta: "Fri" } }],
});fleet.send_batch(
template="order_shipped",
messages=[{"to": "u1", "vars": {"eta": "Thu"}}, {"to": "u2", "vars": {"eta": "Fri"}}],
)fleet.SendBatch(ctx, pushfleet.SendBatchParams{
Template: "order_shipped",
Messages: []any{map[string]any{"to": "u1", "vars": map[string]any{"eta": "Thu"}}, map[string]any{"to": "u2", "vars": map[string]any{"eta": "Fri"}}},
})fleet
.send_batch()
.template("order_shipped")
.messages(json!([{ "to": "u1", "vars": { "eta": "Thu" } }, { "to": "u2", "vars": { "eta": "Fri" } }]))
.await?;fleet.push_batch(
template: "order_shipped",
messages: [{ to: "u1", vars: { eta: "Thu" } }, { to: "u2", vars: { eta: "Fri" } }]
)curl https://api.pushfleet.com/v1/send/batch \
-H "Authorization: Bearer $PUSHFLEET_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"template":"order_shipped","messages":[{"to":"u1","vars":{"eta":"Thu"}},{"to":"u2","vars":{"eta":"Fri"}}]}'Response
Section titled “Response”202 Accepted with the accepted count and only the failures, by their position in messages:
{"batch":"bat_7Hq2","accepted":999,"rejected":[{"index":4,"error":"unknown_user"}]}A batch counts as one request against your rate limit.