---
title: "Track Onboarding Event"
method: POST
path: "/api/v1/auth/preferences/onboarding/events"
tags: ["user-preferences"]
---

# Track Onboarding Event

`POST /api/v1/auth/preferences/onboarding/events`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/api/v1/auth/preferences/onboarding/events`
- Auth: none declared

Track an onboarding event for analytics.

TECH-776: Fire-and-forget event tracking. Events are used for funnel analysis,
time-to-value metrics, and company-level onboarding health monitoring.

The is_replay flag is automatically set based on whether the user has
previously completed the chapter being tracked.

## Headers

- `Authorization` string

## Request body

- TrackOnboardingEventRequest: Request to track an onboarding event. TECH-776: Fire-and-forget event tracking for onboarding analytics.
  - `event_type` string, required: Event type (CHAPTER_STARTED, STEP_ADVANCED, CHAPTER_COMPLETED, etc.)
  - `chapter` string, required: Chapter ID (connect, discover, freshness, schema)
  - `step` integer, nullable: 0-indexed step number within chapter
  - `step_id` string, nullable: Human-readable step identifier
  - `metadata` object, nullable: Additional event context as JSON
  - `session_id` string, nullable: UUID grouping events in a single session

## Response `200`

Successful Response

- StandardResponse: Standard API response wrapper.
  - `success` boolean, required
  - `data` unknown
  - `message` string, nullable
  - `error` string, nullable
  - `meta` object, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api.md) · [All operations](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/revisions/51c755fb5d0b?raw)
