# Fit'Distance partner API documentation > Read and write your students' data from n8n, Make, Zapier, a script or an AI assistant with the Fit'Distance partner API: you call it with one key, and each billed call costs 1 credit. Base URL: https://api.fitdistance.io/api/partner/v1 Authentication: send your key as `Authorization: Bearer `. `GET /openapi.json` and `GET /operations` need no key. Markdown: add `.md` to the URL of a guide or of a reference family to read it as Markdown. The documentation home and the reference index have no `.md` version: this file lists their content. ## Get started - [Overview](https://fitdistance.io/en/documentation/api/getting-started/overview): What the Fit'Distance API lets you do, the three ways to call the API and the rules to keep in mind before your first key. - [Create a key](https://fitdistance.io/en/documentation/api/getting-started/create-a-key): Create an API key in the app: its name, its scopes, the terms of use, and the only time you can copy it. - [First call](https://fitdistance.io/en/documentation/api/getting-started/first-call): Check your key with a free call, read your credit balance, then make your first billed call on your students. - [Write a script](https://fitdistance.io/en/documentation/api/getting-started/write-a-script): A Python or JavaScript script that reads every page, rereads only the changes, writes without duplicates and recovers from a 429. - [Keys and credits](https://fitdistance.io/en/documentation/api/getting-started/keys-and-credits): What costs a credit, what is free, where your credits come from and where to follow your usage. - [The CLI](https://fitdistance.io/en/documentation/api/getting-started/the-cli): The fitdistance command: install it, connect your key, read and write from your terminal, a script or a coding agent. ## No code - [Connect n8n](https://fitdistance.io/en/documentation/api/no-code/n8n): Read your students in n8n with a Header Auth credential and an HTTP Request node, then follow the pages with an If node. - [Connect Make](https://fitdistance.io/en/documentation/api/no-code/make): Read your students in Make with the HTTP Make a request module, split them with an Iterator and read the next page with a second module. - [Connect Zapier](https://fitdistance.io/en/documentation/api/no-code/zapier): Read one page of your students in a zap with Webhooks by Zapier and a custom request, your key in the Authorization header. - [Give the docs to your AI](https://fitdistance.io/en/documentation/api/no-code/ai): Give the llms.txt link to Claude or ChatGPT, use the buttons on each page, or connect the MCP server with your key so it reads your students. ## Concepts - [Authentication](https://fitdistance.io/en/documentation/api/concepts/authentication): How your key identifies every call: the Bearer header, one key per tool, revocation and the 401. - [Scopes](https://fitdistance.io/en/documentation/api/concepts/scopes): What each scope opens: families and kinds, sensitive scopes, team, and the rule that ties Delete to Write. - [Pagination](https://fitdistance.io/en/documentation/api/concepts/pagination): Read a list page by page with limit and cursor, reread only the changes with since, and handle deleted objects. - [Writes and idempotency](https://fitdistance.io/en/documentation/api/concepts/writes-and-idempotency): Write with POST /operations, retry without duplicates using Idempotency-Key and preview an effect with dry_run. - [Webhooks](https://fitdistance.io/en/documentation/api/concepts/webhooks): Receive the events of your account on your server: create a webhook, verify the signature, answer fast, retries and GET /events to catch up. - [Errors](https://fitdistance.io/en/documentation/api/concepts/errors): The shape of an API error, the thirteen codes with their HTTP status and what they cost, and what to do with each. - [Limits](https://fitdistance.io/en/documentation/api/concepts/limits): The call limits per key, the 429 with Retry-After and the RateLimit headers, and how to resume without overloading. ## Use cases - [An email for each new student](https://fitdistance.io/en/documentation/api/use-cases/new-student-email): Every hour, read the students who joined since the last run and get one email per new student, with n8n or Make. - [Remind students without a check-in for 14 days](https://fitdistance.io/en/documentation/api/use-cases/student-without-assessment-reminder): Every Monday, send a short message to students who have sent no check-in for 14 days, with a first run that sends nothing. - [Remind inactive students](https://fitdistance.io/en/documentation/api/use-cases/inactive-student-reminder): Every Monday, send a short message to students with no finished workout for 14 days, with a first run that sends nothing. - [An online purchase → an invitation](https://fitdistance.io/en/documentation/api/use-cases/online-sale-invitation): When a customer pays on Stripe, invite them to your coaching with Fit'Distance, after a first run as a preview, with n8n or Make. - [An Instagram DM → an activation code, with ManyChat](https://fitdistance.io/en/documentation/api/use-cases/instagram-dm-activation-code): When someone sends you a keyword in an Instagram direct message, ManyChat replies with an activation code created by Fit'Distance, with n8n or Make. - [A form submission → a note on the student's file](https://fitdistance.io/en/documentation/api/use-cases/form-to-student-note): Every answer to a Tally form becomes a private note on the student's file, with n8n or Make. - [The Monday recap, on Telegram or WhatsApp](https://fitdistance.io/en/documentation/api/use-cases/monday-recap): Every Monday at 8 am, get your week's recap on Telegram: new students, workouts, check-ins and habits, with n8n or Make. - [A program ends this week → an alert](https://fitdistance.io/en/documentation/api/use-cases/program-ending-this-week): Every Monday, get on Telegram the list of the programs that end during the week, with n8n or Make. - [Student for 90 days → a review request](https://fitdistance.io/en/documentation/api/use-cases/google-review-request): Every Monday, ask for a Google review from the students who joined three months ago, after a first run that sends nothing, with n8n or Make. - [Follow a group of students automatically](https://fitdistance.io/en/documentation/api/use-cases/automated-group-follow-up): Tag a group of students, read their pending check-ins every morning, write the feedback and set the check-in to done. ## For machines - [The OpenAPI contract](https://fitdistance.io/en/documentation/api/machines/openapi): Where to read the OpenAPI contract of the API, how to generate a client with one command, and why the reference on this site says the same thing. - [llms.txt and llms-full.txt](https://fitdistance.io/en/documentation/api/machines/llms): What the two text files for AIs contain, how to give them to an assistant and how to read each page as Markdown. - [The MCP server](https://fitdistance.io/en/documentation/api/machines/mcp): The address of the MCP server and the header to give it with your key, what the key opens, the five free tools and what costs a credit. ## Reference - [Students](https://fitdistance.io/en/documentation/api/reference/students): 3 routes. Scopes: students:read. - [Training](https://fitdistance.io/en/documentation/api/reference/training): 6 routes. Scopes: training:read. - [Check-ins](https://fitdistance.io/en/documentation/api/reference/bilans): 2 routes. Scopes: bilans:read. - [Forms](https://fitdistance.io/en/documentation/api/reference/forms): 3 routes. Scopes: forms:read. - [Messaging](https://fitdistance.io/en/documentation/api/reference/messaging): 2 routes. Scopes: messaging:read. - [Nutrition](https://fitdistance.io/en/documentation/api/reference/nutrition): 3 routes. Scopes: nutrition:read. - [Habits](https://fitdistance.io/en/documentation/api/reference/habits): 2 routes. Scopes: habits:read. - [Appointments](https://fitdistance.io/en/documentation/api/reference/appointments): 1 route. Scopes: appointments:read. - [Courses](https://fitdistance.io/en/documentation/api/reference/courses): 1 route. Scopes: courses:read. - [Activity](https://fitdistance.io/en/documentation/api/reference/activity): 1 route. Scopes: activity:read. - [General](https://fitdistance.io/en/documentation/api/reference/general): Routes without a family: your key, the contract, the catalog, the events. - [Operations](https://fitdistance.io/en/documentation/api/reference/operations): 258 operations. Each operation is called with `POST /operations/`. `GET /operations` is the source of truth for its kind and scope. ## Machine-readable - [OpenAPI contract](https://fitdistance.io/documentation/api/openapi.json): The OpenAPI contract of every route, version 1.0.0. No key needed. - [Full documentation](https://fitdistance.io/documentation/api/llms-full.txt): Every page and the reference of every route in one text file. - [GET /operations](https://api.fitdistance.io/api/partner/v1/operations): GET https://api.fitdistance.io/api/partner/v1/operations lists the operations with the JSON Schema of their arguments. No key needed. - [MCP server](https://mcp.fitdistance.io): The same tools for an AI assistant. Authenticate with the same key as a Bearer token. The scopes of the key hide no tool, except in the tool search (`fitdistance_search_tools`), which shows the tools whose family scope the key holds. A tool called outside the scopes answers an error that names the missing scope and costs nothing.