Gut API

Symptoms, tummy scores, exposures and suspected triggers. 11 ops: log_symptoms, list_symptom_logs, delete_symptom_log, get_tummy_scores, get_pending_checkins, set_checkin_preferences, get_exposures, get_triggers, food_tummy_score, check_ingredients, get_low_fodmap_swaps.

Symptoms, tummy scores, exposures and suspected triggers.

Log symptoms · POST /api/v1/log_symptoms · scope gut:write

Record how the person's gut feels: severity 0–10 for bloating, abdominal_pain, gas, nausea, reflux and urgency (only the ones they mention), an overall severity, Bristol stool type 1–7, bowel movements today, energy 0–10, and the time. "Fine" is a valid and valuable log: send fine: true. Best 2–4 hours after a meal and in the evening (get_pending_checkins says which check-in is due; pass its key as prompt). Returns the log id and today's tummy score (0–100, higher is better). Free.

curl -X POST https://getgutlog.com/api/v1/log_symptoms \  -H "Authorization: Bearer gutlog_…"

List symptom logs · POST /api/v1/list_symptom_logs · scope gut:read or GET …?input=

Symptom logs in a date range (default the last 14 days), newest first: severities per symptom, overall, Bristol type, stool count, energy, fine, and each log's burden (0–10).

curl -X POST https://getgutlog.com/api/v1/list_symptom_logs \  -H "Authorization: Bearer gutlog_…"

Delete a symptom log · POST /api/v1/delete_symptom_log · scope gut:write

Delete one symptom log the person logged by mistake, and recompute that day's tummy score.

curl -X POST https://getgutlog.com/api/v1/delete_symptom_log \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"symptom_log_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Get tummy scores · POST /api/v1/get_tummy_scores · scope gut:read or GET …?input=

Daily tummy scores 0–100 (100 = no gut symptoms) for a date range, default the last 30 days: per day the score, number of logs, fine logs, worst symptom and Bristol types, plus the average and the trend (second half minus first half). Our own score from the person's logs, not a clinical instrument. Free.

curl -X POST https://getgutlog.com/api/v1/get_tummy_scores \  -H "Authorization: Bearer gutlog_…"

Get pending check-ins · POST /api/v1/get_pending_checkins · scope gut:read or GET …?input=

Check-ins due now: one 2–4 hours after each logged meal, an evening check-in, today's reintroduction challenge dose and the weekly adequate-relief question when a program is running. Each has a key and the question to ask. Call it at the start of a chat and ask the person; then log_symptoms with prompt set to the key (or record_challenge / record_relief_check). Empty when nothing is due.

curl -X POST https://getgutlog.com/api/v1/get_pending_checkins \  -H "Authorization: Bearer gutlog_…"

Set check-in preferences · POST /api/v1/set_checkin_preferences · scope gut:write

Turn check-in emails on or off (off, evening only, or also 2–4 h after each meal and program reminders) and set the local hour of the evening check-in (17–23). Emails go to the organization owner's address and carry no food or symptom details. Emails are Plus; turning them off and the hour work on every plan.

curl -X POST https://getgutlog.com/api/v1/set_checkin_preferences \  -H "Authorization: Bearer gutlog_…"

Get exposures · POST /api/v1/get_exposures · scope gut:read or GET …?input=

What the person was exposed to, per meal and per day, for a date range (default the last 7 days, at most 92): FODMAP subgroups (fructans, GOS, lactose, excess fructose, sorbitol, mannitol), gluten, dairy protein, caffeine, alcohol, fat load, capsaicin, carbonation, sugar alcohols, emulsifiers, insoluble fiber and high-histamine foods, each with the level a typical serving carries and the ingredients that brought it, plus a summary per exposure. From the meals' confirmed and likely ingredients. Free.

curl -X POST https://getgutlog.com/api/v1/get_exposures \  -H "Authorization: Bearer gutlog_…"

Get suspected triggers · POST /api/v1/get_triggers · scope gut:read or GET …?input=

Which foods look safe for this person and which don't, from their own log: for each exposure, the estimated extra symptom severity (0–10 points) in that exposure's time window after eating, the probability it is a real effect, and how many meals it rests on; or "not_enough_data" (fewer than 5 exposure meals followed by a check-in), "inconclusive", "unlikely", or "confirmed"/"ruled_out" from a reintroduction challenge. Each has an explanation to relay. These are hypotheses to test with an elimination program, never a diagnosis. Plus plan.

curl -X POST https://getgutlog.com/api/v1/get_triggers \  -H "Authorization: Bearer gutlog_…"

Food tummy score · POST /api/v1/food_tummy_score · scope gut:read or GET …?input=

Predicted gut-friendliness 0–100 of a food, a barcode product or a list of taxonomy ingredients for this person (100 = nothing we expect to bother them), with the exposures behind it and their citations. With enough logs it uses the person's own trigger estimates; until then population averages (basis says which). A prediction, not a rule. Plus plan.

curl -X POST https://getgutlog.com/api/v1/food_tummy_score \  -H "Authorization: Bearer gutlog_…"

Check ingredients for triggers · POST /api/v1/check_ingredients · scope gut:read or GET …?input=

Which of these ingredients (taxonomy ids or names) are the person's known or suspected triggers or allergens, with the exposures involved and low-FODMAP swaps. Use it before suggesting a meal, or on a product's ingredient list. Known triggers and allergens come from the person's settings; suspected ones from get_triggers.

curl -X POST https://getgutlog.com/api/v1/check_ingredients \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"ingredients":["ingredient"]}'

Get low-FODMAP swaps · POST /api/v1/get_low_fodmap_swaps · scope gut:read or GET …?input=

Lower-FODMAP alternatives for an ingredient or a food (its ingredients), with the FODMAP subgroups each one avoids and the published sources. Useful during the elimination phase. Not a substitute for a registered dietitian's plan.

curl -X POST https://getgutlog.com/api/v1/get_low_fodmap_swaps \  -H "Authorization: Bearer gutlog_…"