Get User API
Welcome to the documentation for the Get User API. This API returns a single user.
Base URL
{baseURL}/v1/users/:userId | GET
Authorization
Include the following Authorization header in your HTTP requests using a Bearer token:
Authorization: Bearer YOUR_ACCESS_TOKEN
Sample Request
curl -X GET {baseURL}/v1/users/64f3de8967bdffcc1da9c241 \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"first_name": "Oluwatunmise",
"last_name": "Adenuga",
"email": "[email protected]",
"phone_number": "07031832236",
"organization_id": "64da45f2605200f551d8e9ac",
"account_id": "64da4abd605200f551d8e9b6",
"role_id": "64e8b1de85671e19e26d717d",
"gender": "male"
}'
Sample 200 Response
{
"message": "User found",
"data": {
"_id": "64f3de8967bdffcc1da9c241",
"first_name": "Oluwatunmise",
"last_name": "Adenuga",
"email": "[email protected]",
"phone_number": "07031832235",
"role_id": "64e8b1de85671e19e26d717d",
"is_verified": true,
"account_id": "64da4abd605200f551d8e9b6",
"organization_id": "64da45f2605200f551d8e9ac",
"gender": "male",
"is_2FA_enabled": false,
"is_default_password": true,
"status": "active",
"security_questions": [],
"createdAt": "2023-09-03T01:16:57.271Z",
"updatedAt": "2023-09-03T01:33:47.219Z",
"__v": 5,
"user_id": "64f3de8967bdffcc1da9c241"
},
"success": true
}