Any verified TechnicallyFit account can use the sandbox in test mode (
tf_test_*) from
a free personal developer workspace at
app.technicallyfit.com/developer, with no
organization required.403 forbidden, and a live key cannot see a
simulated teammate (404).
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.
tf_test_) while you build. Never paste a live key into a
page, a ticket or a chat.
Presets and behaviors
A preset is a starting point: a goal, a weekly schedule and a starting history.
A behavior is how the simulated teammate trains one week.
List them, with their descriptions:
200
Create a simulated teammate
Send your ownexternal_id (up to 64 characters), a preset and an optional seed. This
needs the teammates:write scope.
program_job_id: poll GET /v1/program-jobs/{job_id} until it succeeds, then read the
program with GET /v1/teammates/sim-001/programs. When the program starts you receive
program.revised (revision 1, cause created) at your test webhook endpoints.
201
status is succeeded (or failed, with an error):
200
external_id, preset and seed answer the same
teammate. Another preset or seed for that external_id is 409 conflict, and so is an
external_id you already used for a test teammate you made yourself.
Simulate a week
Each call generates the next week of events for the behavior you choose and sends them through the normal event path. This needs theevents:write scope.
accepted, duplicate or
rejected, which program the week followed and the teammate’s new simulated time. One call
is one week, so each week can lead to one clear re-plan. Call it again for the next week.
200
program_id is null. Wait for the job to succeed before
you simulate if you want to see the program change.
Simulated events are logged sets and self-reports (session effort, and pain for
reports_pain). They use the source route sandbox and the device simulated. A full week
runs from logged sets and self-reports alone. To add generic device readings (bar velocity on
sets, resting heart rate and sleep duration), send "include_device_readings": true.
Simulated verified records
Send"include_results": true on POST /v1/sandbox/teammates/{simulated_id}/simulate with a test
key holding measurements:write to exercise the full verified-record flow in test mode:
- Four protocol measurements (40-yard sprint, 60-yard sprint, vertical jump and lift max) are ingested through the normal event path using registered protocols and instrument kinds.
- Two of them are vouched in test mode using TechnicallyFit’s test signing key: one as a simulated coach witness (level 3) and one as a simulated certifying event (level 4). Each statement names a simulated attestor, never a real person or organization.
- The response includes
results.measurement_idsandresults.attestation_idsso you can read them viaGET /v1/teammates/{external_id}/measurementsand check them viaGET /v1/attestations/{attestation_id}/status(valid). - Resetting the teammate or the sandbox erases the simulated measurements through the store so
subsequent attestation checks answer
withdrawn.
Personal workspace limits in the sandbox
Free personal developer workspaces have caps in the sandbox:- Active simulated teammates: Up to 5 active simulated teammates per personal
workspace. Creating another returns
409 conflictwithdetails.reason: "sandbox_teammate_limit_reached". Reset the sandbox to free slots. - Daily engine-heavy writes: Up to 50 per UTC day across the workspace, counting
program creations and sandbox week simulations combined. Exceeding the cap returns
429 rate_limit_exceededwithdetails.window: "day",details.limit: 50and aRetry-Afterheader until midnight UTC. - Active test webhook endpoints: Up to 2 active test webhook endpoints per personal
workspace (
409 conflictwithdetails.reason: "endpoint_limit_reached"when exceeded). - Per-key rate limits: 30 requests per minute and 14,400 requests per UTC day per key.
Repeatable runs
The sandbox is deterministic. The same preset and seed always give the same starting history, and the same seed and behavior always give the same week, so a test you write today gives the same events tomorrow. Times are relative to the day the teammate was created. Every simulated event has a fixed record id, so sending a week again is answered as duplicates.The simulated clock
Each simulated teammate has its own clock. It starts when you create the teammate and moves forward one week with every simulate call, so a simulated week can be later than today. The program’s weeks close on that clock, not on the real date: when you simulate week 2, week 1 is closed and the program can be re-planned from it. Reads that take today’s date, such asGET /v1/teammates/{external_id}/sessions/today, use
the real date, not the simulated clock.
Resets
Reset one simulated teammate to its preset’s starting state. Its events, programs and revisions are removed, and it is created again from the same preset and seed, with a new clock that starts now.200
teammates:write scope.
What you will and will not see today
The sandbox stores and returns every simulated event right away. Some later steps are still being finished on our side, and the sandbox does not pretend otherwise:- Re-planning from a simulated week is not switched on yet. A program re-plans from
events only once its plan is stored in the form the engine re-plans from, and only while
re-planning is turned on. Until then
replan_requestedisfalseand noprogram.revisedfollows a simulated week. You still receiveprogram.revisedwhen the first program starts. - The starting history does not shape the first program. The first program is built from the preset’s goal and schedule. The history is stored as test-mode events and is read when a simulated week is re-planned.
- Test-mode pain and soreness reports do not change body state. Live pain and soreness readings fold into body state, but test-mode readings never change it; they are stored and kept for your sandbox reads.
- Why a program changed comes from the engine. A revision’s cause names what the engine says moved it; the sandbox does not choose it.