---
title: "Complete User Profile After Firebase Registration"
method: POST
path: "/complete-registration"
tags: ["Profile"]
---

# Complete User Profile After Firebase Registration

`POST /complete-registration`

## Request

- Base URL: `https://api.jubjubapp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jubjubapp.com/complete-registration`
- Auth: HTTP bearer

Completes user profile after Firebase registration and migrates temporary session data.

    **Flow**:
    1. User registers via Firebase Auth (createUserWithEmailAndPassword)
    2. Frontend calls this endpoint with Firebase token + additional data
    3. System creates enriched profile in Firestore
    4. Migrates temporary session data (if exists)
    5. Records tracking events

    **Required Headers**:
    - Authorization: Bearer {firebase_jwt_token}

    **Data Collected**:
    - How they found the platform (try_now, google_search, referral, etc.)
    - Professional information (company, role)
    - Marketing consents
    - Referral code (if applicable)

## Headers

- `authorization` string: Firebase JWT token (Bearer token)

## Request body

- ProfileCompletionRequest: Data to complete profile after Firebase registration.
  - `display_name` string, required: User's full name
  - `user_source` string, required: How user found the platform
  - `referral_code` string, nullable: Referral code
  - `discovery_details` string, nullable: Details about how they discovered us
  - `company_name` string, nullable: Company name
  - `role` string, nullable: Professional role
  - `use_case` string, nullable: Primary use case
  - `temp_session_id` string, nullable: Temporary session ID
  - `claim_token` string, nullable: Token to claim the session
  - `newsletter_consent` boolean: Consent for newsletter
  - `product_updates_consent` boolean: Consent for product updates
  - `user_type` string, nullable: User type: 'professor' or 'student'

## Response `200`

Profile completed and session migrated successfully

- ProfileCompletionResponse: Response after completing profile.
  - `success` boolean, required
  - `profile_id` string, required
  - `migration_result` object
  - `message` string, required

## Other responses

- `401`: Invalid Firebase token
- `403`: Invalid temporary session
- `409`: Profile already exists for this user
- `422`: Validation Error
- `500`: Internal server error

---

[API](https://skmtc.dev/jubjubapp/apis/jubjub-api.md) - [All operations](https://skmtc.dev/jubjubapp/apis/jubjub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jubjubapp/apis/jubjub-api/revisions/353157b296f2?raw)
