Skip to content

Update User's Account Details

POST api/account/details/update

This is used to update account details.

Example Request

Terminal window
curl -X 'POST' \
'http://localhost:8080/api/account/details/update' \
-H 'accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"user_first_name": "John",
"user_middle_name": null,
"user_last_name": "Doe",
"user_email": "johndoe@gmail.com",
"user_username": "johndoe",
"user_visible": true,
"profile_picture_updated": false
}'

Request Body

Content Type: application/json
Content: Update Account

{
"user_first_name": "string",
"user_middle_name": "string",
"user_last_name": "string",
"user_email": "string",
"user_username": "string",
"user_visible": true,
"profile_picture_updated": true
}

Responses

200 - OK

The request was successful

Content Type: application/json
Content: User

{
"id": 0,
"user_first_name": "string",
"user_middle_name": "string",
"user_last_name": "string",
"user_username": "string",
"user_email": "string",
"user_avatar_url": "string",
"subscription_plan": {
"subscription_plan_title": "string",
"subscription_plan_pricing": 0,
"subscription_plan_expiration": "2024-12-05T08:08:43.362Z"
},
"user_login_options": [
{
"user_id": 0,
"user_login_option_type": 0,
"user_login_option_unique_identifier": "string",
"user_login_option_name": "string"
}
],
"user_settings": {
"user_setting_mute_notification": true
},
"user_visible": true,
"user_status": 0,
"user_timezone": "string",
"created_at": "2024-12-05T08:08:43.362Z",
"updated_at": "2024-12-05T08:08:43.362Z"
}

400 - Bad Request

Validation Error

Content Type: application/json
Content:

{
"param_name": [
"string"
],
"param_name_2": [
"string"
]
}

401 - Unauthorized

The request requires valid bearer token, but none were provided, or the bearer token is invalid.

429 - Too Many Requests

The user has exceeded the rate limit of 120 requests per minute.

500 - Internal Server Error

There is an issue with the backend. Sentry will provide a more detailed report on the problem.