PUT /api/v1/users/{userId} — Update User
Updates an existing user's information.
Authentication
SadqAuthorize
Request Headers
- Authorization (required)
- Bearer {token}
- Content-Type (required)
- application/json
Path Parameters
- userId (string, required)
- The unique identifier of the user to update.
Request Body
Content-Type: application/json
- firstNameAr (string, optional)
- First name in Arabic.
- firstNameEn (string, optional)
- First name in English.
- middleNameAr (string, optional)
- Middle name in Arabic.
- middleNameEn (string, optional)
- Middle name in English.
- thirdNameAr (string, optional)
- Third name (father's name) in Arabic.
- thirdNameEn (string, optional)
- Third name (father's name) in English.
- lastNameAr (string, optional)
- Last name (family name) in Arabic.
- lastNameEn (string, optional)
- Last name (family name) in English.
- phone (string, optional)
- Phone number of the user.
- nationalId (string, optional)
- National ID or identification number.
- gender (string, optional)
- Gender (e.g., 0 = Male, 1 = Female).
- postalCode (string, optional)
- Postal code.
- zipcode (string, optional)
- Zip code.
{
"firstNameAr": "أحمد",
"firstNameEn": "Ahmed",
"middleNameAr": "محمد",
"middleNameEn": "Mohammed",
"thirdNameAr": "علي",
"thirdNameEn": "Ali",
"lastNameAr": "السعود",
"lastNameEn": "Al-Saud",
"phone": "+966501234567",
"nationalId": "1234567890",
"gender": 0,
"postalCode": "12345"
}Responses
HTTP 200 — User updated
{
"data": {
"id": "7dc9d9b9-ce7e-419c-8e52-a661f333fd88",
"nationalId": "12345678901234",
"accountId": "c0f63b10-f2e5-44e7-93b3-c78189ce392b",
"firstNameAr": "أحمد",
"firstNameEn": "Ahmed",
"middleNameAr": "محمد",
"middleNameEn": "Mohamed",
"thirdNameAr": "عبدالله",
"thirdNameEn": "Abdullah",
"lastNameAr": "الزايد",
"lastNameEn": "Al Zayed",
"gender": 1,
"email": "f7s88@airsworld.net",
"phone": "+1234567890",
"region": "",
"street": null,
"postalCode": "12345",
"zipcode": "12345",
"nationlity": null,
"isDeleted": false,
"transactionsCount": null,
"position": null,
"isActive": true,
"quota": 0,
"allowToUseAccountQuota": false
},
"errorCode": 0,
"message": null,
"returnUrl": "/dashboard",
"stateValidationErrors": null,
"signature": ""
}