Skip to main content

List clients

Required scope:
Query parameters:

Get a client

Required scope:
The response includes safe Core CRM fields such as name, email, phone number, relationship status, assigned coach, location, language, timezone, and custom fields. It does not expose passwords, devices, payment data, notes, chats, or subscriptions.

Client output fields

List responses return pagination fields plus data.data[]. Detail responses return data.client.

Create a client

Required scope:
If assignedCoach is omitted, FITsociety uses the OAuth client’s defaultAssignedCoachId. If neither is available, the request fails with ASSIGNED_COACH_REQUIRED. Set hasNoEmail to true to generate a placeholder email address. Request validation: New-client responses return: Existing-account responses return: If the existing client is already connected to the company, the endpoint returns 409 CLIENT_ALREADY_EXISTS_IN_COMPANY.

Update a client

Required scope:
Supported update fields:

Archive a client

Required scope:
Archive is a lifecycle transition, not a hard delete. FITsociety sets the company relationship to archived, member status to past, and portal access status to disabled. Response fields: Validation: The response does not expose archivedBy, removal outcomes, deletion flags, or internal retention fields.

Portal access and onboarding

Required scopes: clients:read for portal-access, client_onboarding:write for invite and relationship decisions. GET /portal-access returns the current company-client portal access status without exposing auth state, sessions, devices, password status, or identity tokens. Portal access response fields: Invite endpoints validate that the client belongs to the authenticated company and has a real email address. Placeholder email accounts cannot be invited. The endpoints use the existing coach invite flow and return: Relationship decision endpoints are for clients whose company relation is pending_approval. Approve request body: Reject request body: Relationship decision response fields: Not exposed: reviewed-by coach ID, raw approval helper payloads, auth tokens, password state, registration source internals, private notes, or deletion metadata.

Custom field definitions

Required scope:
Returns active custom fields that are visible on the client page. Hidden fields, inactive fields, usage flags, internal update metadata, and validation regex patterns are not exposed. Definition fields:

Client custom field values

Required scopes: client_custom_fields:read for reads, client_custom_fields:write for writes. Patch body:
Value response fields: Validation:

Assigned coaches

Required scopes: clients:read for reads, clients:write for writes. Patch body:
Set coachId to null or an empty value to clear the assignment. Response fields: Writes validate that the coach exists and has active access to the company. Coach email, phone number, last active data, roles, and auth/device fields are not returned.

Client timeline

Required scope:
Timeline is intentionally limited to sanitized lifecycle events. It excludes notes, provider payloads, workout/nutrition events, raw audit logs, payment provider data, deletion internals, and retention details. Response fields: Validation:
DELETE /public/v1/clients/{clientId} is not exposed in v1. Client removal touches identity, memberships, payments, appointments, and connected company state, so it needs an explicit archive/removal contract rather than generic CRUD delete semantics.

Client tags

Required scope:
Use this endpoint to fetch tag IDs before creating or updating clients. Response fields: Deleted tags, hidden relationship statuses, and removed client outcomes are not included in the counts.