> ## Documentation Index
> Fetch the complete documentation index at: https://docs.technicallyfit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Programs and revisions

> Read why a teammate's program changed, what changed, and the session planned for today.

You can give a teammate a goal and a program, then follow it. A teammate's program changes as you send what you know about them: a training day, a
constraint, new equipment or a new schedule. Each change is a **revision**. A revision says
why the program changed, what changed, whether the teammate's targets are still in reach, and
whether the change was applied. You can also read the session planned for today, as planned or
rebuilt easier or harder for how the teammate feels.

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.

```bash theme={null}
export TF_API_BASE="https://api.technicallyfit.com"
export TF_API_KEY="tf_test_your_key_here"
```

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.

```bash curl theme={null}
curl -X POST "$TF_API_BASE/v1/teammates/member-1042/programs" \
  -H "X-API-Key: $TF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "idempotency_key": "onboarding-member-1042-2026-11",
    "weeks": 12,
    "start_date": "2026-11-23",
    "sessions_per_week": 3,
    "session_minutes": 60,
    "training_weekdays": [0, 2, 4],
    "training_experience_years": 2,
    "start": "when_free"
  }'
```

```typescript TypeScript theme={null}
import { createClient } from '@technicallyfit/sdk';

const tf = createClient({ credential: process.env.TF_API_KEY ?? '', baseUrl: process.env.TF_API_BASE });

const job = await tf.POST('/v1/teammates/{external_id}/programs', {
  params: { path: { external_id: 'member-1042' } },
  body: {
    idempotency_key: 'onboarding-member-1042-2026-11',
    weeks: 12,
    start_date: '2026-11-23',
    sessions_per_week: 3,
    session_minutes: 60,
    training_weekdays: [0, 2, 4],
    training_experience_years: 2,
    start: 'when_free',
  },
});
console.log(job.id, job.status);
```

```python Python theme={null}
import os

from technicallyfit import Client

tf = Client(os.environ["TF_API_KEY"], base_url=os.environ.get("TF_API_BASE"))

job = tf.create_program("member-1042", {
    "idempotency_key": "onboarding-member-1042-2026-11",
    "weeks": 12,
    "start_date": "2026-11-23",
    "sessions_per_week": 3,
    "session_minutes": 60,
    "training_weekdays": [0, 2, 4],
    "training_experience_years": 2,
    "start": "when_free",
})
print(job["id"], job["status"])
```

```json 202 theme={null}
{
  "id": "pj_5a1f2b3c-4d5e-4f60-8a7b-9c0d1e2f3a4b",
  "teammate": "member-1042",
  "status": "queued",
  "created_at": "2026-11-20T09:00:00Z",
  "finished_at": null,
  "result": null,
  "error": null
}
```

## Set a goal

A goal is what the teammate trains for: a goal type, an optional measurable target and an
optional due date. Your organization keeps one goal per teammate; sending it again replaces it.
The teammate's own goals are not read or changed.

```bash curl theme={null}
curl -X PUT "$TF_API_BASE/v1/teammates/member-1042/goal" \
  -H "X-API-Key: $TF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "strength",
    "title": "Stronger squat by spring",
    "target": { "quantity": "squat_e1rm", "value": 300, "unit": "lb" },
    "due_date": "2027-03-01"
  }'
```

```typescript TypeScript theme={null}
import { createClient } from '@technicallyfit/sdk';

const tf = createClient({ credential: process.env.TF_API_KEY ?? '', baseUrl: process.env.TF_API_BASE });

const goal = await tf.PUT('/v1/teammates/{external_id}/goal', {
  params: { path: { external_id: 'member-1042' } },
  body: {
    type: 'strength',
    title: 'Stronger squat by spring',
    target: { quantity: 'squat_e1rm', value: 300, unit: 'lb' },
    due_date: '2027-03-01',
  },
});
console.log(goal.id, goal.status);
```

```python Python theme={null}
import os

from technicallyfit import Client

tf = Client(os.environ["TF_API_KEY"], base_url=os.environ.get("TF_API_BASE"))

goal = tf.set_teammate_goal("member-1042", {
    "type": "strength",
    "title": "Stronger squat by spring",
    "target": {"quantity": "squat_e1rm", "value": 300, "unit": "lb"},
    "due_date": "2027-03-01",
})
print(goal["id"], goal["status"])
```

```json 200 theme={null}
{
  "id": "0b9a3c1e-6d2f-4e8a-9b7c-5d4e3f2a1b0c",
  "teammate": "member-1042",
  "type": "strength",
  "title": "Stronger squat by spring",
  "target": { "quantity": "squat_e1rm", "value": 300, "unit": "lb" },
  "due_date": "2027-03-01",
  "status": "active",
  "updated_at": "2026-11-20T09:00:00Z"
}
```

| Field | Values |
| - | - |
| `type` | `strength`, `hypertrophy`, `power`, `endurance`, `fat_loss`, `general_fitness`, `vertical_jump`, `sprint_speed`, `mobility` |
| `title` | Optional, 2 to 180 characters. Defaults to the type, such as "Fat loss". |
| `target.quantity` | `squat_e1rm`, `bench_e1rm`, `deadlift_e1rm`, `run_5k_time`, `bodyweight_loss`, `arm_circumference` |
| `target.value`, `target.unit` | A value in one of the quantity's units, such as `kg` or `lb`, or a time such as `24:30` for `run_5k_time`. The unit defaults to the quantity's own unit, and the answer reads in that unit. |
| `due_date` | Optional date. |

`GET /v1/teammates/{external_id}/goal` reads it back, and answers `404 not_found` when you have
set none. Setting a goal needs `programs:write`; reading it needs `programs:read`.

## Create a program

A program is built as a job. Send the schedule; the goal is the one you set, or the `goal` you
send in the same call.

```bash curl theme={null}
curl -X POST "$TF_API_BASE/v1/teammates/member-1042/programs" \
  -H "X-API-Key: $TF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "idempotency_key": "onboarding-member-1042-2026-11",
    "weeks": 12,
    "start_date": "2026-11-23",
    "sessions_per_week": 3,
    "session_minutes": 60,
    "training_weekdays": [0, 2, 4],
    "training_experience_years": 2,
    "start": "when_free"
  }'
```

```typescript TypeScript theme={null}
import { createClient } from '@technicallyfit/sdk';

const tf = createClient({ credential: process.env.TF_API_KEY ?? '', baseUrl: process.env.TF_API_BASE });

const job = await tf.POST('/v1/teammates/{external_id}/programs', {
  params: { path: { external_id: 'member-1042' } },
  body: {
    idempotency_key: 'onboarding-member-1042-2026-11',
    weeks: 12,
    start_date: '2026-11-23',
    sessions_per_week: 3,
    session_minutes: 60,
    training_weekdays: [0, 2, 4],
    training_experience_years: 2,
    start: 'when_free',
  },
});
console.log(job.id, job.status);
```

```python Python theme={null}
import os

from technicallyfit import Client

tf = Client(os.environ["TF_API_KEY"], base_url=os.environ.get("TF_API_BASE"))

job = tf.create_program("member-1042", {
    "idempotency_key": "onboarding-member-1042-2026-11",
    "weeks": 12,
    "start_date": "2026-11-23",
    "sessions_per_week": 3,
    "session_minutes": 60,
    "training_weekdays": [0, 2, 4],
    "training_experience_years": 2,
    "start": "when_free",
})
print(job["id"], job["status"])
```

The answer is `202` with the job:

```json 202 theme={null}
{
  "id": "pj_5a1f2b3c-4d5e-4f60-8a7b-9c0d1e2f3a4b",
  "teammate": "member-1042",
  "status": "queued",
  "created_at": "2026-11-20T09:00:00Z",
  "finished_at": null,
  "result": null,
  "error": null
}
```

| Field | Rule |
| - | - |
| `idempotency_key` | Required, 1 to 128 characters. The same key with the same body answers the same job and builds one program. |
| `weeks` or `end_date` | One of them, not both. `weeks` is 1 to 52, default 12. |
| `start_date` | Defaults to today in the teammate's time zone. |
| `sessions_per_week` | 2 to 7. Defaults to the number of `training_weekdays`, else 4. |
| `session_minutes` | Optional, 10 to 240. |
| `training_weekdays` | Optional, 0 is Monday and 6 is Sunday, one per session. |
| `training_experience_years` | Optional. Used only before the teammate claims their account. After the claim the teammate's own profile is used, and the field is listed in `inputs_ignored`. |
| `goal` | Optional. Sets the goal in the same call, as `PUT /goal` does. |
| `start` | `when_free` (default) starts the program only when the teammate has no active program. `replace` also replaces an active program your organization created. |

A program your organization creates never replaces one the teammate or their coach made: it is
saved, and the teammate chooses in their app.

### Poll the job

```bash curl theme={null}
curl "$TF_API_BASE/v1/program-jobs/pj_5a1f2b3c-4d5e-4f60-8a7b-9c0d1e2f3a4b" \
  -H "X-API-Key: $TF_API_KEY"
```

```typescript TypeScript theme={null}
import { createClient } from '@technicallyfit/sdk';

const tf = createClient({ credential: process.env.TF_API_KEY ?? '', baseUrl: process.env.TF_API_BASE });

const jobId = 'pj_5a1f2b3c-4d5e-4f60-8a7b-9c0d1e2f3a4b';
let job = await tf.GET('/v1/program-jobs/{job_id}', { params: { path: { job_id: jobId } } });
while (job.status === 'queued' || job.status === 'running') {
  await new Promise((resolve) => setTimeout(resolve, 3000));
  job = await tf.GET('/v1/program-jobs/{job_id}', { params: { path: { job_id: jobId } } });
}
console.log(job.status, job.result?.outcome, job.error?.code);
```

```python Python theme={null}
import os

from technicallyfit import Client

tf = Client(os.environ["TF_API_KEY"], base_url=os.environ.get("TF_API_BASE"))

import time

job_id = "pj_5a1f2b3c-4d5e-4f60-8a7b-9c0d1e2f3a4b"
job = tf.get_program_job(job_id)
while job["status"] in ("queued", "running"):
    time.sleep(3)
    job = tf.get_program_job(job_id)
print(job["status"], job["result"], job["error"])
```

```json 200 theme={null}
{
  "id": "pj_5a1f2b3c-4d5e-4f60-8a7b-9c0d1e2f3a4b",
  "teammate": "member-1042",
  "status": "succeeded",
  "created_at": "2026-11-20T09:00:00Z",
  "finished_at": "2026-11-20T09:00:20Z",
  "result": {
    "program_id": "4d2f6f0a-7c11-4f0b-9c1d-0b77d1e95a0e",
    "outcome": "started",
    "proposal_id": null,
    "engine_version": "ab5787734209",
    "inputs_ignored": []
  },
  "error": null
}
```

`status` moves from `queued` to `running`, then to `succeeded` or `failed`. Poll every few
seconds; a program usually takes under a minute. A job is readable with a key of the
organization and mode that created it, and answers `404` after the teammate left.

| `outcome` | Meaning |
| - | - |
| `started` | The program is the teammate's active program. |
| `saved` | The program is saved and not started, because the teammate has another active program. The teammate chooses in their app. |
| `waiting_for_coach` | The teammate has a coach. The program waits as a proposal (`proposal_id`) until the coach accepts it. |

A failed job's `error.code` is one of:

| `error.code` | Meaning |
| - | - |
| `plan_refused` | We could not plan a program for these inputs. Change the request and send it with a new key. |
| `teammate_left` | The teammate left your organization before the program was built. |
| `consent_withdrawn` | The teammate turned off `program_setup` before the program was built. |
| `generation_failed` | Building the program failed on our side. Send the request again with a new key. |

### A teammate with a coach

When the teammate has a coach, the program is saved and not started. It waits as a proposal
whose cause kind is `created`, and `proposal.created` fires. When the coach accepts it, the
program starts and `program.revised` fires with `approval.mode` `coach`. When the coach
declines, the program stays saved. See [Proposals and coach approval](https://docs.technicallyfit.com/guides/proposals-and-coach-approval.md).

### Webhooks

A started program fires `program.revised` with `revision` 1, a `null` `parent_revision` and
the cause kind `created`:

```json program.revised theme={null}
{
  "id": "8e4b2c71-5d3a-4f6e-9b1c-7a2d0e5f3c84",
  "type": "program.revised",
  "created_at": "2026-11-20T09:00:20.000Z",
  "mode": "live",
  "data": {
    "teammate": "member-1042",
    "program_id": "4d2f6f0a-7c11-4f0b-9c1d-0b77d1e95a0e",
    "revision": 1,
    "parent_revision": null,
    "cause": { "kind": "created", "summary": "The program was created." },
    "approval": { "mode": "automatic" },
    "engine_version": "ab5787734209",
    "applied_at": "2026-11-20T09:00:20.000Z"
  }
}
```

A saved or failed job sends no event; poll the job. Programs created through the API are not
yet re-planned from the events you send; their revisions list stays empty until they are.

### Errors

| Answer | When |
| - | - |
| `403 forbidden` | The key does not have `programs:write` (or `programs:read` for the reads). |
| `403 consent_required` | The teammate claimed their account and has not allowed `program_setup`. |
| `404 not_found` | Your organization has no teammate with that id in this key's mode, or the teammate left. |
| `409 conflict` | `details.reason` is `idempotency_key_reused` (the key was used with another body), `program_job_active` (a job is still running for the teammate) or `goal_required` (no goal sent and none set). |
| `422 validation_failed` | A field is not valid. Every failing field is listed. |

### List a teammate's programs

`GET /v1/teammates/{external_id}/programs` lists the teammate's programs, newest first, so you
can find the id the reads below need.

> [tab] Organization key
>
> ```bash curl theme={null}
> curl "$TF_API_BASE/v1/teammates/member-1042/programs" \
>   -H "X-API-Key: $TF_API_KEY"
> ```
>
> ```typescript TypeScript theme={null}
> import { createClient } from '@technicallyfit/sdk';
>
> const tf = createClient({ credential: process.env.TF_API_KEY ?? '', baseUrl: process.env.TF_API_BASE });
>
> const programs = await tf.GET('/v1/teammates/{external_id}/programs', {
>   params: { path: { external_id: 'member-1042' } },
> });
> for (const program of programs.data) console.log(program.id, program.status);
> ```
>
> ```python Python theme={null}
> import os
>
> from technicallyfit import Client
>
> tf = Client(os.environ["TF_API_KEY"], base_url=os.environ.get("TF_API_BASE"))
>
> programs = tf.list_teammate_programs("member-1042")
> for program in programs["data"]:
>     print(program["id"], program["status"])
> ```

> [tab] Teammate token
>
> A [member app](https://docs.technicallyfit.com/guides/member-apps.md) reads the signed-in teammate with their token and `@me`.
>
> ```bash curl theme={null}
> curl "$TF_API_BASE/v1/teammates/@me/programs" \
>   -H "Authorization: Bearer $TF_TEAMMATE_TOKEN"
> ```
>
> ```typescript TypeScript theme={null}
> import { createClient } from '@technicallyfit/sdk';
>
> const tf = createClient({ credential: process.env.TF_TEAMMATE_TOKEN ?? '', baseUrl: process.env.TF_API_BASE });
>
> const programs = await tf.GET('/v1/teammates/{external_id}/programs', {
>   params: { path: { external_id: '@me' } },
> });
> for (const program of programs.data) console.log(program.id, program.status);
> ```
>
> ```python Python theme={null}
> import os
>
> from technicallyfit import Client
>
> tf = Client(os.environ["TF_TEAMMATE_TOKEN"], base_url=os.environ.get("TF_API_BASE"))
>
> programs = tf.list_teammate_programs("@me")
> for program in programs["data"]:
>     print(program["id"], program["status"])
> ```

```json 200 theme={null}
{
  "data": [
    {
      "id": "4d2f6f0a-7c11-4f0b-9c1d-0b77d1e95a0e",
      "name": "Strength - 12wk",
      "status": "active",
      "created_by": "organization",
      "weeks": 12,
      "weekly_sessions": 3,
      "start_date": "2026-11-23",
      "end_date": "2027-02-14",
      "revision": null,
      "engine_version": "ab5787734209"
    }
  ]
}
```

`status` is `active`, `saved`, `waiting_for_coach` or `completed`. `created_by` is
`organization` when your organization created it in this mode, else `teammate` or `coach`.
`weekly_sessions` is the number of sessions planned in the first week.
`revision` is the latest recorded revision, or `null` when none is recorded yet. No week or
session content is listed: read revisions and today's session for that.

## Reading a program

| Endpoint | Returns |
| - | - |
| `GET /v1/teammates/{external_id}/programs/{program_id}/revisions` | Every revision of the program, newest first |
| `GET /v1/teammates/{external_id}/sessions/today` | Today's session in the teammate's time zone |

Both need a key with the `programs:read` scope. After the teammate claims their account, they
also need to allow `programs`; until then, your organization can read what it sent for them.

| Answer | When |
| - | - |
| `403 forbidden` | The key does not have `programs:read`. |
| `403 consent_required` | The teammate claimed their account and has not allowed `programs`. |
| `404 not_found` | Your organization has no teammate with that id in this key's mode (a test key never sees live teammates), the teammate left, or the program is not theirs. |

## Revisions

> [tab] Organization key
>
> ```bash curl theme={null}
> curl "$TF_API_BASE/v1/teammates/member-1042/programs/$PROGRAM_ID/revisions?limit=20" \
>   -H "X-API-Key: $TF_API_KEY"
> ```
>
> ```typescript TypeScript theme={null}
> import { createClient } from '@technicallyfit/sdk';
>
> const tf = createClient({ credential: process.env.TF_API_KEY ?? '', baseUrl: process.env.TF_API_BASE });
>
> for await (const revision of tf.paginate('/v1/teammates/{external_id}/programs/{program_id}/revisions', {
>   params: { path: { external_id: 'member-1042', program_id: process.env.PROGRAM_ID ?? '' }, query: { limit: 20 } },
> })) {
>   console.log(revision.revision, revision.cause.kind, revision.approval.status);
> }
> ```
>
> ```python Python theme={null}
> import os
>
> from technicallyfit import Client
>
> tf = Client(os.environ["TF_API_KEY"], base_url=os.environ.get("TF_API_BASE"))
>
> for revision in tf.paginate(tf.list_program_revisions, external_id="member-1042", program_id=os.environ["PROGRAM_ID"], limit=20):
>     print(revision["revision"], revision["cause"]["kind"], revision["approval"]["status"])
> ```

> [tab] Teammate token
>
> A [member app](https://docs.technicallyfit.com/guides/member-apps.md) reads the signed-in teammate with their token and `@me`.
>
> ```bash curl theme={null}
> curl "$TF_API_BASE/v1/teammates/@me/programs/$PROGRAM_ID/revisions?limit=20" \
>   -H "Authorization: Bearer $TF_TEAMMATE_TOKEN"
> ```
>
> ```typescript TypeScript theme={null}
> import { createClient } from '@technicallyfit/sdk';
>
> const tf = createClient({ credential: process.env.TF_TEAMMATE_TOKEN ?? '', baseUrl: process.env.TF_API_BASE });
>
> for await (const revision of tf.paginate('/v1/teammates/{external_id}/programs/{program_id}/revisions', {
>   params: { path: { external_id: '@me', program_id: process.env.PROGRAM_ID ?? '' }, query: { limit: 20 } },
> })) {
>   console.log(revision.revision, revision.cause.kind, revision.approval.status);
> }
> ```
>
> ```python Python theme={null}
> import os
>
> from technicallyfit import Client
>
> tf = Client(os.environ["TF_TEAMMATE_TOKEN"], base_url=os.environ.get("TF_API_BASE"))
>
> for revision in tf.paginate(tf.list_program_revisions, external_id="@me", program_id=os.environ["PROGRAM_ID"], limit=20):
>     print(revision["revision"], revision["cause"]["kind"], revision["approval"]["status"])
> ```

```json 200 theme={null}
{
  "data": [
    {
      "revision": 4,
      "parent_revision": 3,
      "created_at": "2026-11-18T10:00:00Z",
      "applied_at": "2026-11-18T10:00:01Z",
      "engine_version": "ab5787734209",
      "cause": {
        "kind": "constraint",
        "summary": "A left knee constraint was reported.",
        "week_number": 3,
        "day_index": 2,
        "session_id": "3f6a1b52-0d1e-4c41-9b0f-6a5b8e2d7c10:1",
        "event_ids": ["7c6d5e4f-3a2b-4c1d-9e8f-7a6b5c4d3e2f"]
      },
      "diff": {
        "from_week": 3,
        "from_day": 2,
        "summary": "One squat slot changed in week 3.",
        "weeks_changed": [3, 4],
        "sessions_added": 0,
        "sessions_removed": 0,
        "changes": [
          {
            "week_number": 3,
            "day_index": 2,
            "session_id": "3f6a1b52-0d1e-4c41-9b0f-6a5b8e2d7c10:1",
            "pattern": "squat",
            "before": { "id": "9a1f4b7e-2c3d-4e5f-8a9b-0c1d2e3f4a5b", "name": "Back Squat" },
            "after": { "id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e", "name": "Box Squat" }
          }
        ]
      },
      "feasibility": [
        {
          "quantity": "squat_e1rm",
          "unit": "kg",
          "target": 150,
          "feasible": false,
          "projected_final": 146,
          "shortfall": 4,
          "warning": "The squat target is likely out of reach by the end of the program."
        }
      ],
      "warnings": [],
      "approval": { "status": "applied", "mode": "automatic", "decided_at": "2026-11-18T10:00:01Z" }
    }
  ],
  "next_cursor": null
}
```

A page holds 1 to 100 revisions (`limit`, default 20). When `next_cursor` is not null, pass it
as `cursor` to read the next page. Revision 1 is the program as it was created and has no
diff.

### Causes

`cause.kind` says why the program changed. `cause.summary` says it in a sentence you can show.
`cause.event_ids` are the ids of the events you sent that caused it, as
[sending events](https://docs.technicallyfit.com/guides/sending-events.md) returned them.

| Kind | The program changed because |
| - | - |
| `created` | It was created. |
| `week_feedback` | A week ended and its training was reviewed. |
| `day_outcome` | A training day was logged. |
| `constraint` | A constraint, such as an injury, was added or cleared. |
| `equipment_change` | The equipment the teammate can use changed. |
| `schedule_change` | The days the teammate can train changed. |
| `body_state` | The teammate reported how they feel. |
| `observation_replay` | Observations stored earlier, which the engine could not use when they arrived, were used once a later engine version learned to read them (see [used later](https://docs.technicallyfit.com/guides/observations.md#used-later)). A revision that used them has this kind even when the week's own training also counted. |
| `event_taken_back` | An earlier accepted event was taken back (`POST /v1/teammates/{external_id}/events/{event_id}:undo`), so the program was re-planned without it. |

`week_number` counts from 1 and `day_index` is the weekday, 0 for Monday to 6 for Sunday.

### Diffs

`diff` says what changed from `from_week` and `from_day` on; earlier days never change.
`weeks_changed` lists every week with any change, `sessions_added` and `sessions_removed`
count sessions, and `changes` lists each movement that was swapped, added (`before` is null)
or removed (`after` is null). A movement `id` is the id the
[movement catalog](https://docs.technicallyfit.com/reference/movements.md) uses.

A `session_id` names the session as it is planned now, in the form
`{weekly_plan_id}:{session_index}`. It is the id to send as `session.planned_session_id` when you
log sets against that session. It is null when that day has no session now.

### Targets

`feasibility` has one entry per target the teammate set. `feasible` is true when the program is
on course to reach the target, false when it is likely out of reach, and null while there is
not enough training logged to say. `projected_final` is where the target is expected to land,
and `shortfall` how far short of the target that is.

### Approval

| `approval.status` | Meaning |
| - | - |
| `applied` | The change is in the program. `mode` is `automatic`. |
| `pending` | The change waits for the teammate's coach. |
| `accepted` | The coach accepted the change. |
| `declined` | The coach declined the change. The program did not change. |
| `superseded` | A newer change replaced this one before it was decided. |

A change waits for the coach only when the teammate has an active coach and the change alters
a session; see [Proposals and coach approval](https://docs.technicallyfit.com/guides/proposals-and-coach-approval.md). A declined
or replaced change keeps its revision number, and the next change can use the same number, so
two revisions can share one.

## Today's session

> [tab] Organization key
>
> ```bash curl theme={null}
> curl "$TF_API_BASE/v1/teammates/member-1042/sessions/today?effort=easier" \
>   -H "X-API-Key: $TF_API_KEY"
> ```
>
> ```typescript TypeScript theme={null}
> import { createClient } from '@technicallyfit/sdk';
>
> const tf = createClient({ credential: process.env.TF_API_KEY ?? '', baseUrl: process.env.TF_API_BASE });
>
> const today = await tf.GET('/v1/teammates/{external_id}/sessions/today', {
>   params: { path: { external_id: 'member-1042' }, query: { effort: 'easier' } },
> });
> console.log(today.date, today.session?.title ?? 'Rest day', today.next_session_date);
> ```
>
> ```python Python theme={null}
> import os
>
> from technicallyfit import Client
>
> tf = Client(os.environ["TF_API_KEY"], base_url=os.environ.get("TF_API_BASE"))
>
> today = tf.get_today_session("member-1042", effort="easier")
> print(today["date"], today["session"]["title"] if today["session"] else "Rest day", today["next_session_date"])
> ```

> [tab] Teammate token
>
> A [member app](https://docs.technicallyfit.com/guides/member-apps.md) reads the signed-in teammate with their token and `@me`.
>
> ```bash curl theme={null}
> curl "$TF_API_BASE/v1/teammates/@me/sessions/today?effort=easier" \
>   -H "Authorization: Bearer $TF_TEAMMATE_TOKEN"
> ```
>
> ```typescript TypeScript theme={null}
> import { createClient } from '@technicallyfit/sdk';
>
> const tf = createClient({ credential: process.env.TF_TEAMMATE_TOKEN ?? '', baseUrl: process.env.TF_API_BASE });
>
> const today = await tf.GET('/v1/teammates/{external_id}/sessions/today', {
>   params: { path: { external_id: '@me' }, query: { effort: 'easier' } },
> });
> console.log(today.date, today.session?.title ?? 'Rest day', today.next_session_date);
> ```
>
> ```python Python theme={null}
> import os
>
> from technicallyfit import Client
>
> tf = Client(os.environ["TF_TEAMMATE_TOKEN"], base_url=os.environ.get("TF_API_BASE"))
>
> today = tf.get_today_session("@me", effort="easier")
> print(today["date"], today["session"]["title"] if today["session"] else "Rest day", today["next_session_date"])
> ```

```json 200 theme={null}
{
  "date": "2026-11-20",
  "time_zone": "America/Chicago",
  "program_id": "5d2c8a40-1f3b-4e6a-9c7d-2b1a0e9f8d7c",
  "revision": 4,
  "engine_version": "ab5787734209",
  "effort": "easier",
  "session": {
    "id": "3f6a1b52-0d1e-4c41-9b0f-6a5b8e2d7c10:1",
    "week_number": 3,
    "day_index": 4,
    "title": "Lower body",
    "blocks": [
      {
        "movement": { "id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e", "name": "Box Squat" },
        "sets": 3,
        "reps": "6-8",
        "duration_seconds": null,
        "distance_meters": null,
        "load": { "value": 90, "unit": "kg" },
        "effort_target": 6.5,
        "rest_seconds": 150,
        "notes": null
      }
    ]
  },
  "next_session_date": "2026-11-22"
}
```

`date` is today in the teammate's time zone: the one the teammate set after they claimed their
account, else the `timezone` you set for them, else UTC. The session is the one scheduled for
that date on the teammate's active program. When nothing is scheduled today, `session` is null
and `next_session_date` is the next date that has one. A program the teammate works through at
their own pace has no dates, so it has no session today and no next date.

`effort` chooses the version:

| `effort` | Returns |
| - | - |
| `as_planned` (default) | The session as stored in the program. |
| `easier` | The session rebuilt lighter for today. |
| `harder` | The session rebuilt heavier for today. |

An easier or harder version is built when you ask and is not stored: the program does not
change, and the next read as planned returns the stored session. Building it can take a few
seconds. When it cannot be built right now, the answer is `503 engine_unavailable`; try again
shortly. `effort_target` is the planned effort on a scale of 1 to 10, where 10 is the most a
teammate could do.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.