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

# Getting Started

> Configure Junction Connect and launch a Junction workflow from your application.

> [card]
>
> Interested in this feature? Get in touch with your Customer Success Manager.

Use this guide to launch Junction from your application for the first time.

## Prerequisites

You need:

* a Junction organization ID;
* a Junction Management Key;
* a registered Junction Connect integration with at least one enabled modality;
* an allowed origin for your web application; and
* a session continuation URL controlled by your application.

> [!TIP]
>
> Junction Management API requests use `https://api.management.junction.com/` and the `X-Management-Key` header.

### 1. Configure your integration

Use the [Set Junction Connect Configuration endpoint](https://docs.junction.com/api-reference/org-management/connect/set-configuration.md) to set your slug, modalities, and allowed origins. See [Concepts -> Configuration](https://docs.junction.com/connect/concepts.md#configuration) for details about each setting.

### 2. Create or resolve a team

Use the [Create Team endpoint](https://docs.junction.com/api-reference/org-management/team/create-team.md). Teams can include an `integration_team_id`, which is your stable team reference.

```bash cURL theme={null}
curl --request POST \
  --url https://api.management.junction.com/v1/org/{org_id}/team \
  --header 'Content-Type: application/json' \
  --header 'X-Management-Key: <management-key>' \
  --data '{
    "name": "Downtown Clinic",
    "region": "us",
    "integration_team_id": "clinic_123"
  }'
```

If the team already exists, use the [Resolve Team endpoint](https://docs.junction.com/api-reference/org-management/team/resolve-team.md) to resolve it by integration reference:

```bash cURL theme={null}
curl --request POST \
  --url https://api.management.junction.com/v1/org/{org_id}/resolve_team \
  --header 'Content-Type: application/json' \
  --header 'X-Management-Key: <management-key>' \
  --data '{
    "integration_team_id": "clinic_123"
  }'
```

### 3. Create or resolve an integration-managed member

Use the [Create Integration-Managed Member endpoint](https://docs.junction.com/api-reference/org-management/connect/create-member.md) to create the member that should be signed in through Junction Connect. Include team role bindings for every team the member should access.

```bash cURL theme={null}
curl --request POST \
  --url https://api.management.junction.com/v1/org/{org_id}/ehr_integration/member \
  --header 'Content-Type: application/json' \
  --header 'X-Management-Key: <management-key>' \
  --data '{
    "integration_member_id": "user_456",
    "name": "Alex Kim",
    "email": "alex@example.com",
    "team_role_bindings": [
      {
        "team_id": "00000000-0000-0000-0000-000000000000",
        "role": "admin"
      }
    ]
  }'
```

If the member already exists, use the [Resolve Integration-Managed Member endpoint](https://docs.junction.com/api-reference/org-management/connect/resolve-member.md) to resolve it by integration reference:

```bash cURL theme={null}
curl --request POST \
  --url https://api.management.junction.com/v1/org/{org_id}/ehr_integration/resolve_member \
  --header 'Content-Type: application/json' \
  --header 'X-Management-Key: <management-key>' \
  --data '{
    "integration_member_id": "user_456"
  }'
```

### 4. (Optional) Create or resolve a user (patient)

Skip this step unless you are launching a [feature](https://docs.junction.com/connect/overview.md#features) that is scoped to a specific patient, such as `order_creation:{user_id}`. In that case the patient must exist as a Junction user in the destination team before you create the dashboard URL — the patient-scoped feature slug embeds the Junction `user_id`.

Use the team-scoped Junction API (see [authentication](https://docs.junction.com/api-details/junction-api.md#authentication) and [environments](https://docs.junction.com/api-details/junction-api.md#environments)):

* [Create user](https://docs.junction.com/api-reference/user/create-user.md) — keyed by your `client_user_id`.
* [Update user demographics](https://docs.junction.com/api-reference/user/upsert-info.md) — set name, date of birth, and any other fields the feature requires.

To launch the embed scoped to this patient, use the patient-scoped feature slug (e.g. `order_creation:{user_id}`) as the `feature` value in the next step, substituting the resolved Junction `user_id`.

### 5. Create a dashboard URL

Use the [Create Dashboard URL endpoint](https://docs.junction.com/api-reference/org-management/connect/create-dashboard-url.md) to create a post-authorization URL for the member, team, modality, feature, and environment.

```bash cURL theme={null}
curl --request POST \
  --url https://api.management.junction.com/v1/org/{org_id}/ehr_integration/create_dashboard_url \
  --header 'Content-Type: application/json' \
  --header 'X-Management-Key: <management-key>' \
  --data '{
    "integration_member_id": "user_456",
    "integration_team_id": "clinic_123",
    "modality": "feature_embed",
    "feature": "order_creation",
    "environment": "sandbox"
  }'
```

### 6. Launch the URL

Use the URL returned by the [Create Dashboard URL endpoint](https://docs.junction.com/api-reference/org-management/connect/create-dashboard-url.md). For `feature_embed`, load it in an iframe:

```html theme={null}
<iframe
  src="https://..."
  title="Junction order creation"
  style="width: 100%; height: 800px; border: 0;"
></iframe>
```

For `link_out`, open the returned URL in a top-level navigation context, such as a new tab or popup window.

> [!NOTE]
>
> For faster repeated launches, use [Fast Launch](https://docs.junction.com/connect/fast-launch.md) after you have implemented [Session Continuation](https://docs.junction.com/connect/session-continuation.md).


## Related topics

- [Getting Started](https://docs.junction.com/sense/python-sdk/getting-started.md)
- [Continuous Query Overview](https://docs.junction.com/continuous-query-overview.md)
- [Android Health Connect](https://docs.junction.com/wearables/guides/android-health-connect.md)
- [Apple HealthKit](https://docs.junction.com/wearables/guides/apple-healthkit.md)
- [Samsung Health](https://docs.junction.com/wearables/guides/samsung-health.md)


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