canonical: https://jentic.com/apis/hexfit.com/hexfit

# Hexfit API

Jentic publishes the only available OpenAPI specification for Hexfit API, keeping it validated and agent-ready. The Hexfit API gives fitness professionals and health practitioners programmatic access to clients, training plans, calendars, appointments, group sessions, and exercise libraries on the Hexfit platform. Across 162 endpoints it covers user management, training and meal plans, group memberships, in-session events, calendar booking, and metadata tagging, with regional hosts for Canada (ca) and Europe (eu). Authentication uses Bearer JWT for end-user calls and HTTP Basic for OAuth2 partner endpoints where the username is the client_id and password is the client_secret.

## For AI agents

Manage Hexfit clients, training and meal plans, calendar appointments, group sessions, and exercise libraries via Bearer JWT authentication on regional Canada or Europe hosts.

## Scope

Does not handle payment processing, electronic medical records, or pharmacy operations - use for fitness coaching, training plans, and client scheduling only.

## Capabilities

- Create and manage client profiles, including custom metadata tags via /clients/{clientId}/metas/{metaKey}
- Build and assign training plans, exercises, and meal plans to specific clients or groups
- Schedule appointments and recurring events through the calendar resource and event-model lists
- Run group fitness sessions, manage group memberships, and clone training programmes between clients
- Pull a daily summary of client activity via /calendar/dailyDataMetaSummary for coach dashboards
- Manage user preferences and account state, including deactivation flows for departing clients
- Authenticate partner integrations using OAuth2 client credentials (Basic auth) for server-to-server calls

## Use cases

### Coach Roster Onboarding

When a new client signs up through a coach's website, the API can create their profile, attach custom metadata such as goals or injuries, and assign an initial training plan in a single workflow. Endpoints under /clients and /plans/users/{userId} handle the data, and /trainings/{trainingId}/clone copies a template plan to the new client. The flow takes seconds rather than the manual setup that previously required several screens in the Hexfit dashboard.

Example prompt: Create a client with profile data, set meta key goal=fat-loss, then clone training plan id 9876 to that client via POST /trainings/9876/clone.

### Calendar and Appointment Automation

Use /calendar/allEvents and /events to read and write events across a coach's schedule, and /appointment/events-model-list to fetch the templates that drive recurring sessions. Combined with a chat or scheduling agent, this lets clients book sessions in natural language while the API enforces availability and conflict checks on Hexfit's side.

Example prompt: Create an event of type personal_training for client 1234 starting at 2026-06-15T18:00:00Z lasting 60 minutes via POST /events/.

### Daily Client Health Summary

Coaches reviewing client progress can pull a single GET /calendar/dailyDataMetaSummary call to retrieve aggregated activity, plan completion, and meta-key data for a date range. This powers daily standup-style reports and enables agents to flag clients who skipped sessions or hit milestones without the coach scanning each profile manually.

Example prompt: Call GET /calendar/dailyDataMetaSummary for client 1234 covering the last 7 days and surface any day with zero recorded activity.

### AI Agent Coaching Assistant

Through Jentic, an AI coaching assistant can search 'schedule a training session' or 'clone a plan' and receive Hexfit operation schemas without seeing the JWT. Jentic's vault holds the access token and the regional host (ca or eu), so the agent can run multi-step coach workflows while credentials stay isolated.

Example prompt: Search Jentic for 'create a training event', load the schema for POST /events/, and execute it for client 1234 next Wednesday at 17:00.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /profile | Retrieve the authenticated user's profile |
| POST | /clients/{clientId}/metas/ | Create a custom metadata entry for a client |
| POST | /trainings/{trainingId}/clone | Clone an existing training plan to another user |
| POST | /events/ | Create a calendar event such as a training appointment |
| GET | /calendar/allEvents | List all calendar events |
| GET | /calendar/dailyDataMetaSummary | Aggregated daily activity and meta summary for clients |
| GET | /system/status | Check Hexfit platform status |

## Key resources

- **Clients** — Manage client profiles and custom metadata tags
- **Trainings** — Build, clone, and assign training plans and individual exercises
- **Plans** — Manage meal plans and assign them to users
- **Events** — Create and list calendar events including personal training and group sessions
- **Calendar** — Read aggregated calendar data and daily activity summaries
- **Groups** — Manage group memberships and group session rosters
- **User** — Manage user profiles, preferences, and deactivation

## Why Jentic

- **Setup:** Wiring the Hexfit API by hand means handling both its bearer JWT and OAuth2 basic client credentials, choosing the ca or eu regional host, and adding the right Authorization header per endpoint. Through Jentic you install once, import the Hexfit API from the API Directory, store the credentials once, and your agent calls it against the correct region.
- **Permission scoping:** Hexfit puts the client and training id in the URL path (/clients/{clientId}/metas/, /trainings/{trainingId}/clone), so a rule can pin your agent to one client or training. You choose the operations it may call, so cloning a training or posting client metadata is only included if you add it, while reading the profile and calendar stays separate.
- **Credential handling:** Your Hexfit bearer JWT and OAuth2 client id and secret are stored once, encrypted, by your own Jentic One instance and injected as the right Authorization header at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'schedule a training appointment' or 'clone a training plan', and Jentic returns the matching Hexfit operation with its input schema so the agent calls the right endpoint without scanning the spec.

## Related APIs

- **Fitbit API** — Fitbit exposes wearable activity, heart rate, and sleep data that complements Hexfit's coaching workflows
- **Calendly API** — Calendly handles generic appointment scheduling without fitness-specific plan management
- **OpenAI API** — OpenAI provides language model inference for generating coaching feedback from Hexfit client data

## FAQ

### Why is there no official OpenAPI spec for Hexfit API?

Hexfit does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Hexfit API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Hexfit API use?

Hexfit uses Bearer JWT (scheme bearerAuth) for end-user calls and HTTP Basic (OAuth2Basic) where username is client_id and password is client_secret for partner OAuth2 endpoints. Through Jentic, both credential types live in the encrypted vault and are injected at execution time so the agent never sees the JWT directly.

### Can I clone a training plan to multiple clients with the Hexfit API?

Yes. POST /trainings/{trainingId}/clone copies an existing training plan to a target user, returning the new plan id. Loop the call across the target client list to roll out a programme, or pair with /plans/users/{userId} to verify the assignment.

### Which regional host should I call for the Hexfit API?

The base URL is https://v3.{region}.hexfit.io where {region} is ca for Canadian accounts and eu for European accounts. Call the host that matches the account; calling the wrong region returns auth errors even with a valid token.

### How do I create a calendar event for a client through Jentic?

Run pip install jentic, search for 'create a training event', load the schema for POST /events/, and execute with the client id, event type, and start time. Jentic resolves the JWT from the vault and routes the call to the correct regional host.

### What is included in the daily client summary endpoint?

GET /calendar/dailyDataMetaSummary aggregates per-day activity counts, plan completion data, and any meta-key values logged for a client over the requested range. It is designed for coach dashboards that need a single call to surface adherence and progress signals.

### Can I limit what my agent is allowed to do with the Hexfit API?

Yes. Because you run Jentic One yourself, your own rules decide which Hexfit operations and credentials the agent may use. Since Hexfit puts the client and training id in the URL path, such as /clients/{clientId}/metas/ and /trainings/{trainingId}/clone, you can pin the agent to a single client or training. You choose which operations are in scope, so cloning a training or posting client metadata is only available if you add it, while reading a profile or calendar stays separate.
