# 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. Owners and Admins create Public API keys in the Back Office, for a studio or a Master Account. 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 created in the Back Office. - `X-Client-ID`: the tool name entered when the API key was created. - `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 URL: `https://public.production.bsport.io`. ## 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) ## Changelog feed The [changelog RSS feed](https://api-docs.production.bsport.io/feed_rss_created.xml) lists every changelog entry, newest first, with the date it reached production. ## Get started - [Getting started](https://api-docs.production.bsport.io/guides/00-getting-started.md): prerequisites, the base URL 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 - [Connect AI assistants with MCP](https://api-docs.production.bsport.io/guides/09-connect-ai-assistants-with-mcp.md) - [MCP support](https://api-docs.production.bsport.io/guides/mcp-support.md): support and security contacts, and the privacy and legal pages - [Using LLMs for integrations](https://api-docs.production.bsport.io/guides/05-using-llms-for-integrations.md) ## Changelog - [API V2 is available](https://api-docs.production.bsport.io/changelog/api-v2-is-available.md) - [Appointment, service, and venue webhooks (V2 only)](https://api-docs.production.bsport.io/changelog/appointment-service-and-venue-webhooks-v2-only.md) - [Back Office webhook reference published (legacy)](https://api-docs.production.bsport.io/changelog/back-office-webhook-reference-published-legacy.md) - [Bookings updates](https://api-docs.production.bsport.io/changelog/bookings-updates.md) - [Change the credits and validity of a client class pass](https://api-docs.production.bsport.io/changelog/change-the-credits-and-validity-of-a-client-class-pass.md) - [Class pass and product webhooks (V2 only)](https://api-docs.production.bsport.io/changelog/class-pass-and-product-webhooks-v2-only.md) - [Deprecated legacy routes](https://api-docs.production.bsport.io/changelog/deprecated-legacy-routes.md) - [Initial Public API release](https://api-docs.production.bsport.io/changelog/initial-public-api-release.md) - [Invoice webhooks in V2](https://api-docs.production.bsport.io/changelog/invoice-webhooks-in-v2.md) - [Management namespace and field renaming](https://api-docs.production.bsport.io/changelog/management-namespace-and-field-renaming.md) - [MCP access follows your role and your plan](https://api-docs.production.bsport.io/changelog/mcp-access-follows-your-role-and-your-plan.md) - [New endpoints: classes, appointments, venues, and teachers](https://api-docs.production.bsport.io/changelog/new-endpoints-classes-appointments-venues-and-teachers.md) - [Rate limiting](https://api-docs.production.bsport.io/changelog/rate-limiting.md) - [Rejected credentials return 401](https://api-docs.production.bsport.io/changelog/rejected-credentials-return-401.md) - [See your API key and its usage](https://api-docs.production.bsport.io/changelog/see-your-api-key-and-its-usage.md) - [Tag support](https://api-docs.production.bsport.io/changelog/tag-support.md) - [Teacher endpoints](https://api-docs.production.bsport.io/changelog/teacher-endpoints.md) - [Test deliveries and secret rotation for webhook registrations](https://api-docs.production.bsport.io/changelog/test-deliveries-and-secret-rotation-for-webhook-registrations.md) - [V2 booking date filters take a timestamp](https://api-docs.production.bsport.io/changelog/v2-booking-date-filters-take-a-timestamp.md) - [V2 class and appointment period filters are renamed](https://api-docs.production.bsport.io/changelog/v2-class-and-appointment-period-filters-are-renamed.md) - [V2 class passes rename base_price to price](https://api-docs.production.bsport.io/changelog/v2-class-passes-rename-base_price-to-price.md) - [V2 coupon discount value is a decimal string](https://api-docs.production.bsport.io/changelog/v2-coupon-discount-value-is-a-decimal-string.md) - [V2 datetimes keep a numeric UTC offset](https://api-docs.production.bsport.io/changelog/v2-datetimes-keep-a-numeric-utc-offset.md) - [V2 days derived from a moment use the company's day](https://api-docs.production.bsport.io/changelog/v2-days-derived-from-a-moment-use-the-companys-day.md) - [V2 gift-card range amounts are decimal strings](https://api-docs.production.bsport.io/changelog/v2-gift-card-range-amounts-are-decimal-strings.md) - [V2 invoice items return the manual discount reason](https://api-docs.production.bsport.io/changelog/v2-invoice-items-return-the-manual-discount-reason.md) - [V2 invoice line amounts are decimal strings](https://api-docs.production.bsport.io/changelog/v2-invoice-line-amounts-are-decimal-strings.md) - [V2 invoices link a reverse invoice to the invoice it refunds](https://api-docs.production.bsport.io/changelog/v2-invoices-link-a-reverse-invoice-to-the-invoice-it-refunds.md) - [V2 refuses unknown query parameters](https://api-docs.production.bsport.io/changelog/v2-refuses-unknown-query-parameters.md) - [Venue management endpoints](https://api-docs.production.bsport.io/changelog/venue-management-endpoints.md) - [Versioned webhook registrations](https://api-docs.production.bsport.io/changelog/versioned-webhook-registrations.md) - [X-Timezone-Name applies to V2 requests](https://api-docs.production.bsport.io/changelog/x-timezone-name-applies-to-v2-requests.md) ## 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