Skip to content

Using LLMs for custom integrations

Large language models (LLMs) like ChatGPT, Claude, or Gemini can help your team build Public API integrations faster. Use them to plan, draft requests and generate automation steps, then validate every output before going live.

Who this page is for

This page is for developers and automation builders who write a REST integration with an LLM's help. To let an assistant work with the records of your own company or franchise team, see the MCP overview. To learn the API itself, start with Getting started.

Security rules to follow

Never share secrets or sensitive data in prompts

Do not paste production API keys, client personal data, payment data, or internal identifiers into ChatGPT, Claude, Gemini, or any other external AI tool.

Before using an LLM: - Use placeholder values like YOUR_API_KEY instead of real credentials. - Remove or anonymize personal or sensitive information and payment-related fields. - Share only the minimum context needed to get useful help. - Review your company AI policy and compliance requirements.

The documentation pages and OpenAPI files are public: share them freely.

Give the LLM the right sources

An LLM that answers from memory often returns V1 paths or outdated field names. Give it the current sources below.

Read the table by source. Each row says what it settles.

Source Use it for
openapi-v2.yml Endpoints, fields, filters and the status codes each operation declares. This is the source of truth. The file is close to 1 MB, over 250,000 tokens.
llms.txt An index of the guides for assistants that can fetch web pages: authentication, pagination, errors, rate limits, task guides, webhooks and the changelog. Each guide also has a Markdown version: replace .html with .md in its URL.
llms-full.txt The full text of those guides in one file of about 230 KB, for an assistant that cannot fetch several pages.

The OpenAPI file decides endpoints, fields and filters. The guides decide behavior the file does not describe, such as tenant headers, pagination, retries and the side effects of writes. The changelog lists renamed fields.

Use openapi-v2.yml only. V1 retires on January 15, 2027: see Migrate from V1 to V2.

Prompt workflow

Use this workflow: 1. Download openapi-v2.yml from the API reference. Give it to a coding assistant that reads files from your project, or to a tool that searches attached files. A chat that loads an attached file whole cannot hold it: paste the operations you need from the API reference instead. 2. Give the assistant the llms.txt URL, or attach llms-full.txt if it cannot fetch pages. 3. Use the baseline prompt below and adapt it to your endpoint and goal.

Baseline prompt template (copy/paste)

You are an integration engineer helping me build a bsport Public API integration.

Source of truth:
- Use the attached V2 OpenAPI file for endpoints, fields and filters.
- Use the bsport guides I provide for authentication, pagination and errors.
- Use only /api/v2/ paths. Do not rely on memory or guesses.

Safety:
- Use placeholders only (no real API key, personal data or payment data).

Missing info rule:
- If anything is missing or ambiguous, do not guess. Return what is missing,
  where it is needed, and what I should provide next.

Return:
1) Step-by-step setup (Make and/or n8n if relevant)
2) Example HTTP request (URL, headers, query params, body)
3) Basic error handling (at least 401, 403, 429, 500 when applicable)
4) Test checklist

Example: Build a ping

Prompt (copy/paste):

You are an integration engineer helping me build a bsport Public API integration.

Source of truth:
- Use the attached V2 OpenAPI file for endpoints, fields and filters.
- Use the bsport guides I provide for authentication, pagination and errors.
- Use only /api/v2/ paths. Do not rely on memory or guesses.

Safety:
- Use placeholders only (no real API key, personal data or payment data).

Missing info rule:
- If anything is missing or ambiguous, do not guess. Return what is missing,
  where it is needed, and what I should provide next.

Task:
- Tool: [YOUR_TOOL] (Make scenario or n8n workflow)
- Endpoint: GET /api/v2/monitoring/health/ping/
- Include the required headers from the spec (placeholders for values).
- Add a success branch (200), a failure branch (401/403) and handling for 429 and 500.

Return:
1) Exact module-by-module (Make) or node-by-node (n8n) steps
2) Request configuration (method, URL, headers)
3) Test checklist

Typical result you should expect:

  • A GET request (a Make HTTP module or an n8n HTTP Request node) with these headers as placeholders:
    • X-Api-Key: YOUR_API_KEY
    • X-Client-ID: YOUR_CLIENT_ID
    • X-Company-ID: YOUR_COMPANY_ID with a company API key, or X-Franchisor-ID: YOUR_FRANCHISOR_ID with a franchise API key
  • A success path for 200, a failure path for 401/403 (an n8n IF node or a Make router), and retry handling for 429 and 500.

LLM prompt cookbook

Use these ready-to-copy prompts for common integration tasks. Each prompt keeps the same rule: OpenAPI file first, placeholders only.

Name the tool in the Tool: line: Make (modules, routers, error branches), n8n (nodes, IF, retries) or custom code (Python, Node.js, etc).

1. Create a client

You are an integration engineer helping me build a bsport Public API integration.

Source of truth:
- Use the attached V2 OpenAPI file for endpoints, fields and filters.
- Use the bsport guides I provide for authentication, pagination and errors.
- Use only /api/v2/ paths. Do not rely on memory or guesses.

Safety:
- Use placeholders only (no real API key, personal data or payment data).

Missing info rule:
- If anything is missing or ambiguous, do not guess. Return what is missing,
  where it is needed, and what I should provide next.

Task:
- Tool: [YOUR_TOOL] (Make, n8n, or custom code)
- Endpoint: POST /api/v2/management/clients/

Return:
1) Required fields checklist
2) Example HTTP request with placeholders
3) Tool-specific implementation for [YOUR_TOOL]
4) Validation checklist before production

Expected output: - A field checklist and a request example with placeholder headers and payload values. - A warning that the call is not idempotent: after a timeout, look the client up by email before you retry. - A setup or runnable code matching Tool: [YOUR_TOOL].

2. List bookings with filters

You are an integration engineer helping me build a bsport Public API integration.

Source of truth:
- Use the attached V2 OpenAPI file for endpoints, fields and filters.
- Use the bsport guides I provide for authentication, pagination and errors.
- Use only /api/v2/ paths. Do not rely on memory or guesses.

Safety:
- Use placeholders only (no real API key, personal data or payment data).

Missing info rule:
- If anything is missing or ambiguous, do not guess. Return what is missing,
  where it is needed, and what I should provide next.

Task:
- Tool: [YOUR_TOOL] (Make, n8n, or custom code)
- Goal: list the bookings of one client for a date range and a booking status
- Endpoint: GET /api/v2/management/bookings/

Return:
1) Query parameters to use
2) Example request URL and headers
3) How to handle pagination safely
4) Tool-specific implementation for [YOUR_TOOL] (including pagination)

Expected output: - The filters from the schema: client_id, class_start_after, class_start_before and booking_status_code. - Pagination logic that sends page until next_page is null. - A setup or runnable code matching Tool: [YOUR_TOOL].

3. Handle 401 and 403

You are an integration engineer helping me build a bsport Public API integration.

Source of truth:
- Use the attached V2 OpenAPI file for endpoints, fields and filters.
- Use the bsport guides I provide for authentication, pagination and errors.
- Use only /api/v2/ paths. Do not rely on memory or guesses.

Safety:
- Use placeholders only (no real API key, personal data or payment data).

Missing info rule:
- If anything is missing or ambiguous, do not guess. Return what is missing,
  where it is needed, and what I should provide next.

Task:
- Tool: [YOUR_TOOL] (Make, n8n, or custom code)
- Design error handling for auth errors (401 and 403)
- Example endpoint: GET /api/v2/monitoring/health/ping/

Return:
1) Decision tree for 401 vs 403
2) Operator actions for each error
3) Tool-specific implementation for [YOUR_TOOL]
4) Alert message templates without sensitive data

Expected output: - A decision flow that separates a rejected API key (401) from a missing key or a tenant context the key cannot act on (403). Compare it with Errors and status codes. - Operator actions: check the key, the tenant headers and the access scope. - Alert templates that do not expose secrets or client data.

Human validation checklist

Before moving to production: - Replace placeholders only inside your secure environment. - Confirm the required headers are present: X-Api-Key, X-Client-ID and a tenant header. - Confirm every path starts with /api/v2/. - Start with read requests: an API key acts on live data. See Base URL. - Validate failure behavior for 401, 403, 429, and 500. The V2 OpenAPI file declares 401, 403 and 429 on every operation but 500 on only a few, so handle 500 on every call. See Retries for reads and writes. - Keep logs and monitoring enabled for the new workflow.

Common mistakes

  • Asking the LLM to "use my real key from this message".
  • Pasting real client records into a prompt for troubleshooting.
  • Deploying generated workflows without manual review.
  • Accepting V1 names in generated code, such as /api/v1/ paths, session_id, period_start or base_price. The renames are in Migrate from V1 to V2 and the changelog.
  • Loading the whole OpenAPI file into a chat that cannot hold it.

Next step

After your ping works, ask the LLM for one endpoint at a time and review each generated step against your security and QA process.