Skip to content
DunSocial Docs

Devices and account

Register a push notification device for iOS or Android, and manage account deletion, using the DunSocial API's user and devices endpoints.

Register a push device

POST /api/user/devices

curl -X POST https://api.dunsocial.com/api/user/devices \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
  "fcmToken": "DEVICE_FCM_TOKEN",
  "platform": "ios",
  "deviceName": "iPhone",
  "appVersion": "1.0.0"
}'

platform is "ios" or "android".

Unregister with DELETE /api/user/devices/:token (URL-encode the FCM token).

For listing devices and notification status, see Notifications.

Account deletion plan

Before deleting an account, check impact:

GET /api/user/account/deletion-plan

Returns owned shared workspaces, solo workspaces, memberships, whether you can delete now, and a blocked reason if not.

Delete account

DELETE /api/user/account

Permanently deletes your account. Blocked while you own any workspace that still has other members — transfer ownership or close those workspaces first.

Solo-owned workspaces are closed as part of the flow.