curl --request POST \
--url https://api.example.com/api/users/createprofile \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"address": "<string>",
"age": 123,
"dob": "<string>",
"phoneNumber": 123
}
'{
"success": true,
"message": "<string>",
"data": {
"data._id": "<string>",
"data.name": "<string>",
"data.address": "<string>",
"data.age": 123,
"data.dob": "<string>",
"data.phoneNumber": 123,
"data.authDetails": {},
"data.createdAt": "<string>",
"data.updatedAt": "<string>"
}
}curl --request POST \
--url https://api.example.com/api/users/createprofile \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"address": "<string>",
"age": 123,
"dob": "<string>",
"phoneNumber": 123
}
'{
"success": true,
"message": "<string>",
"data": {
"data._id": "<string>",
"data.name": "<string>",
"data.address": "<string>",
"data.age": 123,
"data.dob": "<string>",
"data.phoneNumber": 123,
"data.authDetails": {},
"data.createdAt": "<string>",
"data.updatedAt": "<string>"
}
}Create a new user profile or update an existing one. This endpoint automatically determines whether to create or update based on whether a profile already exists for the authenticated user.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/SidneyEmeka/church_management_system/llms.txt
Use this file to discover all available pages before exploring further.
curl -X POST https://api.yourchurch.com/api/users/createprofile \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"address": "123 Main Street, Springfield",
"age": 35,
"dob": "1989-05-15",
"phoneNumber": 5551234567
}'
{
"success": true,
"message": "Profile Created",
"data": {
"_id": "60d5ec49f1b2c72b8c8e4f3a",
"name": "John Doe",
"address": "123 Main Street, Springfield",
"age": 35,
"dob": "1989-05-15T00:00:00.000Z",
"phoneNumber": 5551234567,
"authDetails": {
"email": "[email protected]",
"isProfileComplete": true
},
"createdAt": "2024-03-15T10:30:00.000Z",
"updatedAt": "2024-03-15T10:30:00.000Z"
}
}
{
"success": true,
"message": "Profile Updated",
"data": {
"_id": "60d5ec49f1b2c72b8c8e4f3a",
"name": "John Doe",
"address": "456 Oak Avenue, Springfield",
"age": 35,
"dob": "1989-05-15T00:00:00.000Z",
"phoneNumber": 5551234567,
"authDetails": {
"email": "[email protected]",
"isProfileComplete": true
},
"createdAt": "2024-03-15T10:30:00.000Z",
"updatedAt": "2024-03-15T14:20:00.000Z"
}
}
{
"success": false,
"message": "Acceess Denied",
"data": "Access Token not Found"
}
{
"success": false,
"message": "Acceess Denied",
"data": "Authorization missing"
}
{
"success": false,
"message": "Acccess Denied",
"data": "jwt expired"
}
{
"success": false,
"message": "Profile Creation not successful",
"data": "User validation failed: age: Path `age` (12) is less than minimum allowed value (13)."
}
isProfileComplete flag is set to true in the authentication recorddob field must be in YYYY-MM-DD format and must be a past date