Skip to main content
Habit and goal endpoints expose a narrow public write surface. Habit reminder mutation, habit definition changes, workout goals, nutrition goals, medical goals, and raw objective answer payloads remain internal.

Scopes

List client habits

Required scope: habits:read Response fields: Not exposed: reminder settings, notification copy, actor IDs, deleted flags, audit fields, or scheduling internals.

List habit entries

Required scope: habits:read Validation: Range limit: maximum 92 days. Response fields: Not exposed: source, actor IDs, reminder metadata, audit fields, or deleted entries.

Create habit entry

Required scope: habits:write Request body: Validation: Create is idempotent per clientId, habitId, and calculated localDate. When an entry already exists for that local day, it is replaced instead of creating a duplicate. Response fields:

Update habit entry

Required scope: habits:write Allowed fields: occurredAt, value, and note. At least one field is required. The same date, weekday, note length, and numeric value validations as Create habit entry apply. Response fields:

Archive habit entry

Required scope: habits:write Archive is a soft delete. The entry is excluded from Public API read endpoints after archiving. Response fields:

Get client goals

Required scope: goals:read Response fields: Not exposed: nutrition plans, macro targets, calorie targets, medical details, injuries, medications, allergies, raw ObjectiveQuestion documents, objective answer payloads, or internal notes.

Update client goals

Required scope: goals:write Only these public fields are accepted: Unknown fields are rejected with PUBLIC_API_UNKNOWN_GOAL_FIELDS. Empty patches return NOTHING_TO_UPDATE. Nested objects are flattened before validation, so callers may send either nested JSON or dotted field paths when supported by their client. Response fields: Goal writes deliberately exclude nutrition, macros, calories, workout-plan targets, medical fields, injuries, medications, allergies, and raw objective answer payloads.