# bsport API > REST API for partner integrations that act on behalf of a bsport company or franchise team: manage clients, schedule classes, book classes and appointments, read billing data and receive webhook events. Use V2 (`/api/v2/`) for new integrations. The Public API is in its Beta test phase: the bsport team grants access and issues API keys. Every page below is Markdown; replace `.md` with `.html` for the rendered page. ## Authentication Send these headers on every REST request: - `X-Api-Key`: the API key issued by the bsport team. Keys are specific to staging or production. - `X-Client-ID`: identifies your integration for tracing and support. - `X-Company-ID` with a company API key, or `X-Franchisor-ID` with a franchise API key. A franchise API key can add `X-Company-ID` to act on one company of the franchise. Base URLs: `https://public.staging.bsport.io` (staging) and `https://public.production.bsport.io` (production). ## OpenAPI specs The OpenAPI files are the source of truth for endpoints, fields and filters. The V2 file is close to 1 MB: download it and attach it to your conversation rather than fetching it. - [V2 OpenAPI spec](https://api-docs.production.bsport.io/schemas/openapi-v2.yml) - [V2 webhook event catalogue](https://api-docs.production.bsport.io/schemas/webhooks-openapi-v2.yml) ## Get started - [Getting started](https://api-docs.production.bsport.io/guides/00-getting-started.md): prerequisites, environments and a first request - [Authentication and headers](https://api-docs.production.bsport.io/guides/01-authentication.md): API key and tenant header rules ## Concepts - [Data model and terminology](https://api-docs.production.bsport.io/guides/08-terminology.md): the objects, how they relate and which ID points where - [Pagination and filtering](https://api-docs.production.bsport.io/guides/03-pagination-and-filtering.md) - [Errors and statuses](https://api-docs.production.bsport.io/guides/04-errors-and-statuses.md) - [Rate limits](https://api-docs.production.bsport.io/guides/06-rate-limits.md) ## Task guides - [Overview](https://api-docs.production.bsport.io/guides/10-v2-workflows.md): index of the task guides below - [Assign teacher pay rates](https://api-docs.production.bsport.io/guides/tasks/assign-teacher-pay-rates.md) - [Book classes and appointments](https://api-docs.production.bsport.io/guides/tasks/book-classes-and-appointments.md) - [Create catalogue items](https://api-docs.production.bsport.io/guides/tasks/create-catalogue-items.md) - [Manage clients, notes and tags](https://api-docs.production.bsport.io/guides/tasks/manage-clients-notes-and-tags.md) - [Read billing data](https://api-docs.production.bsport.io/guides/tasks/read-billing-data.md) - [Schedule and cancel classes](https://api-docs.production.bsport.io/guides/tasks/schedule-and-cancel-classes.md) - [Send an email or SMS](https://api-docs.production.bsport.io/guides/tasks/send-an-email-or-sms.md) - [Understand updates and disabling](https://api-docs.production.bsport.io/guides/tasks/understand-updates-and-disabling.md) ## Webhooks - [Overview](https://api-docs.production.bsport.io/webhooks/00-index.md): what webhooks send and when to use them - [Set up an endpoint](https://api-docs.production.bsport.io/webhooks/01-public-api-webhooks.md) - [Event payloads](https://api-docs.production.bsport.io/webhooks/05-event-payloads.md) - [Delivery, signatures and retries](https://api-docs.production.bsport.io/webhooks/04-delivery.md) - [Invoice events](https://api-docs.production.bsport.io/webhooks/invoice-webhook-v2.md) - [Migrating from Back Office webhooks](https://api-docs.production.bsport.io/webhooks/03-backoffice-webhooks.md): move a Back Office webhook to a Public API webhook ## Use cases - [Overview](https://api-docs.production.bsport.io/use-cases/00-index.md) - [CRM automation](https://api-docs.production.bsport.io/use-cases/01-crm-automation.md) - [Reporting](https://api-docs.production.bsport.io/use-cases/02-reporting.md) - [Website embed](https://api-docs.production.bsport.io/use-cases/03-website-embed.md) ## AI and automation - [MCP overview](https://api-docs.production.bsport.io/guides/mcp.md): connect a compatible AI assistant through MCP and OAuth. MCP is experimental during the Beta test phase - [Connect AI assistants with MCP](https://api-docs.production.bsport.io/guides/09-connect-ai-assistants-with-mcp.md) - [Using LLMs for integrations](https://api-docs.production.bsport.io/guides/05-using-llms-for-integrations.md) ## Changelog - [Changelog](https://api-docs.production.bsport.io/changelog.md): new endpoints, renamed fields and deprecation dates ## Optional - [Migrate from V1 to V2](https://api-docs.production.bsport.io/guides/11-migrate-from-v1-to-v2.md): only for integrations still on V1