Facebook Pixel
Fit'DistanceDocumentation
Open the app

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

NameTypeDescription
sincequerystringAn 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.
typesquerystringA comma list of event types. Default: every type the key can read.
cursorquerystringnext_cursor of the previous page: the last event id seen.
limitqueryinteger1–200, default 50
curl "https://api.fitdistance.io/api/partner/v1/events?limit=50" \
  -H "Authorization: Bearer fd_live_xxxxxxxx"
200 · a page of EventEnvelope
{
  "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
}
403 · SCOPE_MISSING
{
  "error": {
    "name": "PARTNER_API",
    "message": "SCOPE_MISSING"
  }
}

200 · a page of EventEnvelope

NameTypeDescription
id requiredstringThe event id (ULID): grows with time, the cursor of GET /events. Deduplicate on it.
type requiredstringone 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.inactiveThe event type. A ping delivery carries ping with empty data; GET /events never lists it.
api_version requiredstringone of 2026-10
occurred_at requireddate-time
coach_id requiredinteger
data requiredobjectThe event's data: see the « webhooks » tag for each type.

Errors

StatusCodeWhen
400VALIDATIONInvalid parameters or body.not billed
401UNAUTHORIZEDKey missing, unknown or revoked.not billed
403SCOPE_MISSINGThe key doesn't have the required scope.not billed
403PLAN_NOT_ELIGIBLEYour plan doesn't include the API.not billed
429RATE_LIMITEDToo 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"
200 · Me
{
  "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
  }
}
403 · SCOPE_MISSING
{
  "error": {
    "name": "PARTNER_API",
    "message": "SCOPE_MISSING"
  }
}

200 · Me

NameTypeDescription
coach requiredobject
tier requiredstringone of free, starter, maestro, elite
state requiredstringone of active, trialing, past_due, scheduled_cancellation, paused, expired, none
eligible requiredboolean
billing_mode requiredstringone of observe, enforceobserve: calls are journaled, nothing is refused nor debited. enforce: credits are debited and a zero balance answers 402.
key requiredobject
credits requiredobject

Errors

StatusCodeWhen
401UNAUTHORIZEDKey missing, unknown or revoked.not billed
403SCOPE_MISSINGThe key doesn't have the required scope.not billed
403PLAN_NOT_ELIGIBLEYour plan doesn't include the API.not billed
429RATE_LIMITEDToo 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"
Response
{
  "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

NameTypeDescription
data requiredOperationManifest[]
api_version requiredstring