Skip to content

User Management

Get User Profile

Endpoint: GET /users/profile

Description: Retrieve a user's profile information.

Response: 200 OK

{
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "full_name": "Lex Lee",
    "email": "lex.lee@example.com",
    "phone": "+1234567890",
    "date_of_birth": "1990-01-01T00:00:00",
    "state": "California",
    "country": "USA",
    "occupation": "Software Engineer",
    "preferred_language": "en",
    "timezone": "America/Los_Angeles",
    "avatar_url": "https://example.com/avatar.jpg",
    "bio": "A short bio about Lex Lee",
    "push_notifications_enabled": true,
    "email_notifications_enabled": true,
    "sms_notifications_enabled": false,
    "dark_mode": false,
    "ai_voice_enabled": true,
    "daily_reminder_time": "09:00:00",
    "chat_history_visible": true,
    "show_milestone_reminders": true,
    "community_visibility": "public"
}

Upload User Profile Picture

Endpoint: POST /users/profile/photo

Description: Upload or update a profile picture for a user.

Request Body: multipart/form-data with a file field.

Response: 200 OK

{
    "message": "Profile picture saved successfully",
    "data": {
        "avatar_url": "https://nora.s3.amazonaws.com/users/<USER_ID>/avatar.jpg"
    }
}

Get User Profile Setup

Endpoint: GET /users/profile/setup

Description: Get a user's profile setup details.

Response: 200 OK

{
    "user_id": "123e4567-e89b-12d3-a456-426614174000",
    "mom_status": "pregnant",
    "goals": ["stay healthy", "learn parenting"],
    "partner": {
        "name": "John Doe",
        "email": "john.doe@example.com"
    },
    "children": [
        {
            "full_name": "Baby Doe",
            "date_of_birth": "2025-01-01",
            "gender": "female"
        }
    ],
    "children_metadata": [
        {
            "id": "123e4567-e89b-12d3-a456-426614174001",
            "full_name": "Baby Doe",
            "age": 0
        }
    ]
}

Create User Profile Setup

Endpoint: POST /users/profile/setup

Description: Create a new profile setup for a user.

Request Body:

{
    "mom_status": "pregnant",
    "goals": ["stay healthy", "learn parenting"],
    "partner": {
        "name": "John Doe",
        "email": "john.doe@example.com"
    },
    "children": [
        {
            "full_name": "Baby Doe",
            "date_of_birth": "2025-01-01",
            "gender": "female"
        }
    ]
}

Response: 201 Created

{
    "user_id": "123e4567-e89b-12d3-a456-426614174000",
    "mom_status": "pregnant",
    "goals": ["stay healthy", "learn parenting"],
    "partner": {
        "name": "John Doe",
        "email": "john.doe@example.com"
    },
    "children": [
        {
            "full_name": "Baby Doe",
            "date_of_birth": "2025-01-01",
            "gender": "female"
        }
    ],
    "children_metadata": []
}

Update User Profile Setup

Endpoint: PATCH /users/profile/setup

Description: Partially update a user's profile setup.

Request Body:

{
    "mom_status": "new_mom",
    "goals": ["Sleep", "Mental Wellness"]
}

Response: 200 OK

{
    "user_id": "123e4567-e89b-12d3-a456-426614174000",
    "mom_status": "new_mom",
    "goals": ["Sleep", "Mental Wellness"],
    "partner": {
        "name": "John Doe",
        "email": "john.doe@example.com"
    },
    "children": [
        {
            "full_name": "Baby Doe",
            "date_of_birth": "2025-01-01",
            "gender": "female"
        }
    ],
    "children_metadata": [
        {
            "id": "123e4567-e89b-12d3-a456-426614174001",
            "full_name": "Baby Doe",
            "age": 0
        }
    ]
}

Get User Settings

Endpoint: GET /users/settings

Description: Get user settings including profile, notifications, and app preferences.

Response: 200 OK

{
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "full_name": "Lex Lee",
    "email": "lex.lee@example.com",
    "phone": "+1234567890",
    "date_of_birth": "1990-01-01T00:00:00",
    "state": "California",
    "country": "USA",
    "occupation": "Software Engineer",
    "preferred_language": "en",
    "timezone": "America/Los_Angeles",
    "avatar_url": "https://example.com/avatar.jpg",
    "bio": "A short bio about Lex Lee",
    "push_notifications_enabled": true,
    "email_notifications_enabled": true,
    "sms_notifications_enabled": false,
    "dark_mode": false,
    "ai_voice_enabled": true,
    "daily_reminder_time": "09:00:00",
    "chat_history_visible": true,
    "show_milestone_reminders": true,
    "community_visibility": "public"
}

Update User Settings

Endpoint: PUT /users/settings

Description: Update user settings (profile, notifications, and/or app settings).

Request Body:

{
    "profile": {
        "full_name": "Lex L. Lee",
        "phone": "+1234567891"
    },
    "notifications": {
        "push_notifications_enabled": false
    },
    "app_settings": {
        "dark_mode": true
    }
}

Response: 200 OK

{
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "full_name": "Lex L. Lee",
    "email": "lex.lee@example.com",
    "phone": "+1234567891",
    "date_of_birth": "1990-01-01T00:00:00",
    "state": "California",
    "country": "USA",
    "occupation": "Software Engineer",
    "preferred_language": "en",
    "timezone": "America/Los_Angeles",
    "avatar_url": "https://example.com/avatar.jpg",
    "bio": "A short bio about Lex Lee",
    "push_notifications_enabled": false,
    "email_notifications_enabled": true,
    "sms_notifications_enabled": false,
    "dark_mode": true,
    "ai_voice_enabled": true,
    "daily_reminder_time": "09:00:00",
    "chat_history_visible": true,
    "show_milestone_reminders": true,
    "community_visibility": "public"
}

Update User Profile

Endpoint: PUT /users/settings/profile

Description: Update user profile information.

Request Body:

{
    "full_name": "Lex L. Lee",
    "phone": "+1234567891"
}

Response: 200 OK

{
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "full_name": "Lex L. Lee",
    "email": "lex.lee@example.com",
    "phone": "+1234567891",
    "date_of_birth": "1990-01-01T00:00:00",
    "state": "California",
    "country": "USA",
    "occupation": "Software Engineer",
    "preferred_language": "en",
    "timezone": "America/Los_Angeles",
    "avatar_url": "https://example.com/avatar.jpg",
    "bio": "A short bio about Lex Lee",
    "push_notifications_enabled": true,
    "email_notifications_enabled": true,
    "sms_notifications_enabled": false,
    "dark_mode": false,
    "ai_voice_enabled": true,
    "daily_reminder_time": "09:00:00",
    "chat_history_visible": true,
    "show_milestone_reminders": true,
    "community_visibility": "public"
}

Update Notification Preferences

Endpoint: PUT /users/settings/notifications

Description: Update notification preferences.

Request Body:

{
    "push_notifications_enabled": false,
    "email_notifications_enabled": true,
    "sms_notifications_enabled": false
}

Response: 200 OK

{
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "full_name": "Lex Lee",
    "email": "lex.lee@example.com",
    "phone": "+1234567890",
    "date_of_birth": "1990-01-01T00:00:00",
    "state": "California",
    "country": "USA",
    "occupation": "Software Engineer",
    "preferred_language": "en",
    "timezone": "America/Los_Angeles",
    "avatar_url": "https://example.com/avatar.jpg",
    "bio": "A short bio about Lex Lee",
    "push_notifications_enabled": false,
    "email_notifications_enabled": true,
    "sms_notifications_enabled": false,
    "dark_mode": false,
    "ai_voice_enabled": true,
    "daily_reminder_time": "09:00:00",
    "chat_history_visible": true,
    "show_milestone_reminders": true,
    "community_visibility": "public"
}

Update App Settings

Endpoint: PUT /users/settings/app

Description: Update app settings.

Request Body:

{
    "dark_mode": true,
    "ai_voice_enabled": false,
    "daily_reminder_time": "10:00:00",
    "chat_history_visible": false,
    "show_milestone_reminders": false,
    "community_visibility": "private"
}

Response: 200 OK

{
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "full_name": "Lex Lee",
    "email": "lex.lee@example.com",
    "phone": "+1234567890",
    "date_of_birth": "1990-01-01T00:00:00",
    "state": "California",
    "country": "USA",
    "occupation": "Software Engineer",
    "preferred_language": "en",
    "timezone": "America/Los_Angeles",
    "avatar_url": "https://example.com/avatar.jpg",
    "bio": "A short bio about Lex Lee",
    "push_notifications_enabled": true,
    "email_notifications_enabled": true,
    "sms_notifications_enabled": false,
    "dark_mode": true,
    "ai_voice_enabled": false,
    "daily_reminder_time": "10:00:00",
    "chat_history_visible": false,
    "show_milestone_reminders": false,
    "community_visibility": "private"
}

Change User Password

Endpoint: PUT /users/password

Description: Change user password.

Request Body:

{
    "current_password": "old_password",
    "new_password": "new_secure_password",
    "confirm_password": "new_secure_password"
}

Response: 200 OK

{
    "message": "Password updated successfully",
    "data": {
        "password_changed": true
    }
}

Create Child Profile

Endpoint: POST /users/child-profiles

Description: Create a new child profile. The child profile will be linked to the user's profile setup.

Request Body:

{
    "profile_setup_id": "123e4567-e89b-12d3-a456-426614174000",
    "full_name": "Baby Doe",
    "date_of_birth": "2025-01-01",
    "due_date": null,
    "gender": "female",
    "profile_picture_url": null
}

Response: 201 Created

{
    "id": "123e4567-e89b-12d3-a456-426614174001",
    "profile_setup_id": "123e4567-e89b-12d3-a456-426614174000",
    "full_name": "Baby Doe",
    "date_of_birth": "2025-01-01",
    "due_date": null,
    "gender": "female",
    "birth_order": 1,
    "profile_picture_url": null,
    "age": 0,
    "created_at": "2025-11-18",
    "updated_at": "2025-11-18"
}

Get All Child Profiles

Endpoint: GET /users/child-profiles

Description: Get all child profiles for the current user. Returns an empty list if the user has no children.

Response: 200 OK

{
    "message": "Child profiles retrieved successfully",
    "data": {
        "children": [
            {
                "id": "123e4567-e89b-12d3-a456-426614174001",
                "profile_setup_id": "123e4567-e89b-12d3-a456-426614174000",
                "full_name": "Baby Doe",
                "date_of_birth": "2025-01-01",
                "due_date": null,
                "gender": "female",
                "birth_order": 1,
                "profile_picture_url": null,
                "age": 0,
                "created_at": "2025-11-18",
                "updated_at": "2025-11-18"
            }
        ],
        "total": 1
    }
}

Get Single Child Profile

Endpoint: GET /users/child-profiles/{child_id}

Description: Get a single child profile by ID. Only returns the child profile if it belongs to the current user.

Response: 200 OK

{
    "id": "123e4567-e89b-12d3-a456-426614174001",
    "profile_setup_id": "123e4567-e89b-12d3-a456-426614174000",
    "full_name": "Baby Doe",
    "date_of_birth": "2025-01-01",
    "due_date": null,
    "gender": "female",
    "birth_order": 1,
    "profile_picture_url": null,
    "age": 0,
    "created_at": "2025-11-18",
    "updated_at": "2025-11-18"
}

Update Child Profile

Endpoint: PATCH /users/child-profiles/{child_id}

Description: Update a child profile. Only fields provided in the request will be updated (partial update).

Request Body:

{
    "gender": "male"
}

Response: 200 OK

{
    "id": "123e4567-e89b-12d3-a456-426614174001",
    "profile_setup_id": "123e4567-e89b-12d3-a456-426614174000",
    "full_name": "Baby Doe",
    "date_of_birth": "2025-01-01",
    "due_date": null,
    "gender": "male",
    "birth_order": 1,
    "profile_picture_url": null,
    "age": 0,
    "created_at": "2025-11-18",
    "updated_at": "2025-11-18"
}

Delete Child Profile

Endpoint: DELETE /users/child-profiles/{child_id}

Description: Delete a child profile. This is a hard delete operation that also removes the profile picture from storage.

Response: 200 OK

{
    "message": "Child profile deleted successfully",
    "data": {
        "deleted": true,
        "child_id": "123e4567-e89b-12d3-a456-426614174001"
    }
}

Upload Child Profile Picture

Endpoint: POST /users/child-profiles/{child_id}/upload-picture

Description: Upload a profile picture for a child.

Request Body: multipart/form-data with a file field.

Response: 200 OK

{
    "message": "Profile picture uploaded successfully",
    "data": {
        "id": "123e4567-e89b-12d3-a456-426614174001",
        "profile_setup_id": "123e4567-e89b-12d3-a456-426614174000",
        "full_name": "Baby Doe",
        "date_of_birth": "2025-01-01",
        "due_date": null,
        "gender": "female",
        "birth_order": 1,
        "profile_picture_url": "https://nora.s3.amazonaws.com/children/child_id/avatar.jpg",
        "age": 0,
        "created_at": "2025-11-18",
        "updated_at": "2025-11-18"
    }
}

Join Early Access

Endpoint: POST /users/early-access

Description: Adds a new user to the early access list.

Request Body:

{
    "full_name": "Jane Doe",
    "email": "jane.doe@example.com",
    "referral_source": "Social Media"
}

Response: 201 Created

{
    "id": "123e4567-e89b-12d3-a456-426614174002",
    "full_name": "Jane Doe",
    "email": "jane.doe@example.com",
    "joined_at": "2025-11-18T21:30:45Z"
}