Onboarding API
Manages the user onboarding flow: profile setup, workspace invitation handling, first workspace creation, and onboarding completion. Determines which onboarding steps are needed based on profile completeness, workspace membership, and pending invitations. Rate-limited to 30 requests per minute.
Base path: /api/v2/onboarding
/api/v2/onboarding/statusAuthenticatedGet the user's onboarding status. Checks profile completion, workspace membership, and pending invitations to determine remaining steps.
Request
curl -X GET "https://api.lvng.ai/api/v2/onboarding/status" \
-H "Authorization: Bearer YOUR_API_KEY"Response 200
{
"success": true,
"status": {
"needsOnboarding": true,
"onboardingCompleted": false,
"currentStep": "profile",
"steps": {
"welcome": { "completed": true, "required": true },
"profile": { "completed": false, "required": true },
"invitations": { "completed": false, "required": true },
"workspace": { "completed": false, "required": true }
},
"profile": {
"hasDisplayName": false,
"hasAvatar": false,
"displayName": null,
"avatarUrl": null
},
"workspaces": {
"count": 0,
"isInWorkspace": false
},
"invitations": {
"pendingCount": 2,
"hasPendingInvitations": true
}
}
}/api/v2/onboarding/profileAuthenticatedComplete the profile setup step. Updates the user's display name, avatar, and bio in Supabase Auth metadata.
Body Parameters
display_namestringrequiredDisplay name (minimum 2 characters).
avatar_urlstringURL to an avatar image.
biostringShort bio or description.
Request
curl -X POST "https://api.lvng.ai/api/v2/onboarding/profile" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Response 200
{
"success": true,
"profile": {
"displayName": "Sam C",
"avatarUrl": "https://example.com/avatar.jpg",
"bio": "Building the future of AI collaboration"
}
}/api/v2/onboarding/pending-invitationsAuthenticatedGet all pending workspace invitations for the authenticated user's email. Includes workspace details and inviter information.
Request
curl -X GET "https://api.lvng.ai/api/v2/onboarding/pending-invitations" \
-H "Authorization: Bearer YOUR_API_KEY"Response 200
{
"success": true,
"invitations": [
{
"id": "inv_abc123",
"workspaceId": "ws_abc123",
"workspace": {
"id": "ws_abc123",
"name": "Acme Corp",
"slug": "acme-corp",
"description": "The Acme team workspace",
"avatarUrl": null
},
"role": "member",
"invitedBy": {
"id": "user_xyz",
"displayName": "Sam C",
"avatarUrl": "https://example.com/avatar.jpg"
},
"createdAt": "2026-03-28T10:00:00.000Z",
"expiresAt": "2026-04-04T10:00:00.000Z"
}
],
"count": 1
}/api/v2/onboarding/accept-invitationsAuthenticatedAccept multiple workspace invitations at once. Adds the user to each workspace and marks invitations as accepted.
Body Parameters
invitation_idsstring[]requiredArray of invitation UUIDs to accept.
Request
curl -X POST "https://api.lvng.ai/api/v2/onboarding/accept-invitations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Response 200
{
"success": true,
"accepted": [
{
"id": "ws_abc123",
"name": "Acme Corp",
"slug": "acme-corp",
"role": "member"
}
],
"acceptedCount": 1,
"errors": [
{ "invitationId": "inv_def456", "error": "Invitation has expired" }
]
}/api/v2/onboarding/create-workspaceAuthenticatedCreate a first workspace during onboarding. Creates the workspace, adds the user as owner, and sets up a default general channel.
Body Parameters
namestringrequiredWorkspace name (minimum 2 characters).
Request
curl -X POST "https://api.lvng.ai/api/v2/onboarding/create-workspace" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Response 201
{
"success": true,
"workspace": {
"id": "ws_new123",
"name": "My Team",
"slug": "my-team-a1b2",
"isOwner": true,
"role": "owner"
}
}/api/v2/onboarding/completeAuthenticatedMark onboarding as complete. Sets the onboarding_completed flag in user metadata and returns a redirect destination.
Request
curl -X POST "https://api.lvng.ai/api/v2/onboarding/complete" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Response 200
{
"success": true,
"completed": true,
"redirectTo": "/chat?workspace=acme-corp"
}