Register device token

Register a device token for push notifications. **Features:** - Register device tokens for iOS, Android, and Web platforms - Token validation with Firebase - Device information tracking - User association with authenticated user - Automatic token management and cleanup **Platform Support:** - **iOS**: APNs device tokens - **Android**: FCM registration tokens - **Web**: Web Push subscription tokens **Authentication:** - Requires valid Bearer token - Token is associated with authenticated user - Test tokens available for development: `test-jwt-token`, `agent-jwt-token` **Token Management:** - Tokens are validated with Firebase before storage - Duplicate tokens are handled gracefully - Tokens expire after 30 days of inactivity - Device information is stored for analytics **Use Cases:** - Initial app installation - Token refresh after app updates - Multi-device support per user - Platform-specific notification targeting **Example Request:** ```json { "token": "fcm_token_here", "platform": "android", "appVersion": "1.0.0", "deviceId": "device_123", "deviceInfo": { "model": "Pixel 7", "osVersion": "Android 13", "appBuild": "100", "timezone": "America/New_York" } } ```

Authentication

AuthorizationBearer

JWT token for authentication. Use ‘test-jwt-token’ for development.

Request

This endpoint expects an object.
tokenstringRequired>=1 character
platform"ios" or "android" or "web"Required
appVersionstringOptional
deviceIdstringOptional
deviceInfoobjectOptional

Response

This endpoint returns an object.
successboolean
dataobject or null
errorobject or null