> ## Documentation Index
> Fetch the complete documentation index at: https://docs.famulor.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Magicline Open API

> Give your assistant access to studio information, courses and availability

For trial session booking without a Magicline API key, use the separate [Magicline Connect API](https://docs.famulor.io/automations/magicline-connect.md).

Answer studio questions with data from your own Magicline connection. Start with six read functions, choose which ones an assistant can use, and connect several studios when your assistant serves more than one location.

## Connect your studio

1. Open **Agent Tools → Marketplace → Magicline Open API**.
2. Enter the **Studio ID** and the API key issued for that studio.
3. Enter your **Magicline Open API URL**, for example `https://your-studio.open-api.magicline.com/v1`. Use the URL and key from the same Magicline activation.
4. Save the connection and select **Assign** to attach it to an assistant. Give each connection a recognizable studio name.
5. Open **Installed → Edit → Tools** to enable or disable individual functions.

Magicline must grant access for the studio and operations you want to use. Connecting a key or selecting a checkbox does not create additional permissions. [Magicline access requirements](https://developer.sportalliance.com/apis/magicline/openapi/general-information).

Magicline sends the API key and matching API address to the integration partner after the studio activates the integration. If these details are missing, contact your Magicline administrator or integration partner. The API address is required for a direct connection. Existing custom proxy connections keep their configured address; their optional address field is under **Change connection address**.

## What your assistant can look up

| Read function | Use it to answer |
| - | - |
| Studio information | Studio name, contact details and address |
| Course list | Which courses the studio offers |
| Course details | Description and duration of a selected course |
| Schedule | Course sessions within a date window |
| Course dates | Sessions for a particular course |
| Slot availability | Details and available places for one session |

These six reads are selected initially. The extended catalog contains 169 documented operations. Additional reads depend on your Magicline access. Booking and other writes remain unavailable in this connection, including when selected in the catalog.

Ask for the location before retrieving studio-specific facts. Use the time tool before interpreting “tomorrow” or “next week”. Course and session IDs come from earlier results for the same studio; visitors should not have to know them. Pages can include a continuation cursor: follow it before claiming a complete list. A bookable session may still be full or have a waitlist.

## One assistant, several studios

Connect and assign each studio separately. Famulor automatically gives new connections distinct tool names for each studio. Existing connections keep their naming format; there is no naming switch to configure.

Describe the supported locations and require confirmation when a city name is ambiguous. On a location change, retrieve fresh results and discard the previous studio’s course IDs, session IDs and availability. Use direct tools for studio lookups; an automation is optional.

## Use Magicline in automations

Under **Automations → Connections**, connect Magicline or choose **Import from Agent Tools**. Importing preserves the credentials and selected operations. Add a **Magicline** action and map its fields from the trigger or earlier steps. Its response is available to later actions, including other connected apps.

Start the flow manually, on a schedule, from a conversation event or with an inbound webhook. The connection does not subscribe to Magicline events. Use an automation when several steps must run together; a CRM is not required to connect Magicline.

## Booking availability

This connection currently reads information and does not create bookings. Booking requires provider write permission and support for the specific booking operation. Availability alone is not a reservation. Only confirm a booking after a successful booking response; check an unclear result before retrying. Any later CRM step should preserve the actual booking status and the visitor’s consent.

## API, MCP, CLI & SDK

`POST /api/v1/tools/magicline` · MCP `connect_magicline` · CLI `famulor connect-magicline`.

`POST /api/v1/automations/connections/import` · MCP `import_automation_connection` · CLI `famulor import-automation-connection`.

```bash theme={null}
famulor connect-magicline --studio-id "$STUDIO_ID" --api-key "$MAGICLINE_KEY" --api-base-url "$MAGICLINE_API_URL" --name magicline_studio
famulor import-automation-connection --user-tool-id "$TOOL_ID"
```

```typescript theme={null}
import { Famulor } from 'famulor-sdk';

const client = new Famulor({ apiKey: process.env.FAMULOR_API_KEY });
const { data: tool } = await client.api.connectMagicline({ body: {
  studio_id: process.env.MAGICLINE_STUDIO_ID!,
  api_key: process.env.MAGICLINE_KEY!,
  api_base_url: process.env.MAGICLINE_API_URL!,
  name: 'magicline_studio',
} });
const { data: connection } = await client.api.importAutomationConnection({
  body: { user_tool_id: tool.id },
});
console.log({ toolId: tool.id, connectionId: connection.id });
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.