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

Idempotency

Networks fail. To retry a request without sending a notification twice, send an Idempotency-Key header with a value unique to that operation, such as a UUID or your own event ID.

Terminal window
curl https://api.pushfleet.com/v1/send \
-H "Authorization: Bearer $PUSHFLEET_SECRET_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042-shipped" \
-d '{"to":"user_8f3k","template":"order_shipped","vars":{"eta":"Thu"}}'

For 24 hours, repeating the request with the same key returns the original response instead of doing the work again. Reusing a key with a different body returns 409 idempotency_conflict.

The server SDKs add an idempotency key to every request they retry, so their automatic retries never duplicate a push. 5xx responses are always safe to retry with the same key.