Skip to main content
You use Junction API to:
  • manage users and demographics information in your Team with the Core API;
  • manage user connections, pull ingested device data, inspect connection backfill statuses through the Devices API;
  • order lab tests, manage appointments and pull the results through the Lab Testing API; and
  • aggregate ingested device data with the Junction Sense API.
For managing Team configuration and Org resources programmatically, see Junction Management API.

Environments

Junction provides two Sandbox environments and two Production environments today:
EnvironmentBase URLTeam API Key Prefix
πŸ‡ΊπŸ‡Έ Production UShttps://api.us.junction.com/pk_us_*
πŸ‡ͺπŸ‡Ί Production EUhttps://api.eu.junction.com/pk_eu_*
πŸ‡ΊπŸ‡Έ Sandbox UShttps://api.sandbox.us.junction.com/sk_us_*
πŸ‡ͺπŸ‡Ί Sandbox EUhttps://api.sandbox.eu.junction.com/sk_eu_*
If you are using a *.tryvital.io Base URL, they are still supported alongside *.junction.com.
Sandbox environments are functionally identical to Production environments, except that:
  1. Each Team can have only up to 50 Users in Sandbox;
  2. You can create Synthetic Device connections; and
  3. You can simulate and transition an order through its lifecycle.

Authentication

Junction API accepts two team-scoped credential types β€” pick one per request.
CredentialLifetimeHeaderProvisioned via
Team API KeyLong-lived until revokedX-Vital-API-Key: <key>Team Config page in the Junction Dashboard or Create Team API Key
Team API Access TokenSeveral minutesAuthorization: Bearer <token>Created programmatically via Create Team API Access Token

When to use a Team API Key

Choose a Team API Key when your system can safely store a pre-shared secret and you intend to issue separate team-scoped keys to your own divisions or environments. Keys are listed and rotated from the Team Config page in the Junction Dashboard, or programmatically through the Management API via Create Team API Key.
cURL
curl --request GET \
  --url 'https://api.us.junction.com/v2/providers' \
  --header 'X-Vital-API-Key: <YOUR-TEAM-API-KEY>'

When to use a Team API Access Token

Choose a Team API Access Token when you are integrating Junction into a multi-tenant EMR or similar platform and need to act on behalf of many customer teams without provisioning and storing a Team API Key for each one. Mint a token on demand from your backend by calling the Management API endpoint Create Team API Access Token with your Management Key, then call Junction API with the returned token.
cURL
curl --request GET \
  --url 'https://api.us.junction.com/v2/providers' \
  --header 'Authorization: Bearer <YOUR-TEAM-API-ACCESS-TOKEN>'
Tokens are short-lived (several minutes) and the Create Team API Access Token endpoint is rate limited. Cache and reuse each token until it expires rather than minting per request. When a Junction API call returns 401 Unauthorized, mint a fresh token by calling the endpoint again, then retry the request.
A Management Key used by Junction Management API does not function as a Team API Key. However, you can provision Team API Keys and mint Team API Access Tokens through a Management Key.

Junction Mobile SDKs

Junction Mobile SDKs support two authentication methods:
SchemeAuthorizationRecommended use case
Sign-In TokenUser-scoped accessProduction mobile apps
Team API KeysFull Team data accessProof-of-concept
Refer to the Mobile SDK Authentication documentation for more information.