Skip to Content
HomeLink Hub
Users & Profile

Set the language preference

PUT
/api/v1/user/language

Access: Bearer token required.

Stores the user's preferred language. There is no request validation schema on this route; the handler itself requires language to be one of the supported values (upper case) and rejects anything else, including a missing value. New accounts default to ENGLISH. The value is only stored on the profile; API messages are not translated.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Access token returned by sign-in. Send it as Authorization: Bearer <token>.

Request Body

application/json
  1. body
language*string

One of ENGLISH, FRENCH, SPANISH, PORTUGUESE, GERMAN, CHINESE, ITALIAN, DUTCH, SWEDISH, RUSSIAN.

Response Body

Language saved

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X PUT 'http://localhost:4000/api/v1/user/language' \  -H 'Content-Type: application/json' \  -d '{  "language": "FRENCH"}'
Example Response
{  "status": 200,  "success": true,  "message": "Language preference updated.",  "data": {    "language": "FRENCH"  }}