curl --request PUT \
--url https://api.example.com/api/user/language \
--header 'Content-Type: application/json' \
--data '
{
"language": "<string>"
}
'Update the user’s language preference
curl --request PUT \
--url https://api.example.com/api/user/language \
--header 'Content-Type: application/json' \
--data '
{
"language": "<string>"
}
'pt-BR (Portuguese), en-US (English), or es (Spanish)204 No Content on success with an empty response body.
curl -X PUT https://api.example.com/api/user/language \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"language": "en-US"
}'
HTTP/1.1 204 No Content
{
"error": "Validation Failed",
"message": "language: must match pattern pt-BR|en-US|es"
}
{
"error": "Unauthorized",
"message": "Invalid or missing authentication token"
}
{
"error": "Not Found",
"message": "User not found"
}