Skip to main content
Habit and goal endpoints expose a narrow public write surface. Standard habit templates can be created, listed, updated, applied to clients, and archived. Applied client habits can be archived, and habit entries can be created, updated, and archived. Direct mutation of applied client habit reminder settings, workout goals, nutrition plans, medical goals, and raw objective answer payloads remains internal.

Scopes

List standard habit templates

Required scope: habits:read Response fields: Not exposed: coach IDs, source habit IDs, deletion metadata, or reminder subdocument IDs.

Create standard habit template

Required scope: habits:write Request body: Unknown fields are rejected with PUBLIC_API_UNKNOWN_FIELDS. A company cannot have two active templates with the same source-language name and habitType. Text fields follow the localized text contract: up to 25 language codes, an explicit default on create/first legacy update, and complete replacement for supplied maps. Every nonempty map must contain the default language. The reminders array replaces all reminders when supplied; include each reminder’s complete message map. Applied client habits and reminder delivery use the source text; this does not add language selection to client apps. Habit templates store translations directly in their text fields, with a single defaultLanguage. The existing internal API adapts those fields to source strings for the current editor. An unchanged source string preserves its translations; changing that string clears translations for that field. Existing legacy strings remain readable without a bulk migration.
cURL

Update standard habit template

Required scope: habits:write This updates the standard template only. Client habits that were already created from the template are not changed. Request body: any field from create may be sent as a partial update. The body must contain at least one field. Unknown fields are rejected with PUBLIC_API_UNKNOWN_FIELDS.
cURL
Response fields: same data.template contract as create/list standard habit templates.

Apply standard habit templates

Required scope: habits:write This creates active client habits from standard habit templates. The response returns the created habitId values; use those IDs when logging habit entries. Request body:
cURL
Response fields:

Archive standard habit template

Required scope: habits:write Archive is a soft delete for the standard template. Already applied client habits are not deleted. Response fields:

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.
Response:

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 client habit

Required scope: habits:write Archive is a soft delete for the client habit itself. The habit is excluded from Public API habit reads and reminder notifications are cleaned up. Existing habit entries are not hard-deleted. 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 Measurement goals include only active, non-deleted settings with a valid type available to the authenticated company. Custom goals owned by another company are excluded, including when the client belongs to both companies. System measurement goals remain shared client settings. The same filtering applies to the goals returned after an update. Response fields: Not exposed: nutrition plans, food logs, meal-plan content, 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 plans, food logs, meal-plan content, workout-plan targets, medical fields, injuries, medications, allergies, and raw objective answer payloads.
Response excerpt: