Skip to content

All resources

push

2 endpoints

post /push/devices

Register a device for push notifications

Requires authentication

Records where the caller's notifications should be delivered — an APNs token for iOS or an FCM token for Android. Registration is idempotent and is expected on every app launch: it refreshes the last-seen stamp and the recorded app version. The device is bound to the request's org, so a client that switches workspace must register again. Signing in on a handset that another user had registered moves the token to the new user, so the previous user stops receiving notifications there. Returns 503 when this deployment has no provider configured for the platform — a token that could never be delivered to is refused rather than stored.

Request body: dto.RegisterPushDeviceRequest

NameTypeRequiredDescription
appVersionstringnoAppVersion is the client build, recorded so a delivery regression can be attributed to a release. Optional.
platformstringnoPlatform is "apns" (iOS) or "fcm" (Android).
tokenstringnoToken is the device token the OS handed the app, verbatim.

Responses

  • 200 OK · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 503 Service Unavailable · apimodel.ErrorEnvelope

delete /push/devices

Stop delivering push to a device

Requires authentication

Retires one of the caller's own device tokens — the path a client takes when the user turns notifications off in the app. Idempotent: retiring a token that is already gone succeeds, because a client that deregisters twice, or after the provider already killed the token, has achieved what it asked for. Only the token's owner can retire it. Signing out retires every device the user has, so this is not required before logout.

Request body: dto.DeregisterPushDeviceRequest

NameTypeRequiredDescription
platformstringnoPlatform is "apns" or "fcm".
tokenstringnoToken is the device token to retire.

Responses

  • 204 Device retired
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope