Skip to main content

Overview

The onboarding system guides new users through setup with a state machine tracking progress from extension installation through data collection and processing.

GET /api/onboarding/state

Retrieve current onboarding state for authenticated user.

Authentication

Requires Directus JWT token.

Response

string
Current onboarding state: EXTENSION_INSTALL, DATA_COLLECTION, PROCESSING, or COMPLETE
string
User ID from persona record

Example

cURL

PATCH /api/onboarding/state

Update onboarding state for authenticated user.

Request Body

string
required
New state: EXTENSION_INSTALL, DATA_COLLECTION, PROCESSING, or COMPLETE

Response

Returns updated persona record with new onboarding state.

Example

cURL

POST /api/onboarding/zip-upload

Upload data export zip file for processing.

Authentication

Requires Directus JWT token.

Request Body

Multipart form data with single file field:
file
required
ZIP file containing platform data export

Response

boolean
Whether upload was successful
string
BullMQ job ID for tracking processing
string
Server path where zip was stored

Example

cURL

Onboarding State Machine

State Descriptions

Content Gate Integration

The Genie AI chat enforces onboarding completion:
  • Users in EXTENSION_INSTALL or DATA_COLLECTION receive setup guidance
  • Full AI features unlock only in COMPLETE state
  • State checked on every chat request via server/endpoints/api/genieChat.js

Genie Chat

AI chat with onboarding gate enforcement

User Profile

Update user persona and profile data

Implementation

Source: server/endpoints/api/onboarding.js Onboarding state stored in user_personas.onboarding_state (Directus collection).