Skip to main content
Body state is a per-joint summary of one teammate: for every joint and side, how careful to be with it, how recovered it is from recent training, and how little is known about it. It works for a teammate with no device at all: their logged training and their known injuries are enough, and with nothing reported you still get an answer.
Body state is an estimate, not a diagnosis. It does not say what is wrong with a joint or whether someone is injured, and it has no injury-risk field. When a teammate reports pain, point them to a qualified professional.
Reading body state changes nothing. Body state changes no program unless you turn on the setting below, and it is off unless you do. Set these two values once in your terminal. Every example in these docs reads them, so no example has a host or a key typed into it.
Use a test key (it starts with tf_test_) while you build. Never paste a live key into a page, a ticket or a chat.

Read a teammate’s body state

The example response is shortened. A real answer lists every joint and side. A 403 with consent_required means the teammate has claimed their account and has not allowed the body_state consent item. You need a key with the body_state:read scope. A teammate who has claimed their account must have allowed the body_state consent item; before the claim you can read it without one (see Teammates and ownership).

The fields

Each entry of joints has three numbers, each from 0 to 1:
  • caution: how careful to be with this joint. 0 means there is no reason for care. It rises with active injuries and limitations at or near the joint.
  • recovery: how recovered the muscles that load this joint are from recent training. 1 means fully recovered; it falls after hard sessions and comes back with rest.
  • uncertainty: how little is known about this joint. It is 1 when nothing has been reported there. A low caution with a high uncertainty means “nothing reported”, not “known to be fine”.

What feeds it

  • Logged training. The teammate’s working sets from the last few days drive recovery.
  • Injuries and limitations the teammate or their coach recorded drive caution.
  • Live pain and soreness reports. Live pain and soreness observations with a joint raise caution and lower uncertainty.
Only live pain and soreness readings fold into body state. Test-mode readings are stored and never change body state.
Device metrics are optional. The estimate belongs to the teammate: it is built from what every organization they use sends about them, and it leaves with them when they go.

What moved it

Two ledger endpoints explain what moved a teammate’s body state over time. Both use the body_state:read scope and the body_state consent item, and page newest first with limit (1 to 100, default 50) and cursor:
  • GET /v1/teammates/{external_id}/body-state/changes: each stored change to the teammate’s body state, with computed_at, engine_version, joints, and cause:
    • readings: the update folded at least one new reading. event_ids lists only the events your organization sent in this mode; other sources are never named.
    • rebuilt: no new reading; rebuilt from stored readings after some were removed (for example after disconnecting a source route).
    • other: no new reading; training, injuries, time or a new engine release moved it.
    • null for changes stored before cause tracking was added.
  • GET /v1/teammates/{external_id}/logged-sets: the sets your organization (and its member app) sent, newest first by when they were performed, with id, event_id, at, movement, session, set and source.
A change is recorded only when a body-state update runs; training sets and injuries do not record a snapshot of their own. Neither endpoint returns raw reading values or set measures. In test mode, both endpoints return what is recorded for the test teammate, which is empty because test-mode readings and sets never write to live body state or training history.

Letting the planner act on body state

By default the planner never changes a program because of body state. A setting lets it: with the setting on, a change in a teammate’s body state can change the rest of their program, the same way an injury you send does.
Today turning the setting on has no visible effect. Three things have to land first: the engine step that re-plans a program from body state, programs keeping the plan the engine re-plans from, and a review of the thresholds that turn body state into a caution. Until then the setting is stored and read back, and no program changes because of it. This page will say when it takes effect.
The setting is off for every organization and every teammate until you turn it on. You can set it for your organization and override it for one teammate:
  1. The teammate’s own value, when you set one (true or false), wins.
  2. Otherwise your organization’s value.
  3. Otherwise it is off.
Every read says which of the three decided it, in source: teammate, organization or default. A teammate who belongs to several organizations gets one answer for their programs: an explicit off from any of them wins (a teammate value of false, or an organization value of false with no teammate value); otherwise it is on when any organization that the teammate allows both programs and body_state has it on. A teammate who leaves your organization loses the value you set for them.

Your organization’s setting

200
Read it with GET /v1/organization/settings. Reading needs the teammates:read scope and changing it needs teammates:write.

One teammate’s setting

200
Send null to remove the teammate’s own value, so they follow your organization’s again. effective is the value in force for this teammate in your organization. Read it with GET /v1/teammates/{external_id}/settings. The same scopes apply, and a teammate who has claimed their account must have allowed the body_state consent item. Only your organization sets this value; a member app’s teammate token cannot.

What a change looks like

With the setting on, a change in body state that asks for more or less caution at a joint re-plans the rest of the program from that day. The change is a revision whose cause kind is body_state and whose summary names each joint and side, for example week 2 Tue: body state caution on: left knee (moderate). A teammate with a coach gets a proposal instead, and nothing changes until the coach accepts it. Turning the setting off stops further changes. Cautions already applied stay in the program until its next change. A test key reads and writes your test-mode settings only, and a test-mode setting never affects a live program. Every change at either level is recorded with the key that made it.

Errors

Errors use the shared error format.