tf_test_) while you build. Never paste a live key into a
page, a ticket or a chat.
Two endpoints
Both need a key with the
events:write scope, and a request body of at most 1 MB. Both
answer 200 whenever the request itself is well formed, also when some events in it are
rejected. Read the result of each event.
- Organization key
- Teammate token
The fields of an event
An unknown field on an event is rejected, so a typo never passes silently.
Event types
observation
data is one observation in the observation/1 format. Observations
lists every field, the quantities and their units.
- A quantity on the list is checked: its unit, its measure and its body location must be
ones that quantity takes. A unit we cannot convert is rejected with
unit_not_convertible, and the message lists the units the quantity takes. - A quantity that is not on the list is accepted and kept. Its result says
"kind": "unknown". - Every accepted observation answers
"status": "not_interpreted": it is stored and has not been used yet. - Streams reach the API as summaries, never as raw sample lists. If you stream a session
over Real-time, its folded summaries arrive as ordinary
observationreadings through this same path when the session ends. data.teammateis optional. When you send it, it must be the teammate the event is for.- Pain, soreness and session effort are self-reports, with a scale and two routes of their
own:
teammateandcoach. A value off the scale isvalue_out_of_range, and another quantity on those routes isroute_quantity_not_allowed. Without a device has the rules and examples.
constraint
Adds or clears a limitation at a joint.equipment_change
Changes the teammate’s own equipment. Send at least one of the three lists.
Every entry is a token, a name or another spelling from the
equipment reference. An entry that is not on it is rejected, and
field names the entry.
schedule_change
Changes the days the teammate can train. Send at least one of the two fields.visit_check_in
A teammate’s visit to one of your locations, from your app or your door system. It needs anidempotency_key and at. See Visit check-ins.
unknown_location. A
time more than five minutes ahead of our clock is rejected with at_in_future.
logged_set
One set the teammate performed: a movement, the reps, and the load, effort, duration or distance when you have them. It is stored with the teammate’s training, marked as sent by your organization, with its source route, device, record id and confidence. Its facts (reps, load, and any measures you send with it) are also stored as observations of the set.- A logged set is keyed by its source, as an observation is:
source.routetogether withsource.record_id. Sending the same set again answersduplicateand stores nothing. - A movement id that is not in the movement reference is rejected with
unknown_movement. Send anameinstead for a movement we do not list. - A measure is checked like an observation: a unit the quantity does not take is
unit_not_convertible. A quantity that needs a body location belongs in anobservationevent. - The set belongs to the teammate. It counts as training they did, and it stays with them when they leave your organization. Sets you send earn no XP, accolades or personal records in the TechnicallyFit app.
- A logged set is new information only. To correct a set, send it with a new
record_id.
Results
The response lists one result per event, in the order you sent them, and a count of each status. This is the answer to the organization key example above, with a third event added that sends a load in a unit the quantity does not take:200
index is the position of the event in your request. event_id is our id for the stored
event. It is null for an event we could not store at all: one with no usable key, one of
an unknown type, or one for a teammate you cannot send events for.
Idempotency
Every event has a key, and we store one event per key for each teammate.- An
observationand alogged_setare keyed by their source:source.routetogether withsource.record_id. Give each reading arecord_idthat stays the same when you send it again. - Every other type is keyed by the
idempotency_keyyou send.
200
- The first accepted copy wins. A later event with the same key is a
duplicateeven when its content differs, so use a new key for a new fact. - A rejected event is not final. Fix it and send it again with the same key, and it is
accepted under the same
event_id. - Keys are separate per teammate and per mode. A test key and a live key never see each other’s events.
Rejection codes
A
reason.message never repeats a value you sent.
Consent
Before a teammate claims their account, the events you send are your organization’s own data and are always accepted. After the claim you can send events only while the teammate allows theevents item.
- On the per-teammate endpoint the whole request answers
403with codeconsent_required, or404with codenot_foundfor a teammate you do not have. - On the bulk endpoint those two are results of single events, and the rest of the batch is processed as usual.
Read back what you sent
With an organization key holdingevents:read, you can list the events your organization
sent, newest first by received time, for one teammate (GET /v1/teammates/{external_id}/events)
or across your whole organization and mode (GET /v1/events).
Filter by type, status (accepted or rejected), from (inclusive received time) and
to (exclusive received time), and page with limit (1 to 100, default 50) and cursor.
Each entry returns id, teammate, type, status, key, occurred_at, received_at,
accepted_at, attempts, reason (for a rejected event), and revisions (any program
revision that names the event, or null when a claimed teammate does not allow programs).
- A corrected resend overwrites its earlier rejected row in place; only the send count
(
attempts) remains from the earlier attempts. - Disconnecting a source route deletes the events stored for that source.
Batching and retries
- Send what you have in one request: up to 500 events for one teammate, up to 1,000 across teammates, at most 1 MB.
- A request over a limit is refused as a whole:
422with codevalidation_failedfor an empty or oversized list of events,413with codepayload_too_largefor a body over 1 MB. Split it and send the parts. - When a request fails with a
429, a5xxor a network error, send the same request again. Events that were already stored answerduplicate, so a retry never stores an event twice. - Events for the same teammate are decided in the order you list them.