Register an FCM token for the authenticated user to receive push notifications.
This endpoint requires authentication via Sanctum token.
| Name | Type | Required | Description |
|---|---|---|---|
token | string | Yes | FCM registration token |
device_type | string | No | Device type (ios, android, web) |
device_id | string | No | Unique device identifier |
language | string | No | Device language code (e.g. en, fa). Push notifications will be sent in this language. |
{
"message": "FCM token registered successfully"
}
| Status | Description | Reference |
|---|---|---|
| 422 | Validation error | Validation error |
| 401 | Unauthorized | Authentication error |
language is provided, push notification content (title and body) will be sent in that language for the specific device