Tracker

Log an event

Append a feed, sleep/wake, nappy, solid meal, note, supplement or measurement. Validates ranges (milk 0-500 ml, weight 0.5-30 kg, length 40-120 cm) and rejects future timestamps. Returns the saved event, the refreshed live status, and a soft warning if the time conflicts with a recorded sleep span.

post/api/vega/log

Request

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

Request body

type'milk' | 'sleep' | 'wake' | 'nappy' | 'poop' | 'solid' | 'note' | 'supplement' | 'weight' | 'length' required
tsstring nullable

ISO 8601 local time; defaults to now. Cannot be in the future.

mlinteger nullable

milk: millilitres, 0-500. Use 0 (or omit) for a breastfeed.

kindstring nullable

nappy: wet|dirty|both|dry. supplement: vitd|iron|multivitamin.

foodsstring[] nullable

solid: foods eaten.

meal_type'meal' | 'snack' nullable

solid only.

kgnumber nullable

weight: kilograms, 0.5-30.

cmnumber nullable

length: centimetres, 40-120.

uginteger nullable

supplement: micrograms.

notestring nullable

Free text, up to 300 characters.

authorstring nullable

Defaults to the calling user's username.

timezonestring nullable

IANA zone if ts is in a different zone from the family's.

Example request

{
  "type": "milk",
  "ts": "2026-09-20T14:30:00",
  "ml": 150,
  "kind": "wet",
  "foods": [
    "scrambled egg",
    "toast"
  ],
  "kg": 8.45,
  "cm": 72.5,
  "ug": 10
}

Response

Success

status'ok' required
liveobject required

The refreshed live-status block (same shape as GET /api/vega/live).

unknown_foodsstring[]

solid foods with no nutrient data.

Example response

{
  "event": {
    "id": "af73aec9",
    "ts": "2026-09-20T09:49:53"
  },
  "warning": {
    "type": "asleep_at_time"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.