# User Devices

Manage user device registrations for Web Push notifications. Allows registering, listing, and removing push notification subscriptions. All endpoints except VAPID public key retrieval require authentication.

## Register or update a device for push notifications

 - [PUT /api/v1/devices](https://docs.wellesley.social/openapi/user-devices/paths/~1api~1v1~1devices/put.md): Registers a new device subscription or updates an existing one for push notifications. The request must include a valid Web Push subscription with endpoint, keys, and device metadata. Requires authentication. If a device with the same endpoint already exists, it is updated.

## Get all registered devices for the current user

 - [GET /api/v1/devices](https://docs.wellesley.social/openapi/user-devices/paths/~1api~1v1~1devices/get.md): Returns a list of all devices registered for push notifications by the authenticated user. Each device entry includes the subscription endpoint, device metadata, and registration timestamp. Requires authentication.

## Delete all registered devices for the current user

 - [DELETE /api/v1/devices/all](https://docs.wellesley.social/openapi/user-devices/paths/~1api~1v1~1devices~1all/delete.md): Removes all device registrations for the authenticated user, effectively disabling push notifications on all devices. Requires authentication. Useful when a user wants to reset their push notification setup.

## Get VAPID public key for browser push subscriptions

 - [GET /api/v1/devices/vapid-public-key](https://docs.wellesley.social/openapi/user-devices/paths/~1api~1v1~1devices~1vapid-public-key/get.md): Returns the server's VAPID (Voluntary Application Server Identification) public key needed by clients to create Web Push subscriptions. This endpoint is publicly accessible without authentication so clients can subscribe before or after login.

## Delete a registered device for the current user

 - [DELETE /api/v1/devices/{deviceId}](https://docs.wellesley.social/openapi/user-devices/paths/~1api~1v1~1devices~1%7Bdeviceid%7D/delete.md): Removes a specific device registration identified by its device ID, stopping push notifications to that device. Requires authentication. Only the authenticated user's own devices can be deleted.

