Update User Profile
This API endpoint allows updating a user's profile information by sending a PUT request with the user ID and the updated details in the request body. The request body can include fields such as name, description, notification settings, and password etc. Upon successful update, the server returns the updated user object.
Query Parameters
Client API token
Header Parameters
user access token
client access token
token expiry timestamp
token type
user uid
Request Body
Full name of user, this is deprecated, please use first_name
and last_name
instead.
User's first name.
User's last name.
user bio
ISO code of the language that the user prefers to read posts in
avatar file
- 200
- 422
- 500
Example response
Response Headers
access-token string
user access token
client string
client token
expiry string
timestamp of token expiry date
uid string
user uid
Schema
- Array [
- ]
data object required
QuranReflect User model.
The Id of the user
The email of the user
Full name of user. It is deprecated, please use first_name
and last_name
instead.
The username
true if user is a verified member
user bio
ISO code of the language that the user prefers to read posts in.
User uniqe identifier
User account provider.
User's OneSignal subscription Id.
Whether user is allowed to post as another user.
The registration Id of the user's Android device.
Possible values: [OLD USER
, web
, QR_IOS
, QR_ANDROID
, QuranMemorizer
, QF_AUTH
]
The signup type
Whether the user disabled receving emails or not.
The user's first name.
The user's last name.
Whether the user is an admin.
The user's avatar url.
rooms_list object[]
List of rooms the user is a member of.
The Id of the room
Possible values: [0
, 1
]
The type of the user. 0
= student of knowledge.1
= scholar.
Default value: succes
Possible values: [Your profile has been updated successfully.
, Your account has been created successfully, Please check your email to verify it.
]
success response message
{
"data": {
"id": 0,
"email": "string",
"username": "string",
"verified": true,
"follow_notification": true,
"comments_notification": true,
"description": "string",
"default_lang": "string",
"uid": "string",
"provider": "string",
"onesignal_player_id": "string",
"post_as": true,
"android_registration_id": "string",
"sign_up_type": "OLD USER",
"emails_disabled": true,
"first_name": "string",
"last_name": "string",
"is_admin?": true,
"user_avatar_url": "string",
"rooms_list": [
{
"id": "string"
}
],
"user_type": "0"
},
"status": "succes",
"message": "Your profile has been updated successfully."
}
Unprocessable entity, api will respond with this status if any required params is missing or has invalid value.
Schema
Default value: false
list of errors
Default value: error
422, unprocessable entity
{
"success": false,
"errors": [
"string"
],
"status": "error"
}
{
"success": false,
"errors": [
"string"
],
"status": "error"
}
Internal server error, api will respond with 500 if something went wrong processing the request.
Schema
Default value: false
Default value: internal server error
error message
{
"success": false,
"message": "internal server error"
}