user
Update user data privacy settings
Changed onUpdates the data privacy settings for a specific user.
put/users/{userId}/data-privacy-settings
Request
- Base URLhttps://staging.api-golang.boilerplate.hng.tech/api/v1
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
userIdstring required
ID of the user to update the data privacy info for.
Request body
Example request
{
"enable_2fa": true,
"allow_analytics": true,
"personalized_ads": true
}Response
User data privacy updated successfully
Example response
{
"status": "success",
"status_code": 200,
"message": "User data privacy settings retrieved successfully",
"data": {
"id": "01913139-0969-7ed5-a830-2f20f6b2c4e7",
"user_id": "0191289e-fba3-7674-85bb-0c4a63ed8ebf",
"created_at": "2024-08-08T10:01:47.242+01:00",
"updated_at": "2024-08-08T10:01:47.242+01:00"
}
}Changes
- info
endpoint added
- info
- breaking
api path removed without deprecation
- breaking