TruehandsDocs
engine 0.4.0 API Back to site

DocsIntegrate

REST API

Everything the CLI and the console do goes through one HTTP API. Scripts authenticate with HTTP Basic (a TH-Key and TH-Secret-Key pair), upload files and get back dl:// ids, start a run that names those ids, then follow it live or poll it. This page is the guide; the API reference lists every operation, generated from the OpenAPI 3.1 document the server serves at /v1/openapi.json (the same document as contracts/cloud-api.json).

Conventions#

  • Base URL: your Truehands server, for example https://app.truehands.io. Every path starts with /v1/.
  • JSON in and out. Requests with a body (POST, PUT, PATCH) must send Content-Length (otherwise 411 length_required); a JSON body may be at most 8 MiB.
  • Times are ISO 8601. Times you send, such as a clip's submitted_at, must carry a time zone.
  • Ids: runs look like run_9b1f04c2e7aa, uploads like dl://c5a5b380fe6841f5. Your own ids (clips, contributors, devices, upload custom_id) match ^[A-Za-z0-9_-]{1,64}$; program slugs match ^[a-z0-9][a-z0-9-]{1,47}$.
  • Tenancy: every query is scoped to the caller's organisation. Another organisation's run answers 404, exactly like a run that does not exist.
  • Caching: API responses carry Cache-Control: no-store, except signed media and status badges.

Errors#

Every error has the same body:

JSON
{"error": {"code": "codec_not_allowed", "message": "video codec vp9 is not accepted"}}

code is stable and machine-readable; message is for people.

StatusCodes you will seeWhen
400invalid_requestMalformed body or parameter.
401unauthorized, session_expired, wrong_passwordMissing or wrong credentials; an ended session.
403forbidden, humans_only, step_up_requiredThe role, or a limited key pair, lacks the permission (the message names it); the action needs a person signed in with a password; the password must be confirmed again.
404not_found, store_offNo such object in your organisation. store_off: the Truehands Store is not set up on this server (the Truehands Store).
409conflict, idempotency_conflict, already_active, simulation_required, media_deleted, destination_disabled, no_destinationThe object's state does not allow it. media_deleted: the run names an upload, or re-runs a run, whose footage was deleted under the retention period; upload the file again to use it. destination_disabled, no_destination: a backup to a destination that is off, or with none on. store_not_connected, already_connected, not_ready, already_sending: see the Truehands Store, whose own codes (such as invalid_transition or quote_expired) also pass through.
410media_deletedA signed link to a video, sensor log, evidence frame or report whose footage was deleted, or a run archive with footage once the run's footage is gone.
411length_requiredNo Content-Length on a request with a body.
413over_limitsThe body is larger than the server accepts.
415unsupported_typeAn upload that is not .mp4, .mov or .csv.
422invalid_manifest, unknown_upload, wrong_upload_kind, over_limits, intake codes, invalid_endpoint, invalid_bucket, invalid_prefix, invalid_region, invalid_credentials, too_many_destinationsThe request is well formed but cannot be accepted. The invalid_* codes and too_many_destinations are about backup destinations.
429too_many_attempts, queue_full, too_many_streams, too_many_testsSlow down. queue_full and too_many_tests carry Retry-After.
502store_unavailable, store_refusedThe Truehands Store did not answer, answered with an error, or refused this server's signature (an operator's setting).
503secrets_unavailableThe server cannot seal a backup destination's secret: its secrets key is missing or malformed.
504store_timeoutThe Truehands Store did not answer in time.
507insufficient_storageThe server is low on disk space and takes no uploads for now.

Authentication#

Key pairs (scripts and CI)#

Scripts, CI and the CLI send a key pair with HTTP Basic: the TH-Key (thk_…, a public id that is safe to show and log) as the user and the TH-Secret-Key (ths_…) as the password:

Shell
curl -u "$TRUEHANDS_KEY:$TRUEHANDS_SECRET_KEY" https://app.truehands.io/v1/me

Make a pair in the console under Settings → API keys. The TH-Secret-Key is shown once, when the pair is made, and the server keeps only its hash. Each person can hold up to ten active pairs, each with a label and an optional expiry (1–365 days); making one needs a person signed in (with a password or single sign-on) and confirmed in the last ten minutes, so a key can never make another key.

EndpointWhoWhat
GET /v1/me/keysanyoneyour active pairs: id (the TH-Key), label, hint (last four characters of the secret), created_at, last_used_at, expires_at, scope, and programs when the pair is limited to some
POST /v1/me/keyskeys.create: a person, password confirmed in the last 10 minutes{"label", "expires_in_days", "permissions", "programs"} → 201 {"key", "th_key", "th_secret_key"}; permissions and programs are optional (limited key pairs, program scopes)
PATCH /v1/me/keys/{key_id}narrowing: a person signed in with a password; widening: as for making a keychange your pair's permissions and programs (editing a key's limits)
DELETE /v1/me/keys/{key_id}a person signed in with a passwordrevoke one of your pairs
GET /v1/team/keysteam.viewevery active pair in the organisation, with its member, scope and programs, and the paused pairs of members single sign-on deactivated because no mapping rule matches them ("suspended": true; see SSO)
PATCH /v1/team/keys/{key_id}team.revoke_key, signed in with a passwordnarrow any pair in the organisation, never widen it
DELETE /v1/team/keys/{key_id}team.revoke_key, signed in with a passwordrevoke any pair in the organisation

Expired or revoked pairs get 401 at once, and so do console sessions opened with them. After 10 failed attempts within five minutes for one username or one client address, further attempts get 429 too_many_attempts.

For CI, create a service account (role ci) under Team & keys: a key pair, no password, no console. Its key can be limited too, for example to uploading and starting runs, and the account can be limited to some programs. GET /v1/me (or truehands whoami) shows who a key belongs to, its role and what it may do, without revealing it.

Sessions (the console)#

People sign in to the console with a password, or with their organisation's identity provider (single sign-on), and receive a bearer token:

Shell
curl -X POST https://app.truehands.io/v1/session -H 'Content-Type: application/json' \
  -d '{"username": "dana", "password": "a long sentence works well"}'
# {"token": "...", "expires_at": "...", "method": "password", "user": {...}}

curl -H "Authorization: Bearer $TOKEN" https://app.truehands.io/v1/me

A session lasts 12 hours. DELETE /v1/session ends it. A single sign-on session ("method": "sso", from POST /v1/sso/session) is a person's session exactly like a password one. When an organisation requires single sign-on, a password signs in only its owners; others get 403 sso_required. A session can also be opened with a key pair ({"username": "thk_…", "access_key": "ths_…"}), but it is marked as opened with a key and never passes a human-only check: whoever holds a key may be a script. Service accounts cannot open sessions at all.

Actions only a person can take#

Some actions move money or loosen rules. Their permissions are human-only: they need a person whose role holds them signed in to the console, with a password or with single sign-on; a key pair, a key-opened session or a service account gets 403 humans_only. The most sensitive also need a confirmation within the last 10 minutes, or the server answers 403 step_up_required: the password typed again (POST /v1/session/step-up), or, for a single sign-on session, a new sign-in at the identity provider (POST /v1/sso/step-up, see confirming). Signing in counts as a confirmation.

  • activating a policy, and the two approvals a loosening change needs;
  • deciding, confirming or reverting a clip on the review desk;
  • releasing a contributor's hold or a run's payout hold;
  • approving a payout batch (two different people);
  • promoting a re-run so it counts for payouts;
  • changing a webhook endpoint's URL or rotating its secret;
  • adding a backup destination, changing its credentials or where it writes, turning its footage on, and deleting it (password confirmed recently);
  • managing members, owners, service accounts and custom roles;
  • setting up single sign-on, its group mapping rules and the SCIM token (password confirmed recently);
  • ordering from the Truehands Store: sending briefs, accepting or declining quotes, buying, pausing or cancelling, reporting clips; and connecting the organisation to the store or disconnecting it (password confirmed recently; see the Truehands Store);
  • erasing a contributor's data (owners only, password confirmed recently; see erasure).

Roles and permissions#

Every check the server makes names one permission, such as runs.start, backups.manage or sources.manage (watchers: where the footage comes from). Reading is a permission too (runs.view, backups.view). The catalog of 88 permissions lives in truehands/server/permissions.py, with each one's flags: some need a person signed in with a password, some also a password confirmed in the last 10 minutes. A role is a set of permissions. The built-in roles cannot be changed:

RoleIdWhat it may doPermissions
OwnerownerEverything an admin can do, plus managing owners, footage retention and erasing a contributor's data. Every organisation keeps at least one.88
AdminadminManage people, roles, service accounts, programs, policies, delivery, backups, the data store and the audit log.85
ReviewerreviewerUpload footage, start and cancel runs, decide reviews, and see every result and the data store's orders.32
ViewerviewerRead-only: runs, clips, evidence, reports, contributors, payout batches and the data store's orders.25
OperatoroperatorRuns tests: uploads footage, starts and cancels runs, and sees results. Changes no settings and decides no reviews.11
Service accountciFor scripts and CI. Key pair only: no password and no console.27
PermissionOwnerAdminReviewerViewerOperatorCINeeds
Runs & uploads
View runs and results runs.view✓✓✓✓✓✓
View uploads uploads.view✓✓✓✓✓✓
Upload footage uploads.create✓✓✓✓✓
Start runs runs.start✓✓✓✓✓
Cancel runs runs.cancel✓✓✓✓✓
Tag runs runs.tag✓✓✓✓
Retry failed runs runs.retry✓✓✓
Reorder the queue runs.prioritize✓✓✓
View the run queue and status queue.view✓✓✓✓✓✓
Share saved views views.share✓✓✓
Delete others' shared views views.manage✓✓
Download footage footage.download✓✓
Review
See review status review.status✓✓✓✓✓✓
View the review queue review.view✓✓✓✓
See every reviewer's stats review.team_stats✓✓✓
Decide reviews review.decide✓✓✓person
Assign review work review.assign✓✓person
Reopen and revert decisions review.override✓✓person
Read reviewers' notes review.notes✓✓person
Answer spot checks review.spot_check✓✓✓person
Contributors
View contributors contributors.view✓✓✓✓
Watch contributors contributors.watch✓✓✓
Hold contributors' pay contributors.hold✓✓✓
Release contributor holds contributors.release✓✓person
Erase a contributor's data contributors.erase✓person, password confirmed, owner only
Analytics
View analytics analytics.view✓✓✓✓
Export analytics analytics.export✓✓✓✓
Change cost assumptions analytics.manage✓✓person, all programs
View pilots and their reports pilots.view✓✓✓✓
Set up pilots and draw spot checks pilots.manage✓✓person
Programs & policies
View programs programs.view✓✓✓✓✓✓
Create programs programs.manage✓✓all programs
View policies policies.view✓✓✓✓✓
Draft policies policies.edit✓✓✓
Activate policies policies.activate✓✓person
Release run payout holds runs.release_hold✓✓person
Promote re-runs runs.promote✓✓person
Sources & automation
View watchers sources.view✓✓✓✓✓
Set up watchers sources.manage✓✓
Pause, resume and flush watchers sources.control✓✓✓
Send clips to an API inbox sources.submit✓✓✓
View schedules schedules.view✓✓✓✓✓
Set up schedules schedules.manage✓✓
Run schedules now schedules.run✓✓✓
Integrations & library
View CI templates and pipelines ci.view✓✓✓✓✓✓
View status badges badges.view✓✓
Create and revoke status badges badges.manage✓✓person
View cross-run memory library.view✓✓✓✓✓
Remove runs from cross-run memory library.manage✓✓person
Delivery & payouts
View events events.view✓✓✓✓✓
Read the verdict ledger verdicts.view✓✓✓✓✓
View webhooks webhooks.view✓✓all programs
Manage webhooks webhooks.manage✓✓all programs
Change webhook URLs webhooks.change_url✓✓person, all programs
Rotate webhook secrets webhooks.rotate_secret✓✓person, all programs
View exports exports.view✓✓✓✓✓
Create exports exports.create✓✓✓
Download exports exports.download✓✓✓
Delete others' exports exports.manage✓✓
View payout batches payouts.view✓✓✓
Prepare payout batches payouts.prepare✓✓
Approve payouts payouts.approve✓✓person
Void payout batches payouts.void✓✓person
Backups
View backups backups.view✓✓all programs
Edit backup destinations backups.edit✓✓all programs
Set up backups backups.manage✓✓person, password confirmed, all programs
Run backups backups.run✓✓all programs
Data store
View the data store store.view✓✓✓✓all programs
Order from the data store store.order✓✓person, all programs
Connect the data store store.manage✓✓person, password confirmed, never in a custom role, all programs
Organisation
View usage usage.view✓✓✓✓✓
View footage retention retention.view✓✓✓✓✓✓
Shorten footage retention retention.manage✓person, password confirmed, owner only, all programs
Team & access
Create your own key pairs keys.create✓✓✓✓✓person, password confirmed
Rotate your own access key (deprecated) access_key.rotate✓✓✓✓not on a limited key
See the team team.view✓✓all programs
View the audit log audit_log.view✓✓all programs
Invite people team.invite✓✓person, never in a custom role, all programs
Change roles team.change_role✓✓person, never in a custom role, all programs
Make admins team.make_admin✓✓person, password confirmed, never in a custom role, all programs
Manage owners team.manage_owners✓person, password confirmed, owner only, all programs
Make password links team.password_link✓✓person, password confirmed, never in a custom role, all programs
Deactivate members team.deactivate✓✓person, password confirmed, never in a custom role, all programs
Revoke members' keys team.revoke_key✓✓person, never in a custom role, all programs
Manage service accounts service_accounts.manage✓✓person, password confirmed, never in a custom role, all programs
Manage custom roles roles.manage✓✓person, password confirmed, never in a custom role, all programs
View single sign-on settings sso.view✓✓all programs
Set up single sign-on sso.manage✓✓person, password confirmed, never in a custom role, all programs

Every person, whatever their role, can also sign in, change their own password and revoke their own key pairs. The rules about owners stay with the owner role: only an owner invites, promotes, changes or deactivates an owner, the last active owner stays, and nobody changes their own role. Making someone an admin needs a fresh password.

Roles from the identity provider. With single sign-on, an organisation can give roles from its identity provider's groups, with an ordered list of mapping rules: the first rule that names one of a person's groups gives their role and programs, and an optional default rule applies when none does. A person holds one role, so the first match wins and there is no mix. Rules follow the rules above: they never give owner, nobody saves one that gives a permission they lack, and one that gives admin needs team.make_admin. Members the rules give a role to are managed by SSO: their role and programs follow their groups at each sign-in and SCIM change, a change by hand is refused (409 managed_by_sso) until an owner or admin detaches them, and a mapping may demote an admin. Owners are never managed.

In the last column, "all programs" marks a permission that acts on the whole organisation: a request limited to some programs never holds it (program scopes).

GET /v1/team/roles returns this matrix as the server enforces it, generated from the catalog and with the organisation's custom roles: roles (each with role, name, description, kind, builtin and permissions), actions (one per permission: action, label, group, description, roles (role → true or false), human, fresh, grantable, owner_only, scopable, implies, program (it acts on one program's data) and whole_org (it acts on the whole organisation)), groups and always. Every member may read it.

GET /v1/me returns role, role_name, permissions and programs, plus sso (whether the account is linked to the identity provider and managed by it): what this very request may do and see, narrowed to the key pair's limits when it came with a limited one (limited: true for a permission limit). Roles and limits are read on every request, so a role change, an edited custom role or a new program list applies at once; there is nothing to wait for or sign out of.

Custom roles#

Owners and admins can define the organisation's own roles from the permissions a custom role may hold, for example "QA runner" (upload footage, start and cancel runs) or "Data engineer" (backups and exports, nothing about the team). What a permission needs comes with it: runs.start brings runs.view and programs.view.

EndpointWhoWhat
GET /v1/team/roles/customteam.view{"roles": [{"id", "name", "description", "permissions", "members", "pending_invites", "created_at", "updated_at"}], "max", "grantable"}
POST /v1/team/roles/customroles.manage{"name", "description", "permissions"} → 201 the role; its id looks like rol_4b1f9c0e2a7d
PATCH /v1/team/roles/custom/{id}roles.manageany of name, description, permissions (the full new list)
DELETE /v1/team/roles/custom/{id}?replacement=ROLEroles.manage{"deleted", "replacement", "reassigned_members", "reassigned_invites"}
GET /v1/team/members/{id}/permissionsteam.viewa member's permissions and programs and, for each of their key pairs, what it may do (permissions) and see (effective_programs)

roles.manage needs a person whose password was confirmed in the last 10 minutes, and every change is in the audit log (role.created, role.updated with the permissions added and removed, role.deleted).

  • Never in a custom role. Inviting people, changing roles, deactivating members, password links, revoking other people's keys, managing roles and service accounts, and what only owners do (footage retention, owners) are refused with 422 invalid_permissions. Delegating them means making the person an admin. Reading the team and the audit log may be granted.
  • Nobody grants what they lack. A role, an invite or a role change that would give a permission the person making it does not hold is refused.
  • Giving a role. PATCH /v1/team/members/{id} and POST /v1/team/invites take a custom role's id as role, like a built-in one. Unknown ids, and other organisations' roles, are 422 invalid_role.
  • Deleting a role people hold. While members (active or deactivated) or pending invites hold it, DELETE answers 409 role_in_use unless replacement names the role they get instead (not owner; admin needs the right to make admins). Each reassigned member gets a member.role_changed row in the audit log.
  • Service accounts keep the ci role. To narrow one, limit its key pair instead (below), or limit the account to some programs (program scopes).

Limited key pairs#

POST /v1/me/keys with "permissions": ["uploads.create", "runs.start"] makes a key pair that can only upload and start runs (and see the runs and programs that needs). Leave permissions out for a pair with all of your permissions, now and as they change, as before.

  • A request made with the pair gets the intersection of its scope and its user's permissions at the time of the request: when you lose a permission, the key loses it too. A console session opened with the pair keeps its limit.
  • A scope can only list permissions you hold and a key can use: human-only permissions never pass with a key, and a limited key cannot rotate the legacy access key (422 invalid_scope).
  • scope (the list, or null for no limit) shows in GET /v1/me/keys, GET /v1/team/keys and GET /v1/me, and the audit log records it on key_pair.created.
  • A pair can also be limited to some programs ("programs": ["home"], see program scopes), and both limits can change later (editing a key's limits).
  • Service accounts: POST /v1/team/service-accounts and POST /v1/team/service-accounts/{id}/key take the same optional permissions, from what the ci role may do, and programs. A service account whose key pair is limited gets no legacy access key, since that one could not be limited.
  • A key that creates programs. The ci role does not hold programs.manage, so a service account's key cannot create programs. An admin's key pair limited to ["uploads.create", "runs.start", "runs.view", "programs.manage"] can: it uploads, starts and reads runs, creates programs and adds tasks to them, and nothing else. This is the key the Truehands Store audits contributors' uploads with. programs.manage acts on the whole organisation, so a key that is also limited to some programs does not hold it.

Program scopes#

A company running several collection programs, sometimes with a contractor per program, can limit a person, a service account or a key pair to some of them: this person, or this CI account, sees and acts on programs A and B only.

  • Who can be limited. A member who is not an owner or admin, a pending invite, a service account and a key pair. Owners and admins manage the whole organisation, so a list on them is refused (422 invalid_programs), and making a limited member an admin removes their list.
  • What a request sees. Its member's programs intersected with its key pair's, the way a key's permission scope narrows its role. A console session opened with a key keeps the key's programs. The server stores program ids, so renaming a program moves no grant, and a program that no longer exists grants nothing.
  • Who sets them. Nobody limits themselves, and limiting someone never needs more than changing their role would:
EndpointWhoWhat
PATCH /v1/team/members/{id}team.change_role{"programs": ["home", "kitchen"]} (slugs or ids), or null for every program; with or without role and name
POST /v1/team/invitesteam.inviteprograms: the list the person gets when they join
POST /v1/team/service-accountsservice_accounts.manageprograms for the new service account
PATCH /v1/team/service-accounts/{id}service_accounts.manage, password confirmed in the last 10 minutesany of name, description and programs
POST /v1/me/keys, PATCH /v1/me/keys/{key_id}as for making a keyprograms: some of the programs you may see

Every change is in the audit log: member.programs_changed and service_account.updated with from and to (slugs, or all), and the list on invite.created, invite.accepted, service_account.created, key_pair.created and key_pair.limits_changed.

What a limited request gets:

CaseAnswerFor example
One object of another program404 not_found, as if it did not exista run and everything under it, a clip, a review item or decision, a policy version, an export, a payout batch, a watcher, a schedule, a badge, a saved view, an upload, a program, a pilot that covers any program outside the request's (with its report, export and spot checks)
Creating or acting inside another program403 forbidden, saying the access is limitedstarting a run, setting up a watcher or a schedule that targets it, an export, a payout batch, a policy draft, lint, simulation or activation, a badge, a saved view that filters on it, a pilot that covers it
A list or a totalonly the request's programsruns, tags, the review queue and its counts, the decisions ledger and review stats, the verdict ledger, events, exports, payout batches, watchers, schedules, search, the overview's KPIs and trends, usage, CI pipelines and badges, cross-run memory, contributors, pilots (those whose every program the request may see)
A filter that names another program404 not_foundGET /v1/review/items?program=…, GET /v1/exports?program=…
A batch naming other programs' objectsthose are skipped as not_foundPOST /v1/review/assign, POST /v1/review/bulk, POST /v1/holds
  • Contributors. A contributor is shown only when every clip of theirs is in the request's programs, with a score, links and rings computed from those programs alone. One who also submits to another program cannot be shown soundly, since their risk, links and pay hold cover every program: their page, clips and timeline answer 403 forbidden, holding, releasing, watching or erasing them is refused, and POST /v1/holds reports them as outside_scope. Their clips in your programs stay visible in runs, the review desk and the clip history, which counts your programs only.
  • Uploads. An upload belongs to no program until a run uses it. A limited request sees and may run only the uploads it holds: the ones it made, the ones whose bytes it sent again, and those its programs' runs use. Knowing an upload's id or sha256 is not holding it, so a lookup by sha256 finds only those too. Sending bytes the server already has answers with the existing upload ("duplicate": true) and makes it yours to use; that is what the CLI does when its sha256 lookup finds nothing.
  • Cross-run findings. When a clip matches an earlier clip in another program, the verdict and the finding stay, with their code, severity and numbers, but the earlier clip, its run and its contributor are left out: the detail reads "Matches an earlier clip in a program outside your access" and the evidence says "outside_scope": true. This holds for every JSON response (the server scrubs them on the way out, wherever a finding appears), and for the earlier clip's video and frame. A run archive made for a limited request leaves out frames of earlier clips in other programs, and its manifest.json says "other_programs": false. The verdict ledger, exports, events and CSV files carry reason codes only, never a finding's detail.
  • The queue. GET /v1/queue lists your programs' runs; its meters (parallel runs in use, runs queued) and each run's position count every program, because the limits are shared. GET /v1/status reports your programs' watchers and last 24 hours.

Refused to a limited request#

These permissions act on the whole organisation and cannot be narrowed to some programs, so a request limited to some programs does not hold them, even when its role does. They are missing from its permissions in GET /v1/me, and their endpoints answer 403 forbidden with a message saying why:

PermissionWhat it does
Change cost assumptions analytics.manageSet the manual review and Truehands rates behind Est. saved.
Create programs programs.manageCreate collection programs and add tasks to them.
View webhooks webhooks.viewWebhook endpoints, their deliveries and attempts.
Manage webhooks webhooks.manageAdd, filter, turn off, delete and test endpoints, and resend deliveries.
Change webhook URLs webhooks.change_urlPoint an existing endpoint at another URL.
Rotate webhook secrets webhooks.rotate_secretGive an endpoint a new signing secret.
View backups backups.viewBackup destinations, their last backup and the backup jobs.
Edit backup destinations backups.editRename destinations, turn them on or off, include evidence or leave footage out.
Set up backups backups.manageAdd and delete destinations, change where they write or their credentials, and include footage.
Run backups backups.runTest a destination, back a run up now and back up past runs.
View the data store store.viewThe Truehands Store's catalog, the organisation's orders with their quotes, progress and timeline, its deliveries (download them, audited), reports and payments, and whether the organisation is connected.
Order from the data store store.orderWrite and submit briefs, accept or decline quotes, pause, resume, cancel or close orders, buy datasets, accept the Dataset Licence, report delivered clips and confirm deleting withdrawn ones. Commits the organisation's money.
Connect the data store store.manageConnect the organisation to the Truehands Store, accepting the Store Terms for it, accept a new version of them, and disconnect it.
Shorten footage retention retention.manageShorten how long the organisation's footage is kept, or restore it.
See the team team.viewMembers and their permissions, invites, service accounts and every key pair, with custom roles.
View the audit log audit_log.viewRead and export the organisation's audit log.
Invite people team.inviteInvite people with a role that is not admin or owner, and revoke invites.
Change roles team.change_roleChange the role and name of members who are not admins or owners.
Make admins team.make_adminInvite admins, or make a member an admin.
Manage owners team.manage_ownersInvite owners, make a member an owner, and change or deactivate owners.
Make password links team.password_linkA one-time link for a member to set their password. Admins make them for members who are not admins.
Deactivate members team.deactivateDeactivate and reactivate members.
Revoke members' keys team.revoke_keyRevoke any member's or service account's key pairs and access key.
Manage service accounts service_accounts.manageCreate service accounts and rotate their key pairs.
Manage custom roles roles.manageCreate, edit and delete the organisation's roles.
View single sign-on settings sso.viewThe identity provider settings, the group mapping rules and the SCIM token's status. Never the client secret or the token itself.
Set up single sign-on sso.manageSet the identity provider, require single sign-on, edit the group mapping rules and make or revoke the SCIM token. Rules that give admin also need Make admins.
EndpointsWhy
everything under /v1/team/ (members, invites, keys, custom roles, service accounts) and /v1/audit-logthe team and its history belong to the whole organisation, and member views name every program
/v1/webhook-endpoints/… and /v1/webhook-deliveries/…a webhook delivers every program's events
/v1/backups/… and POST /v1/runs/{id}/backupbackups copy every program's runs to the organisation's buckets
PUT /v1/analytics/settingsthe cost assumptions are the organisation's
POST /v1/programs, POST /v1/programs/{slug}/tasksa new program would be outside the creator's own list; managing programs is the organisation's
PUT /v1/org/retentionfootage retention covers every program (owners, who are never limited)
everything under /v1/store/orders, deliveries and the link to the Truehands Store are the whole organisation's, not a program's

GET /v1/delivery/summary answers with "webhooks": null. A key limited to programs cannot hold one of these permissions either (422 invalid_scope).

Where the limits show. GET /v1/me returns programs: null for every program, or [{"id", "slug", "name"}]; truehands whoami prints it on its programs line. Member views (GET /v1/team/members and the member PATCH) carry each member's programs, invites carry theirs, the invite link preview names them, and key views carry programs when the key is limited to some.

Editing a key's limits#

A key pair's limits can change after it is made. Send permissions, programs or both: each is a list, or null to remove that limit, and a field left out stays as it is. The checks for making a key apply (422 invalid_scope, 422 invalid_programs): nothing beyond what the key's owner holds and sees.

EndpointWhoWhat
PATCH /v1/me/keys/{key_id}narrowing: a person signed in with a password; widening: keys.create and a password confirmed in the last 10 minutesyour own key. Widening is adding a permission or a program, or removing a limit.
PATCH /v1/team/keys/{key_id}team.revoke_key, signed in with a passwordnarrow any member's or service account's key, never widen it (403 forbidden): narrowing is less than revoking. Owners' keys only by an owner.
PATCH /v1/team/service-accounts/{id}/keys/{key_id}service_accounts.manage, password confirmed in the last 10 minutesa service account's key, narrower or wider, from what the ci role may do and the service account's programs
  • A key never edits a key: a key pair, or a session opened with one, gets 403 humans_only.
  • The new limits apply from the key's next request, to console sessions opened with it too.
  • Each change is in the audit log as key_pair.limits_changed, with before and after (permissions and programs) and whether it widened the key.

Uploads#

POST /v1/uploads takes one file as multipart form field file, and an optional custom_id. Video must be .mp4 or .mov; a motion-sensor log is a .csv.

Shell
curl -u "$TRUEHANDS_KEY:$TRUEHANDS_SECRET_KEY" -X POST https://app.truehands.io/v1/uploads \
  -F "file=@clips/s0001.mp4" -F "custom_id=s0001"
JSON
{"id": "912e2fb235de36c2", "upload_url": "dl://912e2fb235de36c2", "kind": "video", "filename": "s0001.mp4",
 "custom_id": "s0001", "bytes": 2113070, "sha256": "cac5…", "canonical_sha256": "995a…", "seconds": 15.0,
 "created_at": "2026-11-03T19:28:09+00:00", "has_audio": false, "rotation": 0,
 "video": {"codec": "h264", "width": 960, "height": 536, "fps_declared": 30.0, "timing_mismatch": false},
 "duplicate": false}
  • Checked on arrival. Video is measured with the engine's strict reader, so a file that is not MP4/MOV with exactly one H.264 or HEVC stream within limits is refused now, with its intake code (unreadable_file, ambiguous_streams, codec_not_allowed, over_limits), instead of failing a run later. A sensor log must start with the header ['t', 'gx', 'gy', 'gz', 'ax', 'ay', 'az'] and have numeric rows.
  • Deduplicated. Uploading bytes your organisation already has returns the existing upload with "duplicate": true. GET /v1/uploads?sha256=<hex> checks before sending, which is how the CLI skips files the server already holds. A member or key limited to some programs sees only the uploads it holds: its own, those whose bytes it sent again, and those its programs' runs use.
  • Audio and rotation. has_audio says whether the file carries an audio track, and rotation is its display rotation in degrees (0, 90, 180 or 270, from the video stream's display matrix or its rotate tag). Both come from the probe that measures the video on arrival, and GET /v1/uploads/{ref} and the list return them too. They are null for sensor logs, and for videos uploaded before the server reported them.
  • Size. The server's --max-upload-mb sets the limit (default 2048). Uploading needs uploads.create, which viewers do not hold.

Programs#

Shell
curl -u "$TRUEHANDS_KEY:$TRUEHANDS_SECRET_KEY" -X POST https://app.truehands.io/v1/programs \
  -H 'Content-Type: application/json' \
  -d '{"slug": "home-tasks", "name": "Home tasks", "tasks": ["washing dishes", "folding laundry"],
       "pay_rate_usd_per_hour": 15, "capture_app": "HomeTasks/2.3", "max_clip_seconds": 900}'

tasks is 1-200 unique names; pay_rate_usd_per_hour is more than 0 and at most 1000; max_clip_seconds at most 3600; capture_app is optional and turns on the not_from_capture_app check. Creating a program needs programs.manage (owners and admins), and access to every program: a new program would be outside a limited member's list. A slug that exists already is 409 conflict. GET /v1/programs lists them, with their id; a member or key limited to some programs sees only those.

Adding tasks. A program's tasks only grow. POST /v1/programs/{slug}/tasks with {"tasks": ["mopping the floor"]} adds them after the ones the program has and returns the program with added, the tasks this call added. A task the program already has is left as it is, so a retry adds nothing twice; nothing changes or removes a task. Each run keeps the task list it was made with, so a task added later never reaches a run already made, even one still queued, and new runs may claim the new tasks. A program holds at most 200 tasks (422 too_many_tasks). It needs programs.manage and is audited as program.tasks_added.

Runs#

POST /v1/runs queues a run over uploads you own:

JSON
{
  "program": "home-tasks",
  "name": "Week 41",
  "tag": "weekly",
  "source": "api",
  "meta": {"repo": "data/batches", "branch": "main", "commit": "4f2a9c1"},
  "clips": [
    {"clip_id": "s0001", "upload": "dl://912e2fb235de36c2", "contributor_id": "c07", "device_id": "dev-6bf4",
     "claimed_task": "making the bed", "submitted_at": "2026-10-01T08:58:00+00:00"},
    {"clip_id": "s0004", "upload": "dl://f805c5410561127b", "imu_upload": "dl://d554465a3d5fc141",
     "contributor_id": "c12", "device_id": "dev-5712", "claimed_task": "slicing vegetables",
     "submitted_at": "2026-10-01T16:45:00+00:00"}
  ]
}
  • name is 1-120 characters, tag at most 40, clips 1-5000. source is one of api, cli, console, ci, automation. meta accepts only these keys: repo, branch, commit, ci_provider, ci_url, pr, actor, trigger, source_prefix, policy, rerun_of, schedule.
  • Each clip is validated before anything is queued. A bad id, a clip id given twice, a task the program does not have, or a submitted_at without a time zone is 422 invalid_manifest naming the clip (clips[3].claimed_task: …). An upload that is not yours is unknown_upload; a video where a sensor log belongs is wrong_upload_kind; a clip longer than the program allows is over_limits.
  • When the run queue is full the answer is 429 queue_full with Retry-After.

Idempotency. Send an Idempotency-Key header (8-128 characters of A-Za-z0-9_.:-) to make retries safe. Repeating the request with the same key returns the run it created, with 200 and Idempotent-Replay: true, without auditing or billing the footage again. The same key with a different body is 409 idempotency_conflict.

The run object (GET /v1/runs/{run_id}) carries id, name, status (queued, running, done, failed, cancelled), phase, progress (0 to 1), clips_total, clips_done, counts (accept, partial, review, reject, pending), billable_hours, flagged_share, quality_gate (result, payout_hold), the policy it was decided with, timing, dashboard_url and error. A finished run adds summary, usage, engine, gates and artifacts: signed links to report.html, audit.json and usage.json that expire after 1 hour. media_expires_at says when the run's footage will be deleted under the retention period; once any of it is gone, media_deleted is true, media_deleted_at says when, the report.html link is null and the run can no longer be re-run. media_warning_at is when the run enters its warning window (the run.media_expiring event). A done run's GET also carries backups: one entry per backup destination that is on or has a backup of the run, with destination_id, name, status (queued, running, done, failed, or null before any backup), finished_at, objects, bytes, error (a code and a plain message, never what the storage service wrote), backed_up (a full backup finished at least once), attempts, next_attempt_at and location.

OperationWhat it does
GET /v1/runsList runs: filter by status, program, branch, tag, tags, q, since, until, has, mine, started_by.
POST /v1/runs/{run_id}/cancelCancel a queued or running run (409 otherwise).
POST /v1/runs/{run_id}/retryQueue a failed run again under the same id.
POST /v1/runs/{run_id}/rerunAudit the same clips with the current engine and policy; free, not in payouts until promoted.
GET /v1/runs/{run_id}/logs?after=NThe engine log, paged by sequence number.
GET /v1/runs/{run_id}/gatesThe quality gate: overall result, each gate's observed value and threshold, the payout hold.
GET /v1/runs/{run_id}/reviewWhether people have finished reviewing the run and its payout can go ahead.

Clips#

GET /v1/runs/{run_id}/clips lists a run's clips, worst first: clip_id, contributor_id, device_id, claimed_task, submitted_at, status, duration_s, payable_s, the reason codes and the main_reason with its detail. Filter with status=flagged (partial, review or reject) or one verdict, and q to search ids and tasks.

GET /v1/runs/{run_id}/clips/{clip_id} adds everything the engine found: the full reasons with evidence, the task, idle and sensor results, the measured stream facts and hashes, billable_s, the clip's lines of the engine log, and media: signed links to the video, the thumbnails, the matched evidence frames and the matched clip's video. After the footage is deleted these links are null and media_deleted is true; the verdict, reasons and findings stay. GET …/decision explains how the policy decided the clip, rule by rule, and what the Truehands default would have said. It also carries:

  • reason_codes: the reason codes alone, safe to show anyone. The reasons objects add severity, detail and evidence, which can name other clips and contributors.
  • idle: the engine's idle_seconds, idle_runs and per-second motion, and segments, the idle stretches as [[start_s, end_s], ...]. active_seconds is the clip's duration_s less its idle seconds.
  • faces: {"sampled_frames", "frames_with_faces", "max_faces"}, faces the engine's face model found on one frame every 2 s (at most 60 frames a clip). null when the engine did not count them: a clip refused at intake, a run that is not done, or a run audited before engines counted faces.
  • has_features: whether the clip's frame embeddings are in the organisation's feature cache (GET …/features, below).

Clip details in pages#

A client that audits footage in batches reads every clip's detail in a few requests:

Shell
curl -u "$TRUEHANDS_KEY:$TRUEHANDS_SECRET_KEY" \
  "https://app.truehands.io/v1/runs/run_1a2b3c4d5e6f/clips?detail=true&limit=200"
# {"clips": [{"clip_id": "s0001", "status": "partial", "payable_s": 11.0, "faces": {...}, ...}], "next_cursor": "czAyMDA"}
  • limit (1-500) returns a page of at most that many clips in clip id order, and next_cursor: pass it as cursor for the next page; it is null on the last one. Pages stay stable while reviewers and policies change verdicts. status and q filter as usual. Without limit, the list is as it always was: every clip, worst first, and no next_cursor.
  • detail=true gives each clip what GET …/clips/{clip_id} returns without media (no signed links), the log lines, prev, next, position and program_tasks: the task, the verdict (status), payable_s, billable_s, reasons and reason_codes, measure, idle with its segments, active_seconds, imu, faces and has_features.
  • A cursor without limit is 400 invalid_request, and one the server did not send 400 invalid_cursor.

Frame embeddings#

GET /v1/runs/{run_id}/clips/{clip_id}/features returns the engine's frame embeddings of one clip as an .npz file (application/octet-stream), read from the organisation's feature cache:

ArrayWhat
embeddingsfloat16, shape [n, 512]: one unit-length image embedding per frame, at 2 frames a second
tfloat32, shape [n]: each frame's time in seconds
modela 0-d string array naming the model the embeddings come from
Python
import io, numpy as np
f = np.load(io.BytesIO(response.content))   # no pickles: allow_pickle stays False
f["embeddings"].shape, f["t"][:3], str(f["model"])

It needs runs.view and follows program scopes like every clip route. Numbers only, no pixels: retention keeps the cache when it deletes footage, as copy detection reads it. Errors: 404 not_found for an unknown run or clip (or one outside your programs); 404 no_features for a clip the engine never analysed (refused at intake); 409 run_not_done while the run has not finished; 410 features_expired once the cache entry is gone, which erasing the contributor or deleting the organisation does.

Live events (Server-Sent Events)#

GET /v1/runs/{run_id}/events streams a run as it happens. This is what truehands run --wait, truehands watch and the console's run page read.

Shell
curl -N -u "$TRUEHANDS_KEY:$TRUEHANDS_SECRET_KEY" "https://app.truehands.io/v1/runs/$RUN/events?log=1"
Text
retry: 3000

id: 41
event: snapshot
data: {"cursor":41,"run":{...},"live":{...},"decided":[...]}

id: 57
event: clip
data: {"seq":57,"clip_id":"s0004","contributor_id":"c12","status":"accept","codes":[],"duration_s":15.0,"provisional":true}

event: progress
data: {"status":"running","phase":"analysing clips","clips_total":3,"clips_done":1,"fraction":0.53,...}

: ping

event: done
data: {"run":{...},"summary":{...},"error":null}
FrameWhen
snapshotFirst, with the run as of now and the clips already decided. Its id is the log cursor.
clipA clip was decided (provisional until the run is done).
progressFootage-weighted progress, phase and ETA; at most once per second.
logEvery engine log line, only with ?log=1.
: pingA comment after 15 seconds without output, so proxies keep the connection open.
doneThe run ended; the stream closes.

The server closes a stream after 15 minutes; reconnect with the Last-Event-ID header (or ?after=) to resume where you left off, and authenticate again. A user may hold 10 streams at once and an organisation 50 (429 too_many_streams beyond). No frame carries a signed media link: read GET /v1/runs/{run_id} for artifacts once the run is done. If streaming is not possible, poll GET /v1/runs/{run_id} and GET /v1/runs/{run_id}/logs?after=N.

The event log#

GET /v1/events?after=N returns your organisation's events in order, with a per-organisation sequence, as {"data": [...], "next": N, "has_more": bool}. Filter with type (an event type, or run.* for a namespace) and program; limit is at most 500. It is the same stream webhooks deliver, for systems behind a firewall that would rather poll: truehands events --after N --follow.

Webhooks#

Truehands pushes events to your HTTPS endpoint, signed with the Standard Webhooks v1 scheme.

Endpoints#

Shell
curl -u "$TRUEHANDS_KEY:$TRUEHANDS_SECRET_KEY" -X POST https://app.truehands.io/v1/webhook-endpoints \
  -H 'Content-Type: application/json' \
  -d '{"url": "https://hooks.example.com/truehands", "events": ["run.completed", "verdict.updated"], "programs": ["home-tasks"]}'

The answer includes the signing secret, whsec_…, once. Store it now. Or use truehands webhooks add URL --events run.completed,verdict.updated.

  • URLs must be https://, with no user name, password or fragment. An organisation can have at most 10 endpoints.
  • format is standard (signed JSON) or slack (a Slack incoming-webhook URL; Slack gets a short message for a subset of events and no signature).
  • events filters by type or <namespace>.*; programs by program. Without events, an endpoint gets the default set below. The Truehands Store's events have three parts and take store.*, store.order.* or store.delivery.*.
  • PATCH changes filters, the description or enabled state; changing the URL needs a person signed in to the console.
  • POST …/rotate-secret issues a new secret. For 24 hours every delivery carries signatures from both, so your receiver can switch without dropping events.
  • POST …/test sends a webhook.test event now and returns the attempt; GET …/deliveries lists recent deliveries, and POST /v1/webhook-deliveries/{id}/resend queues one again with the same webhook-id.

Event types#

Event typeDefault subscriptionSent to Slack endpoints
run.completedyesyes
run.failedyesyes
run.cancelledyes
run.gate_failedyes
run.media_expiringyesyes
clip.rejected
clip.review_required
verdict.updatedyes
export.readyyesyes
export.failed
backup.completed
backup.failedyesyes
payout_batch.readyyesyes
payout_batch.approvedyesyes
payout_batch.voided
policy.activated
webhook.testyes
store.order.submitted
store.order.quotedyes
store.order.acceptedyes
store.order.status_changedyes
store.order.progress
store.order.completedyes
store.delivery.readyyes
store.delivery.downloaded
store.delivery.clip_reported
store.delivery.report_decidedyes
store.delivery.clip_withdrawnyes

What a delivery looks like#

A run.completed delivery
POST /hooks/truehands HTTP/1.1
Content-Type: application/json
User-Agent: Truehands-Webhooks/1
Truehands-Event-Type: run.completed
webhook-id: evt_5d3c9a0e1b2f4a67
webhook-timestamp: 1793734222
webhook-signature: v1,wAJEz0lak8adaqkCZd7RDfccm5BqkCuiw6YNKZKfEQY=

{"id":"evt_5d3c9a0e1b2f4a67","type":"run.completed","created_at":"2026-11-03T19:30:22+00:00","api_version":"2026-11-01","sequence":42,"data":{"object":"run","id":"run_aae179e9558f","program":"home-tasks","name":"Week 41","counts":{"accept":3,"partial":0,"review":0,"reject":0},"clips_total":3,"billable_hours":0.0125,"payable_s":45.0,"pay_blocked_usd":0.0,"pay_held_usd":0.0,"flagged_share":0.0,"source":"cli","dashboard_url":"https://app.truehands.io/runs/run_aae179e9558f"}}

Signed with the example secret whsec_dHJ1ZWhhbmRzLWRvY3MtZXhhbXBsZS1zZWNyZXQtMzJiIQ==; the build checks that examples/webhooks/receive.py accepts it.

The body is the event envelope: id, type, created_at, api_version, sequence and data (always object, id and program, plus fields of the event). Bodies are at most 64 KiB.

Signatures#

The signature is HMAC-SHA256, keyed with the base64-decoded part of the secret after whsec_, over the string "{webhook-id}.{webhook-timestamp}.{raw body}", base64-encoded and prefixed v1,. The header may hold several signatures separated by spaces (during a rotation); accept the delivery if any matches. Refuse timestamps more than five minutes from your clock, compare in constant time, and drop a webhook-id you have already handled: retries and resends reuse it. A complete receiver in Python's standard library is on CI, webhooks and exports.

Delivery and retries#

A 2xx answer within 10 s (after a 5 s connect) counts as delivered: queue the work and answer quickly. Anything else is retried after 30 s, 2 min, 10 min, 30 min, 1 h, 3 h, 6 h, 12 h, 24 h, 24 h, each ±10%, for at most 11 attempts. A 429 with Retry-After is honoured (1 s to 1 h). A 410 Gone disables the endpoint and cancels its pending deliveries. Deliveries to one endpoint are sent one at a time in order; redirects are never followed, and every resolved address must be public.

Exports, verdicts and payouts#

  • POST /v1/exports builds a manifest of a program's audited clips (default: accepted and partial) as JSONL, CSV or Parquet, with a sidecar listing each file's SHA-256; download through GET /v1/exports/{id}/download, a one-hour signed link.
  • GET /v1/verdicts streams the latest verdict of every clip of finished runs in ledger order; its after watermark makes incremental syncs exact.
  • POST /v1/programs/{slug}/payout-batches computes a payout batch for a time window; it needs two approvals by different people.

Formats and fields: CI, webhooks and exports.

Pilots#

A pilot is a period and some programs; its report is computed live from the runs audited in them, and spot checks measure what Truehands missed. What the numbers mean, and how to read their ranges, is in Concepts. In the console: Pilots, and the review queue's Spot checks tab.

EndpointWhoWhat
GET /v1/pilotspilots.view{"pilots": [...], "can_manage"}: the pilots whose every program you may see, newest period first
POST /v1/pilotspilots.manage{"name", "programs", "start_date", "end_date", "criteria", "contact_name", "kind"} -> 201 the pilot
GET /v1/pilots/{id}pilots.viewthe pilot with its spot-check draws
PATCH /v1/pilots/{id}pilots.manageany of the fields above; programs cannot change once spot checks were drawn (409 has_spot_checks)
DELETE /v1/pilots/{id}pilots.manage204; open spot checks leave the queue, answers stay in the audit log
GET /v1/pilots/{id}/reportpilots.viewthe report as JSON
GET /v1/pilots/{id}/report.htmlpilots.viewthe report as one printable HTML file (download=1 for an attachment), audited
GET /v1/pilots/{id}/spot-checkspilots.view?answer=open|ok|missed|cancelled: the spot checks, the draws and the reasons a miss can give
POST /v1/pilots/{id}/spot-checkspilots.managedraw: {"size": 20} or {"percent": 5}, optional seed and stratify -> 201 the draw
POST /v1/pilots/{id}/spot-checks/{item_id}/answerreview.spot_check{"answer": "ok"} or {"answer": "missed", "reason_code", "note", "open_review"}
POST /v1/pilots/{id}/spot-checks/{item_id}/undoreview.spot_checktake back your own answer within 2 minutes

pilots.manage and review.spot_check need a person signed in to the console: a key never sets a pilot up, draws or answers.

Shell
curl -u "$TRUEHANDS_KEY:$TRUEHANDS_SECRET_KEY" https://app.truehands.io/v1/pilots/ev_3f2a9c1d7b40/report

Setting one up. name is 1-120 characters; programs 1-20 slugs; start_date and end_date are UTC days, both inclusive, at most 366 days apart (422 invalid_dates); criteria at most 10 lines of up to 300 characters; kind is pilot (the default) or evaluation. A pilot answers id (ev_...), these fields, days, status (upcoming, running, ended), criteria_changed_at and spot_checks: {"drawn", "answered", "misses", "open"}. Setting up, changing and drawing need a person signed in to the console (owners and admins, or a custom role with pilots.manage); keys can read pilots and reports with pilots.view.

Which runs count. Finished runs that count for payouts, in the pilot's programs, whose audit finished (finished_at) on or after 00:00 UTC of start_date and before 00:00 UTC of the day after end_date.

The report (GET /v1/pilots/{id}/report):

KeyWhat
pilot, period, programs, generated_atthe pilot, its period with status, covered_days and the rule above, and each program's pay rate, runs, clips, hours and contributors
footageruns, clips, hours, contributors, runs_still_auditing, re_audited_clips
findingsflagged_clips, flagged_hours, by_verdict (reject, review, partial), by_group (copies, cross-run copies, public datasets, idle time, wrong task, motion sensors, capture signatures, files) and by_reason, each with clips and hours
moneyengine (by Truehands' verdicts) and after_review (with your reviewers' decisions so far): pay_blocked_usd, pay_held_usd, pay_requested_usd, in total and by_program, with the run summary's formulas
reviewflags, reviewed, confirmed, overturned, waiting_second, not_reviewed (in_queue, never_queued), precision, by_verdict, by_reason, accepted_then_rejected_by_people
spot_checkssampled, answered, ok, misses, open, miss_rate, population (accepted clips), projected_misses: {"value", "low", "high"}, not_covered, unsampleable, by_program, miss_reasons, draws
manual_reviewaudited_h, residual_h, saved_h, saved_h_per_week, saved_usd and the assumptions (the cost assumptions of GET /v1/analytics/settings, and one hour of footage taking one hour to watch)
examples, missed_examplesthe flags with the most pay at stake (with their main finding, outcome and evidence frames) and the latest misses, with links to the clip pages
notes[{"code", "text"}]: what the numbers cannot say, from the numbers, such as no_spot_answers ("No spot checks have been reviewed yet, so misses are unknown.") or few_reviews

precision and miss_rate are {"k", "n", "value", "low", "high", "small"}: k of n, the share, its Wilson 95% interval, and small under 30 answers. A limited request gets cross-run findings without the earlier clip's details, as everywhere (program scopes).

The export (report.html) is the same report as one HTML file with no scripts and nothing to fetch: evidence frames (stored with faces blurred) are embedded as small images, and it lays out for A4 and Letter with page breaks. Open it in a browser and print it, or save it as PDF.

Spot checks. A draw picks among the pilot's clips whose engine verdict was accept, whose footage is still kept, that this pilot never sampled and that are not in another open spot check. Each eligible clip gets the key sha256("<seed>:<run_id>:<clip_id>"); the draw takes the smallest keys, split across programs in proportion to their eligible clips (largest remainder, ties by program id) unless stratify is false. size is 1-500; percent rounds up to at least one clip; seed is lowercase hex, random when left out. The draw answers its seed, population (eligible clips), population_sha256 (of their sorted run_id/clip_id lines), sampled and strata, so anyone can repeat it:

Python
import hashlib
key = lambda seed, run_id, clip_id: hashlib.sha256(f"{seed}:{run_id}:{clip_id}".encode()).hexdigest()
picked = sorted(eligible, key=lambda c: key(seed, c["run_id"], c["clip_id"]))[:size]   # one program

No clip left to draw is 409 nothing_to_sample. A pilot holds at most 5000 spot checks.

Each spot check is a review item with origin: "spot_check"; its id is the review item's (rvi_...). The review queue lists them under GET /v1/review/items?tab=spot (open) and tab=spot_done, never in the other tabs or counts; GET /v1/review/summary adds spot_checks_open; POST /v1/review/next with {"kind": "spot_check"} claims the next one; GET /v1/review/items/{id} adds spot_check (its pilot, answer and whether you may answer); a clip's review history shows answers as spot_check events. A decision on a spot check is 409 spot_check, and bulk decisions skip them.

An answer is ok, or missed with a reject or partial reason_code of GET /v1/review/reasons (other needs a note). It changes no verdict and no pay, and never holds up a run's review or payout. With "open_review": true a miss also sends the clip to a normal review (review.override: owners and admins), where a decision can change its pay; the answer says review: {"opened": true, "item_id"}. The person who answered may undo it within 2 minutes, unless it opened a review (409 review_opened). A spot check already answered is 409 not_open; one another person holds is 409 claimed_by_other. Notes are internal, like review notes.

Audit log: pilot.created, pilot.updated, pilot.deleted, pilot.spot_checks_drawn (with the seed and counts), pilot.spot_check_answered, pilot.spot_check_undone and pilot.exported.

Backups#

Copy every finished run to your own S3-compatible bucket. What a backup holds, and how to load it into a warehouse or your own database: Backups to your storage. Seeing destinations and jobs needs backups.view; renaming them and turning them on or off backups.edit; testing, backing a run up now and backfilling backups.run; adding, deleting and changing where a destination writes or what it includes backups.manage, with a password confirmed recently. Owners and admins hold all four.

Shell
curl -u "$TRUEHANDS_KEY:$TRUEHANDS_SECRET_KEY" https://app.truehands.io/v1/backups/destinations
  • POST /v1/backups/destinations adds one (at most 3): name, provider (aws_s3, cloudflare_r2, gcs, minio, s3_compatible), bucket, prefix, region (required for AWS; R2 uses auto), endpoint_url (required for every provider but AWS: https://, host only, resolving to public addresses; Google Cloud Storage defaults to https://storage.googleapis.com), access_key_id, secret_access_key, include ({"evidence": true, "footage": false} by default; results are always included) and enabled. It needs a person signed in with a password confirmed in the last ten minutes. The answer, like every read, shows auth: {"type": "keys", "access_key_id", "secret_access_key_hint"}: the secret itself is never returned, only its last four characters.
  • GET, PATCH and DELETE /v1/backups/destinations/{id}. A key may rename a destination, change evidence, turn footage off and turn the destination on or off; new credentials, a new provider, bucket, prefix, region or endpoint, turning footage on and deleting need the recently confirmed password. Turning a destination off ends its queued backups. Every change is in the audit log, without secrets. Each destination reports its last_backup, last_test, jobs (queued, running, failed_7d) and retrying (the error of a backup waiting to retry).
  • POST /v1/backups/destinations/{id}/test writes a small object under the prefix and deletes it: {"ok", "steps": [{"step": "write", "ok"}, {"step": "delete", "ok"}], "error": {"code", "message"} | null, "latency_ms", "tested_at"}. At most 10 tests a minute.
  • POST /v1/backups/destinations/{id}/backfill with {"since": "2026-10-01T00:00:00Z"} (and optionally until, program, redo) queues the runs that finished since then, at most 500 a call: {"queued", "already_queued", "skipped_backed_up", "runs", "has_more", "next_since"}. Runs already backed up there are skipped unless redo is true.
  • POST /v1/runs/{id}/backup backs a done run up now, to every destination that is on or to {"destination_id": "bkd_..."}, and answers 202 {"jobs": [...]}. A backup already queued for that run and destination is reused.
  • GET /v1/backups/jobs?destination=&run=&status= lists backups: id, destination_id, run_id, kind (full, or results after a verdict changed), trigger (run_done, manual, backfill, verdict_updated, catch_up), status, attempts, max_attempts, next_attempt_at, objects, bytes, uploaded, uploaded_bytes, missing, error_code, error and timestamps.

A failed attempt is retried after 1 min, 5 min, 15 min, 1 h, 3 h, 6 h, 12 h, each ±10%, for at most 8 attempts. Events: backup.completed and backup.failed (run_id, name, destination_id, destination, kind, location, and objects, bytes, uploaded, missing or attempts, error_code, error), and run.media_expiring (run_id, name, program, media_expires_at, backed_up, retention_days), sent once per run 7 days before its footage is deleted (when the period is shorter than twice that, at half the period and at least 1 day before), and once more if its clock restarts.

Run archives#

GET /v1/runs/{id}/archive?footage=0|1&evidence=0|1 answers 302 to a signed link, valid for 5 minutes, to a zip of the done run with the backup's layout and manifest.json (stored, zip64, built while it downloads); with redirect=false it answers {"url", "expires_in", "filename"}. Results and evidence need runs.view. footage=1 needs footage.download (owners and admins), is written to the audit log, and answers 410 media_deleted once the run's footage is gone; the results archive keeps working. truehands archive RUN_ID [--footage] [--no-evidence] [-o PATH] downloads it and checks every SHA-256.

Retention#

Footage is deleted 30 days after it was last used (the later of its upload and the end of the latest run that used it); verdicts, reasons, review decisions, payouts and the verdict ledger are kept. GET /v1/org/retention answers media_retention_days (the period in force), max_days (the server's value) and default_days. PUT /v1/org/retention with {"media_retention_days": 7} shortens it for the organisation: it needs retention.manage, which only the owner role holds, signed in with a password confirmed in the last ten minutes, and is written to the audit log. Values outside 1 to the server's value are 422 out_of_bounds. Uploading the same file again restarts its clock. A backup waiting to copy a run's evidence or footage keeps it for at most 3 days past its date; see backups.

Erasing a contributor's data#

When a contributor asks you to delete their data (a data-subject request), POST /v1/contributors/{contributor_id}/erase with {"confirm": "<the same id>"} erases it from Truehands Cloud. It needs contributors.erase, which only the owner role holds, signed in to the console with a password confirmed in the last 10 minutes (403 step_up_required otherwise; a key gets 403 humans_only), and it is written to the audit log as contributor.erased, with the token, never the id. {"dry_run": true} answers the receipt of what would change and changes nothing. A request limited to some programs may erase only a contributor whose every clip is in them: 404 when none is, 403 forbidden when some are outside. In the console: the contributor's page, Erase this contributor's data.

EffectOn what
DeletedTheir footage (videos and sensor logs) and everything made from it: working copies, evidence frames, contact sheets, run reports, frame pairs of other clips that show it, and cross-run frames that show it in later clips' findings. Their copy-detection memory: stream fingerprints, frame embeddings and sketches, including those of another contributor's copy of their footage. Their profile: watchlist, holds and their notes, and the links their risk was computed from. Files in local inboxes that came from them. Exports that list them
ReplacedTheir contributor id, everywhere, by one random token (erased- and 12 hex digits) that is not derived from the id and is the same across the organisation; each of their device ids by its own token; each of their upload ids by a new one (the upload keeps no file name, hash or measurements). Verdicts, review items and decisions, the verdict ledger, payout lines and items and events carry the token, so totals still add up. Every field that holds a contributor or device id is replaced when it is exactly theirs. In free text (notes, finding details, log lines) an id with a letter and at least 3 characters, or at least 8 characters, is replaced as a whole word; a shorter or all-digit id such as 7 only where it is labelled, as in contributor 7 or submitted by 7, so another person's "Idle for 7 s" stays as it is. The receipt says when that rule applied
RemovedReviewers' notes on their clips (review items and decisions, spot checks) and notes in the audit entries about them
RewrittenIn the engine's audit.json and the program manifest of their runs: their own clips, and the fields of other clips that point at them; the files of approved payout batches that pay them

Cases to know:

  • Footage another contributor re-submitted (a copy, caught by cross-run memory or within a run): their verdict stays. The footage and the frames made from it are deleted with the rest; that clip answers media_deleted: true, and its findings carry "evidence_removed": true.
  • A payout batch that is not approved yet and pays them: 409 payout_pending, naming it. Approve it (and pay them) or void it first, since afterwards nobody could tell whom its line pays. Approved batches keep their line under the token, and their payout files are rebuilt; the approved sha256 stays as the record of what two people approved.
  • A queued or running run with their clips or footage: 409 runs_in_progress. A watcher batch still open with their clips: 409 batch_open.
  • Exports that list them are deleted and expire at once; create new ones if you need them. Webhook events already delivered and downloads made earlier are out of reach; events not sent yet go out with the token. Your own backup bucket keeps the copies made before: the receipt names the destinations and runs to delete them from.
  • After the erasure, the contributor directory no longer has them (their id and the token answer 404), a new upload of the same footage is no longer caught as a copy of their clips, and new runs refuse ids that start with erased- (422 invalid_manifest).

The answer is the receipt, in the shape of the operator's deletion certificate: kind (contributor_erasure), id, dry_run, org, by, started_at, finished_at, subject (token, clips, runs, uploads), deleted (rows per table, rows_total, files, bytes, blobs, blobs_kept), pseudonymised (token, rows, rows_total, files), notes (exports_deleted, payout_files_rebuilt, webhook_events_delivered, downloads_before, backup_destinations, and free_text when their id is short or only digits), remains (each with what, until and action: Truehands' own backups keep the deleted footage for up to 7 days, until the next daily prune after that, and the deleted records for up to 56 days) and next_steps. Keep it with the request; it names the token, not the person.

The Truehands Store#

An organisation that uses Truehands Audit can order first-person footage from the Truehands Store, follow it while it is recorded and checked, and receive the deliveries in its own console (Data store in the left navigation), with its roles, webhooks and Slack, without signing in to the store. This server calls the store's platform API for it, signed with a secret the two share (HMAC-SHA256 over the method, the path with its query, a timestamp, a nonce that is new for every request, the acting person's name and the body), so the store's order timeline and audit log name the person who acted. The store is set up by the operator of this server (TRUEHANDS_STORE_URL and TRUEHANDS_STORE_PLATFORM_SECRET); without it every /v1/store/ endpoint answers 404 store_off and the console has no Data store section.

Three permissions cover it, and they act on the whole organisation, so a request limited to some programs holds none of them:

PermissionWho holds itWhat it allows
store.viewowners, admins, reviewers, viewers; a custom role; a key pair (for a pipeline that fetches deliveries)the catalog, orders, quotes, progress and timeline, deliveries and their download, reports and payments, whether the organisation is connected
store.orderowners and admins; a custom role. A person signed in to the console, never a key, since it commits the organisation's moneywrite and send briefs, accept or decline quotes, pause, resume, close or cancel orders, buy datasets, accept the Dataset Licence, report delivered clips and confirm deleting withdrawn ones
store.manageowners and admins, never a custom role; a person with a password confirmed in the last 10 minutesconnect the organisation, accepting the Store Terms for it; accept a new version of them; disconnect

Connecting#

EndpointWhoWhat
GET /v1/store/linkstore.view{"enabled", "connected", "store_url", "link"}; link is {"buyer_id", "org_name", "terms_version", "linked_at", "linked_by", "existing_buyer", "last_event_at"} or null
GET /v1/store/agreements/{kind}/textstore.viewthe store_terms or dataset_licence in effect: version, title, effective_at and text (Markdown), as the store publishes it
POST /v1/store/linkstore.manage{"store_terms_version", "link_code"} → 201 the link and the agreements. Accepts the Store Terms version you were shown for the organisation; the store records it with your name, the time and your address. Without link_code the store creates an account for the organisation; with the one-hour code the owner of an existing store account made on the store website, it connects that account. 409 agreement_changed when the terms changed since you read them, 409 already_connected
DELETE /v1/store/linkstore.manage204. The link ends: the store stops sending events here and the console can no longer order. The store keeps the account, its orders and deliveries, and its members on the store website keep their access
GET /v1/store/agreementsstore.viewthe Store Terms and the Dataset Licence in effect, each with accepted_at (null: not accepted yet; ordering needs both)
POST /v1/store/agreements/store_terms/acceptstore.manage{"version"}: a new version of the Store Terms
POST /v1/store/agreements/dataset_licence/acceptstore.order{"version"}: the Dataset Licence, before the first brief or purchase

Connecting and disconnecting are written to the audit log as store.connected and store.disconnected.

Orders, catalog and deliveries#

Each endpoint below is one call the store allows for the organisation's account; any other path under /v1/store/ answers 404. Calls that change something are written to the audit log (store.order_created, store.order_submitted, store.quote_accepted, store.quote_declined, store.order_paused, store.order_resumed, store.order_closed, store.order_cancelled, store.dataset_bought, store.agreement_accepted, store.clip_reported, store.clip_deletion_confirmed, store.delivery_downloaded, store.delivery_sent_to_backup). The store's own answers pass through with their codes and messages, for example 403 agreement_required before the Dataset Licence is accepted, 409 invalid_transition for a step the order's status does not allow, or 409 quote_expired. Before the organisation is connected these endpoints answer 409 store_not_connected.

EndpointWhoWhat
GET /v1/store/catalogstore.view{"datasets": [...]}: the datasets the store lists (the list may be empty): slug, title, description, tasks, hours, clip_count, settings, countries, cameras, contributors, hours_by_task, licence_tier, price_cents, price_cents_per_hour, currency, previews
GET /v1/store/catalog/{slug}store.viewone dataset
GET /v1/store/catalog/{slug}/previews/{n}store.viewa sample frame (JPEG, low resolution, faces blurred)
POST /v1/store/catalog/{slug}/quotestore.view{"slice": {"tasks", "hours"}} or {} → {"price_cents", "currency", "hours", "clips"}; changes nothing
POST /v1/store/catalog/{slug}/purchasestore.orderthe same body → 201 the order, created accepted at that price; its delivery is built once the payment arrives
GET /v1/store/orders?status=store.viewthe organisation's orders, newest first, each with status, total_cents, deposit_cents, paid_cents and progress
POST /v1/store/ordersstore.ordera brief → 201 a draft: title, tasks (name, description, hours, examples), settings, countries (two-letter codes), cameras, min_resolution, min_fps, min_clip_seconds, max_clip_seconds, sensor_log_required, audio, deadline, budget_cents_per_hour, exclusivity (exclusive or non_exclusive), notes (for Truehands only) and contributor_instructions (shown to the people recording)
GET /v1/store/orders/{id}store.viewthe order with its brief, quote, tasks (target and accepted hours per task) and payments
PATCH /v1/store/orders/{id}store.ordera new brief for a draft
POST /v1/store/orders/{id}/submitstore.ordersend the draft for a quote
POST /v1/store/orders/{id}/acceptstore.orderaccept the quote: the order is binding and the deposit is invoiced
POST /v1/store/orders/{id}/decline, .../cancel, .../pause, .../resume, .../closestore.order{"note"} (optional): decline the quote, cancel, pause or resume collecting, or close early and pay for what was accepted
GET /v1/store/orders/{id}/progressstore.view{"accepted_hours", "target_hours", "share", "tasks"}: footage the engine accepted, of what was ordered
GET /v1/store/orders/{id}/timelinestore.view{"events": [{"event", "from_status", "to_status", "actor", "note", "data", "at"}]}; a person acting from the dashboard appears as <name> (Truehands dashboard)
GET /v1/store/deliveriesstore.viewevery drop of the organisation's orders: id, order_id, drop_number, status (building, ready, delivered, expired, failed), seconds, bytes, manifest_sha256, expires_at, report_until
GET /v1/store/deliveries/{id}store.viewthe delivery with its clips (dataset-scoped clip_id, task, seconds, status, withdrawn_reason, deletion_confirmed_at) and sends (below)
GET /v1/store/deliveries/{id}/downloadstore.view302 to a signed link, valid for five minutes, to the package as a tar; with redirect=false, {"url", "expires_in", "filename"}. The tar is streamed from the store as it downloads, nothing is kept on this server, and the store records the download under your name
POST /v1/store/deliveries/{id}/send-to-backupstore.view and backups.run{"destination_id"} → 202 a send: the tar streams from the store into one of your backup destinations
GET /v1/store/deliveries/{id}/sendsstore.view{"sends": [...]}: destination, location, status (queued, running, done, failed), bytes, sha256, error_code, error
POST /v1/store/deliveries/{id}/reportsstore.order{"clip_id", "reason"} → 201 a report, within 14 days of the drop
POST /v1/store/deliveries/{id}/clips/{clip_id}/deletion-confirmedstore.orderconfirm the organisation deleted a clip the store withdrew, and every copy of it
GET /v1/store/reports, GET /v1/store/paymentsstore.viewthe organisation's clip reports with their decisions; deposits, drop invoices and purchases
Shell
# a pipeline with a key limited to store.view fetches every ready delivery
curl -u "$TRUEHANDS_KEY:$TRUEHANDS_SECRET_KEY" https://app.truehands.io/v1/store/deliveries
curl -L -u "$TRUEHANDS_KEY:$TRUEHANDS_SECRET_KEY" -o dlv.tar https://app.truehands.io/v1/store/deliveries/dlv_4e2a9b71c6d0/download

Sending a delivery to your bucket. A send writes <prefix>/store/deliveries/<delivery id>.tar, uploaded in parts as it streams from the store with the destination's own credentials and address checks, and then <delivery id>.json beside it: delivery_id, order_id, drop_number, bytes, the tar's sha256, manifest_sha256, sent_at and sent_by. A send runs in the background and is not retried: a failed one keeps its error, and sending again starts over.

Events#

The store sends each event of a connected organisation to this server's POST /v1/store/events, signed like the calls above; a request more than five minutes old, with a nonce already seen, or for an organisation that is not connected is refused. Each event is published once to the organisation's event log under the store's type with store. in front, so webhooks and Slack get it:

Eventdata (besides object, id, store_event_id, store_created_at and dashboard_url)
store.order.submitted, store.order.quoted, store.order.accepted, store.order.status_changed, store.order.completedorder_id, title, kind, status, from_status, note (object store_order)
store.order.progress (at most hourly)order_id, title, progress
store.delivery.ready, store.delivery.downloadeddelivery_id, order_id, drop_number, seconds, manifest_sha256, expires_at; by for a download (object store_delivery)
store.delivery.clip_reported, store.delivery.report_decidedreport_id, delivery_id, order_id, clip_id, reason, decision, remedy, credit_cents (object store_report)
store.delivery.clip_withdrawndelivery_id, order_id, clip_id, reason, action (object store_clip): delete the clip and every copy, then confirm the deletion

Slack endpoints get a short message for quotes, accepted, changed and completed orders, ready deliveries, decided reports and withdrawn clips.

Endpoints#

Every operation of the API, grouped as in the reference. Each path links to its entry in the API reference.

268 operations in 25 groups, from contracts/cloud-api.json (OpenAPI 3.1.0, API version 0.4.0).

Auth

MethodPathWhat it does
POST/v1/access-keyDeprecated: rotate your legacy access key (used with your username). Create key pairs under /v1/me/keys
GET/v1/meMe
DELETE/v1/sessionSign Out
POST/v1/sessionOpen a console session with a password (a person) or a key (view-only for human actions): a username and
POST/v1/session/step-upConfirm your password again; sensitive actions accept it for ten minutes. When your organisation requires

Uploads

MethodPathWhat it does
GET/v1/uploadsYour organisation's uploads, newest first. A member or key limited to some programs sees the uploads it
POST/v1/uploadsCreate Upload
GET/v1/uploads/{ref}Get Upload

Programs

MethodPathWhat it does
GET/v1/programsYour organisation's programs; a member or key limited to some programs sees only those.
POST/v1/programsCreate Program
GET/v1/programs/{slug}Get Program
POST/v1/programs/{slug}/tasksAdd tasks to a program, after the ones it has. Additive only: existing tasks never change or disappear,

Runs

MethodPathWhat it does
GET/v1/runsList Runs
POST/v1/runsQueue a run. With an Idempotency-Key header, a retried request (a CI job re-run, a crashed watcher)
GET/v1/runs/{run_id}Get Run
GET/v1/runs/{run_id}/attemptsRun Attempts
POST/v1/runs/{run_id}/cancelCancel Run
GET/v1/runs/{run_id}/clipsThe run's clips. Without limit, every clip, the most severe first (as before). With limit, a page of
GET/v1/runs/{run_id}/clips/{clip_id}Get Run Clip
GET/v1/runs/{run_id}/clips/{clip_id}/featuresThe engine's frame embeddings of one clip, at 2 fps, from the organisation's feature cache: an .npz with
GET/v1/runs/{run_id}/clips/{clip_id}/historyThe contributor's record across your organisation's counted runs, their device, and every other run
GET/v1/runs/{run_id}/eventsFollow a run live: verdicts as the engine decides them, footage-weighted progress, ETA and the engine
GET/v1/runs/{run_id}/logsRun Logs
GET/v1/runs/{run_id}/overlapClips of this run already audited in an earlier run that counts for payouts (same file or same video
POST/v1/runs/{run_id}/priorityReorder a queued run within your organisation's queue.
POST/v1/runs/{run_id}/promoteMake a finished re-run the one that counts for payouts; every other run of its lineage stops counting.
POST/v1/runs/{run_id}/rerunAudit the same clips again with the current engine, reference library and policy. Free, and not in
POST/v1/runs/{run_id}/retryQueue a failed run again under the same id, keeping its attempt history. Done runs give 409.
PUT/v1/runs/{run_id}/tagsAdd and remove run tags (at most 20 per run). Removing the run's original tag clears it.
GET/v1/tagsTags used on your organisation's runs, most used first; q matches the start of a tag.
GET/v1/viewsYour personal saved views plus your organisation's shared ones.
POST/v1/viewsCreate View
DELETE/v1/views/{view_id}Delete View

Policies

MethodPathWhat it does
GET/v1/policiesEvery program with its active policy, versions waiting for approval and recent gate results.
GET/v1/policy-schemaReason codes and their allowed consequences, thresholds with their engine limits, gate metrics.
GET/v1/programs/{slug}/policiesA program's policy versions, newest first, each judged against the active one.
POST/v1/programs/{slug}/policiesStore a policy as a draft. Pushing a policy that is already stored returns that version (200), so a CI
GET/v1/programs/{slug}/policies/activeThe policy in force for new runs (version 0 is the Truehands default).
POST/v1/programs/{slug}/policies/simulateRe-decide recent finished runs of this program with a candidate policy, against the active one.
POST/v1/programs/{slug}/policies/validateLint a policy and show what it would change against the active one. Never writes anything.
GET/v1/programs/{slug}/policies/{version}Get Version
POST/v1/programs/{slug}/policies/{version}/activateMake a version the program's active policy. Only a person signed in to the console, as owner or admin.
GET/v1/programs/{slug}/policies/{version}/diffWhat changes from against (the active version, or a version number) to this version.
GET/v1/runs/{run_id}/clips/{clip_id}/decisionHow the policy decided one clip: every rule that looked at it, observed value against threshold, and
GET/v1/runs/{run_id}/gatesThe run's quality gate: overall result, each gate's observed value and threshold, and the payout hold.
POST/v1/runs/{run_id}/payout-hold/releaseRelease a run's payout hold after a person has checked it. Verdicts are left as they are.

Review

MethodPathWhat it does
POST/v1/review/assignReview Assign
POST/v1/review/bulkOne decision on up to 200 items in one transaction. dry_run returns the same answer and writes nothing.
GET/v1/review/decisionsThe decisions ledger. format=csv downloads up to 50,000 rows. Notes only with include_notes=1, which needs
POST/v1/review/decisions/{decision_id}/confirmSecond person: agree to make the decision final, or disagree (with a note) to reopen the item.
POST/v1/review/decisions/{decision_id}/revertUndo: the reviewer within 2 minutes, or an owner or admin at any time with a note.
GET/v1/review/itemsReview Items
GET/v1/review/items/{item_id}One item with its idle runs, the clip's decisions, a contributor card and the next item to prefetch.
POST/v1/review/items/{item_id}/claimTake or renew a 10-minute lease on an item.
POST/v1/review/items/{item_id}/decisionsAccept, pay in part or reject one clip. The server computes payable seconds. Paying for a clip with a
POST/v1/review/items/{item_id}/previewWhat a decision would pay, computed by the server. Writes nothing.
POST/v1/review/items/{item_id}/releaseReview Release
POST/v1/review/nextClaim the next item to review: assigned to you first, then by SLA and pay at stake. 204 when the queue
GET/v1/review/reasonsThe fixed reasons a reviewer picks from, grouped by decision, with their 1-9 keys.
GET/v1/review/reviewersPeople who can be assigned review work: owners, admins and reviewers in your organisation.
GET/v1/review/statsReviewer throughput and how often reviewers upheld each engine flag. Reviewers see only their own row.
GET/v1/review/summaryBacklog at a glance: open, mine, unassigned, waiting for a second reviewer, SLA and pay held.
POST/v1/runs/{run_id}/clips/{clip_id}/reopenSend a decided clip back to the review queue.
GET/v1/runs/{run_id}/clips/{clip_id}/review-historyThe engine verdict, then every reopen, decision, confirmation, overturn and revert on the clip.
GET/v1/runs/{run_id}/reviewWhether people have finished reviewing a run, and whether its payout can go ahead. CI can poll this.

Contributors

MethodPathWhat it does
GET/v1/contributor-ringsGroups of contributors linked by copied footage, re-submitted files or a shared device, with at least one
GET/v1/contributorsThe organisation's contributors ranked by risk-v1 (org-wide, all-time). Program and date filters narrow
GET/v1/contributors/{contributor_id}One contributor across every run: score with the reasons for it, totals, history, devices and links.
GET/v1/contributors/{contributor_id}/clipsEvery clip this contributor submitted, across runs. A clip audited again in a later run is listed in both,
POST/v1/contributors/{contributor_id}/eraseErase one contributor's data for a data-subject request (erasure.py): their footage, frames and
POST/v1/contributors/{contributor_id}/holdHold a contributor's payouts org-wide. Verdicts and payable time do not change. Holding again returns the
POST/v1/contributors/{contributor_id}/releaseRelease a hold. Only an owner or admin signed in to the console can, and every release needs a note.
GET/v1/contributors/{contributor_id}/timelineWatch, hold, release and export events for this contributor from the audit log, newest first.
PUT/v1/contributors/{contributor_id}/watchPut a contributor on the watchlist (or take them off). Watching changes nothing but attention.
GET/v1/holdsActive payout holds with the dollars in scope: the check before payroll. History is in the audit log.
POST/v1/holdsHold up to 200 contributors, or the copiers of one ring (sources are the victims, so they are not held).

Cross-run memory

MethodPathWhat it does
GET/v1/library/indexThe organisation's memory: what is in it, how often it catches copies, and the most re-used originals.
GET/v1/library/index/runsRuns whose clips are in memory, newest first.
DELETE/v1/library/index/runs/{run_id}Remove a run from memory: later runs are no longer compared with it. Its past verdicts stay. Owners and
GET/v1/library/setsReference footage every clip is compared with. Today: the public set curated by Truehands (read-only).
GET/v1/runs/{run_id}/clips/{clip_id}/cross-runThe earlier clip this one matches, with evidence frames and both videos (signed links).
GET/v1/runs/{run_id}/cross-runWhat this run was compared with in the organisation's memory, and the clips seen before.

Compare

MethodPathWhat it does
GET/v1/compareWhat changed between two finished runs. Clips pair by upload (same file), then by video stream hash.
GET/v1/compare/clipsCompare Clips
GET/v1/runs/{run_id}/baselineThe run to compare this one with: its parent for a re-run, else the newest earlier finished run of the

Delivery

MethodPathWhat it does
GET/v1/delivery/summarySummary
GET/v1/eventsThe org's events in order (per-org sequence). Poll with after=<last sequence> instead of receiving
GET/v1/exportsList Exports
POST/v1/exportsBuild a manifest of a program's clips (default: accepted and partial) as JSONL, CSV or Parquet, with a
DELETE/v1/exports/{export_id}Delete Export
GET/v1/exports/{export_id}Get Export
GET/v1/exports/{export_id}/downloadA one-hour signed link to one file of the export (302, or {url} with redirect=false). Audited.
GET/v1/payout-batchesList Batches
GET/v1/payout-batches/{batch_id}The batch, recomputed in memory: stale=true when verdicts in the window changed since it was hashed.
POST/v1/payout-batches/{batch_id}/approvalsApprove the exact sha256 you reviewed. Needs an owner or admin signed in to the console; the second
GET/v1/payout-batches/{batch_id}/itemsBatch Items
POST/v1/payout-batches/{batch_id}/recomputeRecompute Batch
POST/v1/payout-batches/{batch_id}/voidVoid Batch
POST/v1/programs/{slug}/payout-batchesCompute a payout batch for clips submitted in [window_start, window_end), freeze the rate and hash it.
GET/v1/verdictsThe latest verdict of every clip of finished runs, ordered by the org's ledger sequence. after is both
GET/v1/webhook-deliveries/{delivery_id}One delivery with every attempt, the request (signature header left out) and response snippets.
POST/v1/webhook-deliveries/{delivery_id}/resendQueue the same event again (same webhook-id, so receivers can dedupe).
GET/v1/webhook-endpointsList Endpoints
POST/v1/webhook-endpointsAdd an endpoint. Standard endpoints get a signing secret, shown once in this response only.
DELETE/v1/webhook-endpoints/{endpoint_id}Delete Endpoint
GET/v1/webhook-endpoints/{endpoint_id}Get Endpoint
PATCH/v1/webhook-endpoints/{endpoint_id}Change filters, the description or enabled state. Changing the URL needs a person signed in to the
GET/v1/webhook-endpoints/{endpoint_id}/deliveriesList Deliveries
POST/v1/webhook-endpoints/{endpoint_id}/rotate-secretA new signing secret. For 24 hours deliveries carry signatures from both, so receivers can switch.
POST/v1/webhook-endpoints/{endpoint_id}/testSend a webhook.test event to this endpoint now and return the attempt.

Automation

MethodPathWhat it does
GET/v1/queueYour organisation's run queue: meters, limits, and each queued or running run with position and ETA.
GET/v1/schedulesList Schedules
POST/v1/schedulesA cron schedule in a time zone that flushes a watcher, or sweeps a program: re-audits the clips of the
GET/v1/schedules/previewDescribe a cron expression and show its next five fire times in the zone, or 422 with invalid_cron,
DELETE/v1/schedules/{ref}Delete Schedule
GET/v1/schedules/{ref}Get Schedule
PATCH/v1/schedules/{ref}Patch Schedule
POST/v1/schedules/{ref}/runFire a schedule now. The current minute is its slot, so pressing Run now twice makes one run.
GET/v1/statusHealth of the parts that run your audits, and your organisation's last 24 hours.
GET/v1/watchersList Watchers
POST/v1/watchersA watcher batches footage into runs on its own. local reads a server-owned inbox folder (rsync, SFTP);
DELETE/v1/watchers/{ref}Remove a watcher. Its ledger, batches and runs are kept; files in its inbox are left where they are.
GET/v1/watchers/{ref}Get Watcher
PATCH/v1/watchers/{ref}Patch Watcher
GET/v1/watchers/{ref}/batchesWatcher Batches
POST/v1/watchers/{ref}/clipsAPI inbox: 1-500 rows naming your dl:// uploads. Each row is batched, a duplicate (already sent),
POST/v1/watchers/{ref}/flushClose the open batch now and start its run. run is null when nothing was waiting, or when the queue is
GET/v1/watchers/{ref}/objectsThe watcher's ledger: every object it saw, once per version, and what became of it.
POST/v1/watchers/{ref}/pausePause Watcher
POST/v1/watchers/{ref}/resumeResume Watcher

CI

MethodPathWhat it does
GET/install.shInstall or upgrade the CLI. No credentials. The script downloads /v1/ci/cli.pyz from this server's public
GET/v1/badges/{token}.svgA README status badge. No credentials: the token is an HMAC bound to the badge id.
GET/v1/ci/badgesList Badges
POST/v1/ci/badgesA status badge for a README. It shows one word (passing, failing, audited, running...) for the newest run
DELETE/v1/ci/badges/{badge_id}Revoke a badge. Its URL keeps answering, with 'revoked'.
GET/v1/ci/cli.pyzDownload the CLI. No credentials: it holds only the CLI's Python files, is built the same way every
GET/v1/ci/pipelinesEvery pipeline that reports in, from runs whose meta names a CI provider, grouped by program, provider
GET/v1/ci/templatesCopy-ready CI files for one provider, filled with this server's address and the program. Never a key:

Analytics

MethodPathWhat it does
GET/v1/analytics/clipsThe clips behind any overview number, worst first, with totals that match the tile. With no segment
GET/v1/analytics/exportDownload a CSV of clips, contributors, programs or reasons for the filters. Every export is recorded
GET/v1/analytics/overviewKPIs with deltas and sparklines, trends by verdict, flags by reason, backlog, money, top contributors,
GET/v1/analytics/settingsThe cost assumptions behind "Est. saved". Manual review has no default: it stays empty until an owner
PUT/v1/analytics/settingsSet the manual review and Truehands rates ($/h, more than 0 and at most 500). Owners and admins signed in

Usage

MethodPathWhat it does
GET/v1/usageBillable audited hours by day; a member or key limited to some programs sees those programs' hours.

Team

MethodPathWhat it does
POST/v1/links/acceptAccept an invite (creates the account) or a password link (sets the password and ends old sessions),
POST/v1/links/previewWhat an invite or password link is for, before the person sets a password.
POST/v1/me/passwordChange your password. Ends your other sessions. Refused (409 sso_required) when your organisation requires
GET/v1/team/invitesList Invites
POST/v1/team/invitesA one-time invite link (7 days) for a built-in person role or one of the organisation's custom roles. No
DELETE/v1/team/invites/{invite_id}Revoke Invite
GET/v1/team/membersList Members
PATCH/v1/team/members/{member_id}Change a member's role (built-in or custom), name or programs. Granting admin or owner, or changing an
POST/v1/team/members/{member_id}/deactivateDeactivate a member: their key, sessions and links stop at once. Their runs and audit rows stay.
DELETE/v1/team/members/{member_id}/keyRevoke all of a member's keys at once: every key pair and the legacy access key. Scripts using them get
POST/v1/team/members/{member_id}/password-linkA one-time link (24 h) for a member to set their password. Shown once. Owners can make one for anyone,
GET/v1/team/members/{member_id}/permissionsWhat a member may do now: their role's permissions and the programs they may see (null: every program),
POST/v1/team/members/{member_id}/reactivateReactivate a member. They have no session or password link until one is made, and no key unless single
POST/v1/team/members/{member_id}/sso-detachStop the identity provider managing a member's role and programs: they keep both as they are now, keep
GET/v1/team/rolesWhat each role may do, as the server enforces it, generated from the permission catalog: the built-in
GET/v1/team/roles/customYour organisation's custom roles with how many members and pending invites hold each.
POST/v1/team/roles/customA role of your organisation's own, from grantable permissions (what they imply is added). Needs an owner or
DELETE/v1/team/roles/custom/{role_id}Delete a custom role. While members (active or deactivated) or pending invites hold it, name a
PATCH/v1/team/roles/custom/{role_id}Rename a custom role, change its description, or replace its permissions. Members holding it get the new
POST/v1/team/service-accountsA CI identity (role ci): a key pair, no password, no console. th_secret_key is shown once.
PATCH/v1/team/service-accounts/{member_id}Rename a service account, change its description, or limit it to some programs (programs, null for
POST/v1/team/service-accounts/{member_id}/keyRotate a service account's key pair: its old key pairs and access key stop at once, and a new pair is
PATCH/v1/team/service-accounts/{member_id}/keys/{key_id}Change a service account's key pair limits, narrowing or widening: permissions (from what the ci role

Audit log

MethodPathWhat it does
GET/v1/audit-logNewest first. Page with before = the previous page's next_before.
GET/v1/audit-log/exportThe filtered audit log as CSV or JSON lines, newest first, up to 100,000 rows. The export is audited.

Media

MethodPathWhat it does
GET/v1/media/{token}Media

Health

MethodPathWhat it does
GET/v1/healthzHealthz
GET/v1/readyzReadiness for load balancers: no authentication and no tenant data. 503 lists what is failing.

Backups

MethodPathWhat it does
GET/v1/backups/destinationsThe organisation's backup destinations, with their last backup and any error.
POST/v1/backups/destinationsAdd a bucket to back runs up to. Needs an owner or admin signed in with a password confirmed in the last
DELETE/v1/backups/destinations/{dest_id}Delete a destination and its job history. What it already wrote stays in the bucket. Needs a password
GET/v1/backups/destinations/{dest_id}Get Destination
PATCH/v1/backups/destinations/{dest_id}Change a destination. Its name, evidence, turning footage off and turning it on or off need backups.edit;
POST/v1/backups/destinations/{dest_id}/backfillBack up runs that finished done since since (at most 500 a call, oldest first; has_more and next_since
POST/v1/backups/destinations/{dest_id}/testWrite a small object under the destination's prefix and delete it again. Returns which steps worked and,
GET/v1/backups/jobsBackup jobs, newest first: status, attempts, objects, bytes and a sanitized error.
GET/v1/runs/{run_id}/archiveA signed link, valid for five minutes, to a zip of this done run with the backup layout and manifest.json
POST/v1/runs/{run_id}/backupBack this done run up now, to every enabled destination or to destination_id. A backup already queued

Keys

MethodPathWhat it does
GET/v1/me/keysYour active key pairs (not revoked, not expired), newest first. Never a secret: hint is the last four
POST/v1/me/keysMake a key pair for scripts and CI. th_secret_key is shown once and never stored. Needs a person signed in
DELETE/v1/me/keys/{key_id}Revoke one of your key pairs at once; scripts using it get 401. Needs a person signed in with a password.
PATCH/v1/me/keys/{key_id}Change one of your key pair's limits: permissions and programs, each a list or null for no limit; a
GET/v1/team/keysEvery active key pair in the organisation, people's and service accounts', newest first, with whose it is,
DELETE/v1/team/keys/{key_id}Revoke any member's or service account's key pair at once. Owners' keys can be revoked only by an owner.
PATCH/v1/team/keys/{key_id}Narrow any member's or service account's key pair: fewer permissions or fewer programs, never more

Organisation

MethodPathWhat it does
GET/v1/org/retentionHow many days footage is kept after it was last used (its upload, or the end of the latest run that used
PUT/v1/org/retentionShorten (or restore, up to the server's value) how long this organisation's footage is kept. Owners only,

Pilots

MethodPathWhat it does
GET/v1/pilotsPilots of your organisation whose every program you may see, newest period first, with spot-check counts.
POST/v1/pilotsSet up a pilot: a name, programs, start and end dates (UTC, inclusive), the success criteria agreed before
DELETE/v1/pilots/{pilot_id}Delete a pilot. Its open spot checks leave the review queue; answers stay in the audit trail.
GET/v1/pilots/{pilot_id}One pilot with its spot-check draws.
PATCH/v1/pilots/{pilot_id}Change a pilot. Its programs cannot change once it has spot checks. Changing the success criteria after the
GET/v1/pilots/{pilot_id}/reportThe report, computed now: footage audited, findings by reason, pay the verdicts would have blocked or held,
GET/v1/pilots/{pilot_id}/report.htmlThe report as a printable HTML file (audited).
GET/v1/pilots/{pilot_id}/spot-checksThe pilot's spot checks (open first), its draws with their seeds, and the reasons a miss can give.
POST/v1/pilots/{pilot_id}/spot-checksDraw a random sample of the clips the engine accepted in the pilot into the review queue as spot checks,
POST/v1/pilots/{pilot_id}/spot-checks/{item_id}/answerAnswer a spot check: ok, or missed with a reason and a note. The clip's verdict and pay do not change. With
POST/v1/pilots/{pilot_id}/spot-checks/{item_id}/undoTake back your own answer within two minutes. The spot check is open again and yours to answer.

SCIM

MethodPathWhat it does
GET/scim/v2/GroupsGroups, filtered (displayName, externalId, id, members.value) and paged.
POST/scim/v2/GroupsCreate a group, optionally with members. 409 uniqueness when the name is taken.
DELETE/scim/v2/Groups/{group_id}Delete a group. Its members' roles are recomputed without it.
GET/scim/v2/Groups/{group_id}Scim Get Group
PATCH/scim/v2/Groups/{group_id}Add or remove members (members[value eq "..."] or a members list) and rename the group, as Okta and
PUT/scim/v2/Groups/{group_id}Replace a group's name, external id and members.
GET/scim/v2/ResourceTypesScim Resource Types
GET/scim/v2/ResourceTypes/{type_id}Scim Resource Type
GET/scim/v2/SchemasScim Schemas
GET/scim/v2/Schemas/{schema_id}Scim Schema
GET/scim/v2/ServiceProviderConfigScim Config
GET/scim/v2/UsersUsers provisioned by SCIM, filtered (userName, externalId, emails.value, displayName, id, active; eq, ne,
POST/scim/v2/UsersCreate a user (a person with no password, who signs in with single sign-on), or link the member who has
DELETE/scim/v2/Users/{user_id}Deactivate the member (their sessions end, and their key pairs and access key are revoked for good) and
GET/scim/v2/Users/{user_id}Scim Get User
PATCH/scim/v2/Users/{user_id}Add, replace or remove attributes, as Okta and Microsoft Entra ID send them (active: false deactivates
PUT/scim/v2/Users/{user_id}Replace a user's attributes (userName, externalId, name, displayName, emails, active).

Single sign-on

MethodPathWhat it does
GET/v1/ssoThe organisation's single sign-on settings, mapping rules and SCIM status, with the redirect URI to
PUT/v1/ssoSave the identity provider: issuer, client id and secret (sealed with the server's secrets key, never
GET/v1/sso/callbackWhere the identity provider sends the browser back: the redirect URI is the server's public URL followed by
POST/v1/sso/domains/{domain}/verifyProve the organisation owns one of its allowed email domains: Truehands looks up the TXT record
POST/v1/sso/linkLink your own account to your identity provider account, so you can sign in with single sign-on. This is
PUT/v1/sso/mappingThe ordered group mapping rules: each gives the members of one group (its name or id, as the identity
PUT/v1/sso/requireRequire single sign-on: password sign-in is then refused for every member but owners (owners keep their
DELETE/v1/sso/scim-tokenRevoke the SCIM token: provisioning stops until a new one is made. Needs sso.manage; audited.
POST/v1/sso/scim-tokenMake the organisation's SCIM token, or rotate it: the old one stops at once. token is shown once; only
POST/v1/sso/sessionTrade the one-time code /v1/sso/callback put in the console's URL fragment for a console session (method
POST/v1/sso/startBegin a single sign-on: send a work email (its domain picks the organisation, if an organisation verified
POST/v1/sso/step-upConfirm it is you at your identity provider, for actions that need a recent confirmation: the provider is
POST/v1/sso/testFetch the discovery document (<issuer>/.well-known/openid-configuration) and the signing keys now, through

Store

MethodPathWhat it does
GET/v1/store/agreementsThe Store Terms and the Dataset Licence in effect at the store, each with accepted_at (null: this
POST/v1/store/agreements/dataset_licence/acceptAccept the Dataset Licence for the organisation, which ordering and buying need. Needs store.order.
POST/v1/store/agreements/store_terms/acceptAccept a new version of the Store Terms for the organisation. Needs store.manage. Audited.
GET/v1/store/agreements/{kind}/textThe version in effect, with its text (Markdown), as the store publishes it: read it before accepting.
GET/v1/store/catalogThe datasets listed in the store: tasks, hours, clips, settings, countries, cameras, licence tier and
GET/v1/store/catalog/{slug}One listed dataset, with its hours by task and its sample previews.
GET/v1/store/catalog/{slug}/previews/{n}A sample frame of a dataset: low resolution, faces blurred.
POST/v1/store/catalog/{slug}/purchaseBuy the dataset or a slice. It needs the current Store Terms and Dataset Licence accepted; the order is
POST/v1/store/catalog/{slug}/quoteThe price of the dataset, or of a slice of it (some tasks, some hours): price_cents, currency,
GET/v1/store/deliveriesThe organisation's deliveries (each drop of an order), newest first.
GET/v1/store/deliveries/{delivery_id}One delivery with its clips (dataset-scoped ids, task, seconds, withdrawn or not, deletion confirmed or
POST/v1/store/deliveries/{delivery_id}/clips/{clip_id}/deletion-confirmedConfirm the organisation deleted a clip Truehands withdrew (store.delivery.clip_withdrawn), and every copy
GET/v1/store/deliveries/{delivery_id}/downloadA signed link, valid for five minutes, to the delivery's package as a tar, streamed from the store as it
POST/v1/store/deliveries/{delivery_id}/reportsReport a clip that breaks the brief, with a reason, within 14 days of its drop. Truehands decides: the
POST/v1/store/deliveries/{delivery_id}/send-to-backupCopy the delivery's tar to one of the organisation's backup destinations, streamed from the store into the
GET/v1/store/deliveries/{delivery_id}/sendsThe delivery's copies to backup destinations, newest first: status, location, bytes, sha256, error.
GET/v1/store/download/{token}The tar behind a signed link from GET /v1/store/deliveries/{id}/download, streamed from the store chunk by
POST/v1/store/eventsWhere the Truehands Store sends events for connected organisations (its STORE_PLATFORM_EVENTS_URL),
DELETE/v1/store/linkDisconnect: the link ends, so the store stops sending this organisation's events and the dashboard can no
GET/v1/store/linkWhether the Truehands Store is set up on this server and the organisation connected to it: enabled,
POST/v1/store/linkConnect the organisation to the Truehands Store, accepting the Store Terms version you were shown on its
GET/v1/store/ordersThe organisation's orders, newest first (at most 200), with status, totals and progress.
POST/v1/store/ordersA custom order brief, saved as a draft. Submit it to ask Truehands for a quote. Needs store.order.
GET/v1/store/orders/{order_id}One order with its brief, tasks (target and accepted hours), quote and payments.
PATCH/v1/store/orders/{order_id}Replace the brief of a draft. Needs store.order. Audited.
POST/v1/store/orders/{order_id}/acceptAccept the quote: the order becomes binding and the deposit is invoiced. Needs store.order. Audited.
POST/v1/store/orders/{order_id}/cancelCancel a draft, a submitted or quoted order, or an accepted one before collecting starts (a collecting
POST/v1/store/orders/{order_id}/closeClose a collecting or paused order early: you pay for what was accepted, and the last drop is built.
POST/v1/store/orders/{order_id}/declineDecline the quote, with an optional note for Truehands. Needs store.order. Audited.
POST/v1/store/orders/{order_id}/pausePause collecting: the order's gigs stop taking new recordings. Needs store.order. Audited.
GET/v1/store/orders/{order_id}/progressAccepted hours against the target, in total and per task.
POST/v1/store/orders/{order_id}/resumeResume a paused order. Needs store.order. Audited.
POST/v1/store/orders/{order_id}/submitSend the brief to Truehands for a quote. Needs store.order and the current Store Terms and Dataset Licence
GET/v1/store/orders/{order_id}/timelineEvery status change, drop, download, report and takedown of the order, with who and when.
GET/v1/store/paymentsDeposits, drop invoices and purchases, with their status and payment links.
GET/v1/store/reportsThe organisation's clip reports and Truehands' decisions.