Change a client's portal settings
const url = 'http://localhost:8000/api/clients/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/access/';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"auto_share":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:8000/api/clients/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/access/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "auto_share": true }'auto_share releases each new completed session to the client’s side as it finishes (off by default). upload_monthly_cap is how many clips the card’s Contribute people may send per calendar month, 0–100; 0 turns uploads off. Either field may be omitted. Answers the whole panel. Turning auto_share off, or uploads off (a cap of 0), is open on every plan — it only takes access away; turning auto-share on, or a cap above 0, needs a plan with client access.
A coach of the team, on a card of the active team. Every route answers 404 while client access is switched off on the environment. A partner API key and a client’s own account get 403. 402 trial_expired / access_ended on a read-only team (its trial or plan ended), else feature_not_in_plan (feature: client_access) on a plan without client access — every paid tier and Strategic include it; a trial does not.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Body
Section titled “Request Body”PATCH /api/clients/<id>/access/ body. Either field may be omitted.
object
Examples
Turn on auto-share
{ "auto_share": true}Turn uploads off
{ "upload_monthly_cap": 0}PATCH /api/clients/<id>/access/ body. Either field may be omitted.
object
Example generated
auto_share=true&upload_monthly_cap=1PATCH /api/clients/<id>/access/ body. Either field may be omitted.
object
Responses
Section titled “Responses”GET /api/clients/<id>/access/ — the App access panel
(ClientAccessOverview).
object
Release new completed sessions to the client’s side automatically (off by default).
Clips the card’s Contribute people may send per calendar month; 0 turns uploads off.
True for a minor (under 18 by the date of birth, or declared so): only a guardian can be invited. Null when the card has no date of birth and nothing declared — the athlete invite waits for one.
One person with access to a card, as the coach sees it
(ClientAccessRecord).
object
The address the invite went to.
The person’s name once they accepted; empty until then.
invited · active · expired · revoked. expired is an invite whose 14-day link lapsed; the coach can resend it.
invited- Invitedactive- Activeexpired- Expiredrevoked- Revoked
The invite’s language. Later e-mails to this person use it too.
en- Englishru- Русскийes- Español
Who sent the invite, for the team’s coaches: the inviting coach’s name, else their e-mail address; once their account is gone, the name it left, else “A coach” in ?lang (English by default).
When the invite link lapses — set only while the status is invited.
When the last invite or sign-in e-mail left; null when none ever did.
Whether the e-mail reached the person (false: the transport refused it — the grant stands, resend it). On an invite or resend answer: this call’s e-mail, null when the call sent nothing on purpose (a second resend within a minute). On every other answer: the latest attempt’s, null when none was ever made.
Whether inviting, resending, changing a level and sharing would pass the plan gate now: the team is not read-only AND its plan includes client access. False: those answer 402 — show the upgrade instead of the button.
Examples
A guardian on a minor's card
{ "auto_share": true, "upload_monthly_cap": 4, "minor": true, "people": [ { "id": "0b9e4d21-7a3c-4f6e-8d15-3c2a9b7e6f58", "email": "olga.lebedeva@example.com", "display_name": "Olga Lebedeva", "relation": "guardian", "level": "contribute", "status": "active", "language": "ru", "invited_by_name": "Kim Larsen", "invited_at": "2026-10-06T09:00:00Z", "expires_at": null, "accepted_at": "2026-10-07T18:20:00Z", "revoked_at": null, "last_sent_at": "2026-10-06T09:00:00Z", "email_sent": true } ], "can_invite": true}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Example generated
{ "detail": "example"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Example generated
{ "detail": "example"}The team is read-only, or its plan does not include client access.
object
One of eight canonical strings. The front-end paywall switches copy + CTA on this value (exact string equality — do not localise). quota_exhausted / seat_limit_reached / client_limit_reached / feature_not_in_plan lead to an upgrade CTA; subscription_suspended leads to a Billing Portal CTA so the buyer can update their payment method; exercise_not_in_plan leads to a contact-us CTA — the movement list is sales-managed, no tier adds to it (#2030). trial_expired / access_ended mean the team is read-only (#2901): everything opens, nothing new is created; they lead to a subscribe CTA and always carry reset_at: null.
quota_exhausted- Session quota for the period reached 0subscription_suspended- Stripe dunning in flight (past_due / unpaid)seat_limit_reached- Adding another team member would exceed plan.max_seatsclient_limit_reached- Adding another Client would exceed plan.max_client_profilesfeature_not_in_plan- The tier does not include this whole feature surfaceexercise_not_in_plan- The (activity, exercise) is not in the team’s exercise grantstrial_expired- The team is read-only: its self-serve trial endedaccess_ended- The team is read-only: its paid plan or granted access ended
ISO-8601 UTC timestamp the team’s current period ends. Null when the team has no live subscription (legacy un-migrated row). On Free + paid this is the renewal moment; quota refreshes to exactly plan.session_quota (NOT additive — leftover sessions don’t roll over).
The active plan’s role string (free, starter, professional, organization, strategic). Same value as current_role — kept as two separate fields for forward-compatibility with a future named-plan split where current_plan could carry an SKU and current_role the tier label.
The active plan’s role string. See current_plan.
Which feature surface is locked. Present ONLY on feature_not_in_plan, so one modal can name what’s gated without a detail string per feature (#773). The only value today is agents (aikynetix/agents/services.py::AGENTS_FEATURE).
Examples
A Free team opens the App access panel
{ "detail": "feature_not_in_plan", "reset_at": null, "current_plan": "free", "current_role": "free", "feature": "client_access"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examples
403 — a client's own account
The coach side is for a coach of the team; a client uses the portal.
{ "detail": "client_account"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examples
404 — no such client in the team
{ "detail": "client_not_found"}