HitThreePrivate beta

Rolling 7-day deficit · protein on plan

Let a bot log your food and weight

Your own bot (Grok Bot, Foodie, or any other) can add foods, weight, and body fat to your HitThree account with a personal API key — no magic link, and it can only touch your food, day totals, and weigh-ins.

1. Get a key in Settings

  1. Sign in and open Settings.
  2. Scroll to the Bot access section.
  3. Enter a name for the key (for example, “Foodie”) and tap Create key.
  4. Copy the key immediately. It starts with ht_ and is shown only once. If you lose it, revoke it and create a new one.

Treat the key like a password. Anyone who has it can add or read food on your account. Revoke it in Settings if it leaks.

2. Log a food (HTTP)

POST https://www.hitthree.com/api/v1/food

curl -s https://www.hitthree.com/api/v1/food \
  -H "Authorization: Bearer ht_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Greek yogurt",
    "calories": 150,
    "protein": 20,
    "fiber": 0,
    "date": "2026-11-16"
  }'

Required: name, calories, protein (or protein_g). Optional: fiber (or fiber_g), date (YYYY-MM-DD; defaults to today in your HitThree timezone), quantity (appended to the name, e.g. “Greek yogurt (1 cup)”), and notes (stored separately and shown on the ledger row — not mixed into the name).

Example success (201):

{
  "ok": true,
  "date": "2026-11-16",
  "entry": {
    "id": "…",
    "name": "Greek yogurt",
    "calories": 150,
    "protein_g": 20,
    "fiber_g": 0,
    "notes": "plain, no fruit",
    "added_by": "Foodie"
  },
  "totals": { "calories": 150, "protein_g": 20, "fiber_g": 0 }
}

The new line shows up in that day's Input Calories list, marked “added by Foodie”, with any notes shown under the name. It is included in the day's totals. You can edit or delete it in the app like any other food.

To delete an entry this key created:

curl -s -X DELETE \
  "https://www.hitthree.com/api/v1/food?id=ENTRY_UUID" \
  -H "Authorization: Bearer ht_YOUR_KEY"

3. Read a day

GET https://www.hitthree.com/api/v1/day?date=2026-11-16

Omit date for today. Returns calories in, protein, fiber (when fiber mode is on), burn (actual or estimated), deficit, targets, whether each green and Hit Three is met, food_logged, and the day's food entries (including notes). The numbers use the same rules as the Today page. If nothing is logged that day, calories_in, protein_g, fiber_g, and deficit_kcal are null, and food_logged is false.

curl -s "https://www.hitthree.com/api/v1/day?date=2026-11-16" \
  -H "Authorization: Bearer ht_YOUR_KEY"

4. Log weight and body fat

These use the same daily weigh-in store as Today, the /weight history page, badges and streaks, and the weekly summary.

POST https://www.hitthree.com/api/v1/weight

curl -s https://www.hitthree.com/api/v1/weight \
  -H "Authorization: Bearer ht_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "weight_lbs": 205.4,
    "body_fat_pct": 23.5,
    "date": "2026-11-15"
  }'

Send weight_lbs, body_fat_pct, or both (at least one is required). date is optional (YYYY-MM-DD; defaults to today in your HitThree timezone). Posting again for the same date updates that day. If you omit a field, the existing value for that day is left as it is — sending only weight will not clear body fat, and sending only body fat will not clear weight.

Example success (200):

{
  "ok": true,
  "date": "2026-11-15",
  "weight_lbs": 205.4,
  "body_fat_pct": 23.5
}

Read one day, or a range (inclusive, up to 366 days). A day with no log returns nulls. A range returns only days that have a weigh-in.

curl -s "https://www.hitthree.com/api/v1/weight?date=2026-11-15" \
  -H "Authorization: Bearer ht_YOUR_KEY"

curl -s "https://www.hitthree.com/api/v1/weight?from=2026-10-01&to=2026-11-15" \
  -H "Authorization: Bearer ht_YOUR_KEY"

Single-day example:

{
  "date": "2026-11-15",
  "weight_lbs": 205.4,
  "body_fat_pct": 23.5
}

Range example:

{
  "from": "2026-10-01",
  "to": "2026-11-15",
  "logs": [
    { "date": "2026-11-15", "weight_lbs": 205.4, "body_fat_pct": 23.5 }
  ]
}

To clear that day's weight and body fat (food and other day data are not deleted):

curl -s -X DELETE \
  "https://www.hitthree.com/api/v1/weight?date=2026-11-15" \
  -H "Authorization: Bearer ht_YOUR_KEY"

5. MCP connector

Remote MCP URL (Streamable HTTP):

https://www.hitthree.com/api/mcp

Authenticate with the same Authorization: Bearer ht_… key. Tools: log_food, get_day_summary, list_foods_for_day, delete_food, log_weight, get_weight, delete_weight.

OAuth “install without pasting a key” is not included yet — generate a key in Settings and give it to your bot.

Limits and errors

  • Calories 0–10,000 · protein 0–1,000 g · fiber 0–200 g · weight greater than 0 and less than 1,000 lb · body fat 0–75%.
  • Dates cannot be in the future, or more than about a year in the past.
  • Up to 10 active keys, and 200 foods per day.
  • About 60 requests per key per minute.
  • Errors are JSON, for example { "error": "unauthorized", "message": "…" } (401), validation_error (400), or rate_limited (429).