General
Routes without a family: your key, the contract, the catalog.
GET /events
The coach's recorded events, to catch up after missed deliveries. Free.
The events of the key's coach, ascending id, as a delivery posts them. Free: no credit and no call row, but the per-key rate limits apply. The key lists the types its scopes can read: every type with webhooks:read, else the types of its family read scopes; none answers 403 SCOPE_MISSING naming webhooks:read, and a requested type outside them answers 403 SCOPE_MISSING naming its family's read scope. Events are recorded only while the coach has an enabled webhook, kept 30 days, and an event becomes visible here about three seconds after it is recorded. A ping is never listed.
- Free
- Read
- Stable
Parameters
| Name | Type | Description |
|---|---|---|
sincequery | string | An event id (the events after it), or an ISO 8601 date with an offset (Z or ±hh:mm): the events that occurred at or after it. A date without an offset is refused. |
typesquery | string | A comma list of event types. Default: every type the key can read. |
cursorquery | string | next_cursor of the previous page: the last event id seen. |
limitquery | integer1–200, default 50 |
curl "https://api.fitdistance.io/api/partner/v1/events?limit=50" \
-H "Authorization: Bearer fd_live_xxxxxxxx"{
"data": [
{
"id": "string",
"type": "student.activated",
"api_version": "2026-10",
"occurred_at": "2026-10-24T09:12:00Z",
"coach_id": 4821,
"data": {}
}
],
"next_cursor": null,
"has_more": false
}{
"error": {
"name": "PARTNER_API",
"message": "SCOPE_MISSING"
}
}200 · a page of EventEnvelope
| Name | Type | Description |
|---|---|---|
id required | string | The event id (ULID): grows with time, the cursor of GET /events. Deduplicate on it. |
type required | stringone of student.activated, student.requested, student.left, workout.started, workout.completed, program.assigned, program.completed, bilan.submitted, form.submitted, habit.logged, message.received, appointment.booked, appointment.cancelled, contract.ending_soon, contract.ended, student.inactive | The event type. A ping delivery carries ping with empty data; GET /events never lists it. |
api_version required | stringone of 2026-10 | |
occurred_at required | date-time | |
coach_id required | integer | |
data required | object | The event's data: see the « webhooks » tag for each type. |
Errors
| Status | Code | When |
|---|---|---|
400 | VALIDATION | Invalid parameters or body.not billed |
401 | UNAUTHORIZED | Key missing, unknown or revoked.not billed |
403 | SCOPE_MISSING | The key doesn't have the required scope.not billed |
403 | PLAN_NOT_ELIGIBLE | Your plan doesn't include the API.not billed |
429 | RATE_LIMITED | Too many calls: 10 per second, 300 per minute, 60 writes and 20 deletes per minute.not billed |
GET /me
The key, its coach, plan and credits. Free.
- Free
- Read
- Stable
curl "https://api.fitdistance.io/api/partner/v1/me" \
-H "Authorization: Bearer fd_live_xxxxxxxx"{
"coach": {
"id": 4821,
"first_name": "Camille",
"last_name": "Roux"
},
"tier": "maestro",
"state": "active",
"eligible": true,
"billing_mode": "enforce",
"key": {
"uid": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
"name": "string",
"prefix": "string",
"scopes": [
"string"
],
"created_at": "2026-10-24T09:12:00Z"
},
"credits": {
"plan_remaining": 4821,
"plan_included": 4821,
"plan_resets_at": "2026-10-24T09:12:00Z",
"bonus_remaining": 4821,
"lifetime_used": 4821
}
}{
"error": {
"name": "PARTNER_API",
"message": "SCOPE_MISSING"
}
}200 · Me
| Name | Type | Description |
|---|---|---|
coach required | object | |
tier required | stringone of free, starter, maestro, elite | |
state required | stringone of active, trialing, past_due, scheduled_cancellation, paused, expired, none | |
eligible required | boolean | |
billing_mode required | stringone of observe, enforce | observe: calls are journaled, nothing is refused nor debited. enforce: credits are debited and a zero balance answers 402. |
key required | object | |
credits required | object |
Errors
| Status | Code | When |
|---|---|---|
401 | UNAUTHORIZED | Key missing, unknown or revoked.not billed |
403 | SCOPE_MISSING | The key doesn't have the required scope.not billed |
403 | PLAN_NOT_ELIGIBLE | Your plan doesn't include the API.not billed |
429 | RATE_LIMITED | Too many calls: 10 per second, 300 per minute, 60 writes and 20 deletes per minute.not billed |
GET /openapi.json
This document. Free, no key.
- No key needed
- Free
- Read
- Stable
curl "https://api.fitdistance.io/api/partner/v1/openapi.json"GET /operations
The operations a key can run. Free, no key.
- No key needed
- Free
- Read
- Stable
curl "https://api.fitdistance.io/api/partner/v1/operations"{
"data": [
{
"name": "string",
"tool": "string",
"title": "string",
"description": "string",
"family": "students",
"kind": "read",
"kind_by_action": {},
"scope": "string",
"sensitive": [
"string"
],
"exposed": true,
"stability": "raw",
"confirmable": true,
"input_schema": {},
"output_schema": null
}
],
"api_version": "string"
}Response
| Name | Type | Description |
|---|---|---|
data required | OperationManifest[] | |
api_version required | string |