Connect an AI assistant or script
Ask your assistant about your logs, or let a shortcut save a weigh-in. You choose whose records each connection can reach and what it can do.
Connect an AI assistant
- In Claude, ChatGPT or another compatible assistant, add a custom connector with this MCP server address.
https://api.peakfade.com/mcp - Start the connection using OAuth. Sign in at app.peakfade.com when prompted. On the Peakfade permission screen, check the service name and choose whose data it can reach.
- Choose the permissions you want. Read lets you ask about your records. Write lets the assistant log entries or change plans. Delete lets it remove individual items. Choose Allow connection, then return to the assistant.
Try asking “What weigh-ins did I log last week?” The assistant sends the request. Peakfade never calls the AI on its own. Medication levels are estimates from your logged doses. They are not measured blood levels or medical advice.
What gets shared
Read lets the provider receive health records for the people you selected, including medication, side effects and check-ins. It may process or store its copies outside the EU under its own terms.
Garmin. Sharing is off until you explicitly allow it for that key or connection. It needs Read and includes any cycle or pregnancy data you have shared from Garmin. Replies label values from your Garmin device “Garmin” and ask the assistant to keep that label. You can turn off Share Garmin data in Settings at any time.
Coaching. Under Coaching in Settings, you decide whether to turn on Allow API/AI access for each coach. They can then select your shared records for their connection. Their existing coaching rights still apply. Their keys and assistants never receive your Garmin data.
Review or disconnect
In Peakfade Settings, open Connections, then Keys and AI connections. Find the service to review its permissions and usage. You can turn permissions off here. To grant a permission outside your original approval, reconnect from the assistant.
Choose Remove, then Remove connection to stop future access. Copies the provider already holds stay with it.
Assistant tools
These are the names you may see when an assistant asks to use Peakfade. Each tool works within the permissions you gave that connection.
list_people- Reads only · List the people selected for this connection and what it may do for each.
get_daily_insight- Reads only · Read a daily snapshot of your records, estimated medication levels and wellness signals.
get_period_insight- Reads only · Read those records, estimates and signals over a date range.
get_changes- Reads only · Check what changed since the last check for one person or everyone selected.
get_waiting_doses- Reads only · List planned doses still waiting for your answer.
export_records- Reads only · Export compact records for all history or a date range, or request a CSV.
answer_waiting_dose- Changes data · Record your Taken or Not taken answer for a planned dose.
import_daily_metrics- Changes data · Import up to 90 days of recorded measurements together.
save_record- Changes data · Deletes data · Add or edit entries, plans or preferences. Clearing the last value in a check-in removes it and requires Delete.
delete_item- Changes data · Deletes data · Delete or archive one item with Delete permission.
The API for scripts and shortcuts
Create a key
In Settings under Connections, open Keys and AI connections and choose New key. Name it, choose whose data it can reach and set an expiry date if you want one. Read includes exports, Write adds or edits records, and Delete removes individual items. You can choose each independently.
Choose Create key and copy it into your script or shortcut’s secure settings. Peakfade shows the key once. A compatible MCP client that accepts a Bearer token can also use it at the MCP address above.
Use the base address https://api.peakfade.com/v1. Send Authorization: Bearer YOUR_KEY in the request header. The examples use a key stored in PEAKFADE_KEY and made-up records.
Read a day or a period
Use self for your own records. GET /v1/contexts lists the people selected for the key and its rights for each. To read a selected coaching client, use the returned context ID in place of self.
A snapshot defaults to today in the saved time zone and includes 14 days of context. Choose a date and set context_days from 1 to 31. This request asks for one day.
curl -H "Authorization: Bearer $PEAKFADE_KEY" \
'https://api.peakfade.com/v1/subjects/self/snapshot?date=2026-06-14&context_days=1'
The example response shows selected fields.
{
"data": {
"date": "2026-06-14",
"weights": [{"kg": 74.2}]
},
"complete": true,
"next_cursor": null,
"changes_cursor": "example-snapshot-cursor"
}
For a full period, use GET /v1/subjects/self/period?from=2026-06-01&to=2026-06-14. Both dates are included. Snapshot and period replies can span pages. While complete is false, repeat the same request with cursor set to the latest next_cursor. Keep the same key and date options. Combine all pages.
Check for changes
For one person, start with the changes_cursor from their snapshot or period. Send it as cursor to GET /v1/subjects/self/changes. Read the events and refresh the snapshot if refresh_required is true.
To check everyone selected by the key, start with GET /v1/changes without a cursor. Read a fresh snapshot for each person listed in resync_contexts. On later checks, refresh any listed in refresh_contexts and stop using contexts listed in contexts_removed.
For either feed, pass its next_cursor back as cursor to the same feed. If has_more is true, read the next page now. Otherwise save the cursor for the next check, normally in five minutes. Use cursor strings exactly as returned.
Save a record
With Write, you can add a weigh-in using POST /v1/subjects/self/records/weights. Send JSON. For each new save, make an Idempotency-Key from the current UTC timestamp ending in Z, a colon and a new UUIDv4. Store it in PEAKFADE_INTENT for this example.
curl -X POST 'https://api.peakfade.com/v1/subjects/self/records/weights' \
-H "Authorization: Bearer $PEAKFADE_KEY" \
-H "Idempotency-Key: $PEAKFADE_INTENT" \
-H 'Content-Type: application/json' \
-d '{"date":"2026-06-14","kg":74.2}'
A successful first save includes {"saved":true,"deleted":false,"replayed":false}. If the reply is lost, retry the identical request with the same key within 24 hours. A replay returns the saved receipt with replayed set to true.
To edit a weigh-in, send PUT /v1/subjects/self/records/weights/{id} with the record fields. To remove it, use DELETE on the same path with Delete permission. For either action, use the record ID returned by Peakfade, a new retry key and the current expected_version for that person in an If-Match header. You can get the version from GET /v1/contexts.
For daily measurements from a device or shortcut, use PUT /v1/subjects/self/imports/daily. Send one day, for example {"date":"2026-06-14","timezone":"UTC","metrics":{"resting_hr":{"value":58,"unit":"bpm"}}}, or put up to 90 different days in a days array. The import saves the days together.
Request limits and usage
Your keys and AI connections share 100 requests a minute, 1,000 an hour and 2,000 a day. Each admitted batch or retry counts as one request. Using the Peakfade app does not count. The daily window normally resets at midnight in your Settings time zone. The reply’s usage gives used, remaining and the actual reset_at time.
In Keys and AI connections, each row shows how many requests that key or service used today and how many were refused at the limit. A request admitted within the allowance counts even if it returns an error. A refusal at the limit uses none of the allowance.
When a request fails
- 401 · Check the Bearer header and that the key is still valid.
- 403 · If
error.codeisconsent_required, open Peakfade and agree to the current terms and health data consent, then retry. Forinsufficient_permission, check the key’s permissions and whose data it can reach. - 409 or 410 · If the dataset changed or a cursor expired, start a fresh read. For a write returning
state_changed, read the current state and review the change before sending a new request. - 428 · The write needs a current version. Send it in
If-Match. - 429 · Wait at least the number of seconds in
Retry-After. The reply also giveslimits_hitandresume_at. You can keep using the Peakfade app.