Push & notification preferences (user)
HTTP routes and behavior for push & notification preferences (user).
POST /api/devices/push-token # register this device's push token (APNs or FCM; # the apns_token field name is the historical wire # contract and carries either platform's token)DELETE /api/devices/push-token/{deviceID}GET|PUT /api/notifications/preferences # account master + per-category opt in/out; read-only server_policyPOST /api/notifications/test # test push to own devicesThe preference response includes push_enabled (default true), request_auto_approved (default false), existing category flags, and read-only server_policy. PUT preserves the two new fields if omitted by an older client; omitted legacy categories retain their full-replacement behavior (false). Personal writes never change server policy. Self-tests and admin per-user tests return 409 with push_disabled_by_server or push_disabled_for_user when either master is off; explicit tests otherwise bypass category choices.