# Connections

A connection represents a link between your Makini account and a specific third-party system (e.g., an SAP instance, an Odoo account, or an UpKeep workspace). Each connection is a separate data channel — it has its own token, sync state, and credit cost.

Connections can be created through [Makini Link](/authentication), [Magic Links](#magic-links), or the [Admin API](/admin-api).

## Connection Properties

| Property | Description |
|----------|-------------|
| **Connection ID** | Technical identifier used in the Admin API. |
| **Connection name** | The name entered by you or your customer during the Makini Link flow. |
| **Email** | The email entered during the Makini Link flow. |
| **Credits** | Number of credits consumed by this connection. See [Connection Credits](/connection-credits). |
| **System** | The connected platform/adapter. |
| **Status** | Current state of the connection. See below. |
| **Connected at** | Timestamp of when the connection was established. |
| **Last sync** | Timestamp of the most recent data sync. |

## Connection Statuses

**Pending** — A Magic Link was created with a predefined connection name, metadata, etc., but the user has not completed the connection flow yet.

**Synchronizing** — Connection data is being initialized or updated from the connected system.

**In progress** — Data is being processed.

**Active** — The connection is fully operational and ready for API requests.

**Inactive** — The connection has been disabled due to insufficient credits. On paid accounts, it can be reactivated as Overage.

## Metadata

Connections support custom key-value metadata. This allows you to store additional information alongside a connection, such as a customer ID in your own system or platform-specific configuration parameters.

Metadata can be set when creating or editing a connection in the dashboard. It is accessible via the connection status API as the `user_metadata` field.

## Magic Links

A Magic Link is a pre-configured Makini Link URL that includes a predefined connection name, metadata, and other parameters. This allows you to generate a unique onboarding link for each of your customers, so that when they complete the flow, the connection is automatically associated with the right context.

To create a Magic Link:

1. Navigate to **Connections** in the dashboard.
2. Click **Create new**.
3. Enter the connection details (name, metadata, etc.).

The generated link can be shared with your customer. Until they complete the authentication flow, the connection appears in your dashboard with a **Pending** status.

## Checking Connection Status via API

You can check the status of a connection programmatically:

```bash
curl https://api.makini.io/api/integrations/current \
    -H "Authorization: Bearer CONNECTION_TOKEN"
```

This returns the current connection's properties including its status, system, and last sync timestamp.
