---
title: "Update profile or settings"
method: POST
path: "/api/vega/profile"
tags: ["Profile"]
---

# Update profile or settings

`POST /api/vega/profile`

## Request

- Base URL: `https://getmyluna.app`
- URL: `https://getmyluna.app/api/vega/profile`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `luna_session`

Admin only. Any subset of fields; setting `region` also sets `units` unless given.

## Request body

- ProfileUpdateRequest: Any subset of fields; admin only.
  - `baby_name` string, nullable
  - `dob` string, nullable: YYYY-MM-DD, not in the future, within 0-5 years. Setting it clears `due_date`.
  - `due_date` string, nullable: YYYY-MM-DD, up to 14 days ago to 10 months ahead. Only while there is no date of birth.
  - `gender` 'girl' | 'boy' | 'female' | 'male' | 'other' | 'unknown' | 'prefer_not_to_say' | '', nullable
  - `family_name` string, nullable
  - `timezone` string, nullable: IANA zone, e.g. `America/New_York`.
  - `region` 'uk' | 'us', nullable: Sets `units` to match unless `units` is given.
  - `units` 'metric' | 'imperial', nullable

## Response `200`

Success

- ProfileUpdateResponse
  - `ok` boolean, required
  - `profile` object, required

## Other responses

- `400`: Bad Request
- `401`: Missing or invalid credentials
- `403`: Forbidden, or `insufficient_scope` when a bearer token lacks the `write` scope

---

[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)
