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

Devices

Apps usually register through a client SDK. These endpoints are for registering from your server, or from anything without an SDK.

POST /v1/devices

Field Type Notes
token string The push token from Apple or Firebase. Required.
user string Your user ID. Required.
platform "ios" | "android" Optional; detected from the token’s shape.
apns_environment "sandbox" | "production" Apple devices only: which Apple push server the token belongs to. Debug builds get sandbox tokens; TestFlight and App Store builds get production ones. The client SDKs set it from the build. Default "production".
userToken string Required in live mode with a publishable key. See identity verification.

With a secret key, or devices: write, no userToken is needed: your server is trusted. A live publishable-key registration without one gets 403 user_token_required.

await fleet.devices.create({
  token: "a4f9c2…7be21c",
  user: "user_8f3k",
});

Answers 201 with {"id":"dev_…"}. Registering a token again updates it instead of duplicating it.

DELETE /v1/devices/{id}

await fleet.devices.delete("dev_9fK2");

Answers 204. Devices with dead tokens are removed automatically, with a device.removed webhook.