---
title: "Create a family account"
method: POST
path: "/api/vega/onboard"
tags: ["Account"]
---

# Create a family account

`POST /api/vega/onboard`

## Request

- Base URL: `https://getmyluna.app`
- URL: `https://getmyluna.app/api/vega/onboard`
- Auth: none required

Public sign-up: creates a new family (tenant) and its first admin caregiver, and sets a session cookie. Every later call is scoped to this family. Returns `409` if the email is already registered.

## Request body

- OnboardRequest
  - `email` string, required
  - `password` string, required: At least 10 characters (new accounts).
  - `username` string, nullable: Login alias; defaults to the part of the email before `@`. Never shown to the family.
  - `display_name` string, nullable: Your first name, shown to the family. Not an email address.
  - `baby_name` string, required
  - `dob` string, nullable: YYYY-MM-DD. Required unless `due_date` is given.
  - `due_date` string, nullable: Not born yet: YYYY-MM-DD, up to 14 days ago to 10 months ahead. The log stays empty until the date of birth is added.
  - `client_today` string, nullable: Optional: the browser's local date (YYYY-MM-DD). Used for the due-date window when within a day of the family's local date.
  - `family_name` string, nullable
  - `gender` string, nullable
  - `timezone` string, nullable: IANA zone; default `Europe/London`.
  - `region` 'uk' | 'us', nullable: Default `uk`.
  - `units` 'metric' | 'imperial', nullable
  - `acquisition` object, nullable: Optional first-touch attribution (utm_source etc.).
  - `health_consent` boolean, required: Must be `true`: explicit consent to store the baby's log (unticked box on the form). Recorded with its wording version.

## Response `200`

Success

- OnboardResponse
  - `ok` boolean, required
  - `redirect` string, required
  - `expecting` boolean, nullable: True when the family signed up with a due date.

## Other responses

- `400`: Bad Request
- `409`: Email already registered

---

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