Skip to main content

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 App Embed integration with at least one enabled modality;
  • an allowed origin for your web application; and
  • a session continuation URL controlled by your application.
Junction Management API requests use https://api.management.junction.com/ and the X-Management-Key header.
1

Configure your integration

See Concepts -> Configuration to set your slug, modalities, and allowed origins.
2

Create or resolve a team

Teams can include an integration_team_id, which is your stable team reference.
cURL
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, resolve it by integration reference:
cURL
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

Create the member that should be signed in through App Embed. Include team role bindings for every team the member should access.
cURL
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, resolve it by integration reference:
cURL
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 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 and environments):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

Create a post-authorization URL for the member, team, modality, feature, and environment.
cURL
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

For feature_embed, load the returned URL in an iframe:
<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.
For faster repeated launches, use Fast Launch after you have implemented Session Continuation.