> ## 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.

# API

> Changelog of core Junction API updates including lab test result interpretation, user ingestion bounds, and Sense query improvements.

### Error for closed beta endpoint calls is now JSON (Nov 2025)

Previously, if you tried to access an endpoint in closed beta and for which your team was not enabled, it would return a plain text error body. It now returns a JSON error body to align with the rest of our API.

### Lab Test Result Interpretation Filtering (June 2025)

You can now filter lab test orders by result interpretation using the new `interpretation` query parameter in the [GET /orders](/api-reference/lab-testing/get-orders) endpoint.

<Accordion icon="filter" iconType="duotone" title="Details" defaultOpen>
  The new filtering capability allows you to query orders based on their clinical interpretation:

  **Query Parameter:**

  * **`interpretation`** - Filter by result interpretation of the lab test
    * Type: `enum<string> | null`
    * Available options: `normal`, `abnormal`, `critical`
    * Note: This enum is non-exhaustive

  **Response Enhancement:**
  Order responses now include a new `interpretation` field providing the clinical assessment of the test results:

  * **`interpretation`** - Interpretation of the order result
    * Type: `enum<string> | null`
    * Available options: `normal`, `abnormal`, `critical`
    * Note: This enum is non-exhaustive

  This enhancement enables you to programmatically identify and prioritize critical lab results, improving clinical workflow efficiency and patient care monitoring.

  Check out the [GET /orders](/api-reference/lab-testing/get-orders) endpoint documentation.
</Accordion>

### Webhook Management Endpoints (May 2025)

You can now programmatically manage your webhooks via the [Webhooks API](/api-reference/org-management/team-webhook/list). The new endpoints allow you to:

* **CRUD** (create/read/update/delete) your webhooks
* Manage webhook **headers**
* Update webhook **secrets**

<Info>
  Org Management API is available for [the Scale plan](https://tryvital.io/pricing).
</Info>

### Team Management Keys (May 2025)

[Junction Management API](/api-details/junction-management-api) now supports Management Keys (previously *Org Keys*) that
are scoped to one or more Teams.

As a recap, there are now two types of Management Keys:

| Type                | Remarks                                                                                                                       |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| Org Management Key  | Full control of the organization — notably can create or delete Teams.                                                        |
| Team Management Key | Scoped control over one or more Teams. But it cannot access Org-level resources or actions, e.g., creating or deleting Teams. |

<Accordion title="Details" defaultOpen icon="key" iconType="duotone">
  All Management Keys — Org or Team — are accepted by the `X-Management-Key` header, as well as the deprecated `X-Vital-Org-Key` header.

  Selected customers can now manage Management Keys in the [Junction Dashboard](https://app.junction.com/) through:

  | Type                | Remarks                                                                    |
  | ------------------- | -------------------------------------------------------------------------- |
  | Org Management Key  | The **Org Config** page; accessible via the top-left corner Dropdown Menu. |
  | Team Management Key | The **Team Config** page.                                                  |

  Check out:

  * the [Create Management Key](/api-reference/org-management/management-keys/create-management-key) endpoint documentation;
  * the [List Management Keys](/api-reference/org-management/management-keys/list-management-keys) endpoint documentation; and
  * the [Delete Management Key](/api-reference/org-management/management-keys/delete-management-key) endpoint documentation.

  <Note>
    If you intend to create a Team Management Key that binds to 2 or more Teams, you must use the
    [Create Management Key](/api-reference/org-management/management-keys/create-management-key) API endpoint. Junction Dashboard does not
    support creating a key for more than one Team.
  </Note>

  <Note>
    Note that Management Keys cannot be used as Team API Keys to access the Junction API. However, you can
    [manage Team API Keys](/api-reference/org-management/team-api-keys/create-team-api-key) through a Management Key.
  </Note>

  <Info>
    [Junction Management API](/api-details/junction-management-api) is available for [the Scale plan](https://tryvital.io/pricing).
  </Info>
</Accordion>

### `X-Management-Key` header for Junction Management API (April 2025)

[Junction Management API](/api-details/junction-management-api) now accepts Management Keys (previously *Org Keys*)
in the `X-Management-Key` header, in addition to the `X-Vital-Org-Key` header.

We will continue to support the `X-Vital-Org-Key` header, though we recommend moving over to `X-Management-Key` to avoid
confusion, especially if you do plan to adopt Team Management Keys.

<Info>
  [Junction Management API](/api-details/junction-management-api) is available for [the Scale plan](https://tryvital.io/pricing).
</Info>

### Enhanced Historical Data Pull Status Tracking (May 2025)

We've added a new "Retrying" state to the Historical Pull Status page and the historical introspection endpoint, helping you distinguish temporary issues from permanent failures.
Additionally, failed historical pulls now include extra error information, making troubleshooting easier and more efficient.

<Info>
  This applies to connections established after May 9th.
</Info>

### Prepare Team Custom Credentials endpoint (Aug 2024)

The new [Prepare Team Custom Credentials](/api-reference/org-management/team-custom-credentials/prepare-team-custom-credentials) endpoint
provides instructions for preparation of [Bring Your Own OAuth](/wearables/connecting-providers/bring-your-own-oauth/overview) custom credentials.

You can use the information to configure things like OAuth callback URI and the Webhook URI (if applicable), before activating it on your
Junction Team through the [Set Team Custom Credential](/api-reference/org-management/team-custom-credentials/upsert-team-custom-credentials)
endpoint.

<Info>
  Org Management API is available for [the Scale plan](https://tryvital.io/pricing).
</Info>

### Azure Event Hub: Flexible routing (Aug 2024)

You can now configure your [Azure Event Hub destination in ETL Pipelines](/webhooks/etl-pipelines/azure-event-hubs)
to route Junction data events to different Event Hubs based on their event type prefix.

Check out the [ETL Pipelines - Azure Event Hub](/webhooks/etl-pipelines/azure-event-hubs#multiple-event-hubs) documentation.

<Info>
  ETL Pipelines are available for [the Scale plan](https://tryvital.io/pricing).
</Info>

### Azure Event Hubs as ETL Pipeline destination (Jun 2024)

You can now receive [events](/webhooks/introduction) from Junction directly with your Azure Event Hubs.

Check out the [ETL Pipelines](/webhooks/etl-pipelines/azure-event-hubs) documentation.

<Info>
  ETL Pipelines are available for [the Scale plan](https://tryvital.io/pricing).
</Info>

### Manage Team Brand Information (Apr 2024)

You can now manage Brand Information of your Junction Teams through the Org Management API.

<Accordion title="Details" defaultOpen icon="billboard" iconType="duotone">
  Team Brand Information is used in:

  1. the Junction-hosted [Link widget](/wearables/connecting-providers/introduction);
  2. all user communications in [Junction Lab Testing](/lab/overview/introduction) sent on your behalf; and
  3. the Junction-hosted Appointment Booking page for [Junction Lab Testing](/lab/overview/introduction).

  <Info>
    Org Management API is available for [the Scale plan](https://tryvital.io/pricing).
  </Info>

  Check out the [Update Team](/api-reference/org-management/team/update-team) and
  [Create Team](/api-reference/org-management/team/create-team) endpoint documentation.
</Accordion>

### Junction Orgs and Org Management API (Apr 2024)

We have introduced Junction Org, a new level that groups all your Junction Teams. Your Junction Teams have been
transparently grouped and migrated to the new structure.

<Accordion title="Details" defaultOpen icon="building" iconType="duotone">
  We introduced this to provide a unified billing and administrative experience for customers having these use cases:

  1. multi-region presence; or
  2. user organization with diverging team-level configurations.

  We introduced the Org Management API because customers have asked for programmatic access to
  dynamically create Junction Teams and manage different aspects of their Junction Teams.

  <Info>
    Org Management API is available for [the Scale plan](https://tryvital.io/pricing).
  </Info>

  Check out the [Org Management API](/api-reference/org-management) documentation.
</Accordion>

### New webhook event top-level fields (Mar 2024)

All events now include Team ID, User ID and Client User ID as top-level fields.

<Accordion title="Details" defaultOpen icon="message" iconType="duotone">
  We introduced this because this helps reduce a Junction User ID → Client User ID database lookup on your end.

  Check out the [Webhook Event Structure](/webhooks/event-structure) documentation.

  #### Before

  ```json Basic event structure theme={null}
  {
    "data": {
      # ... event specific data
    },
    "event_type": "daily.data.glucose.created",
  }
  ```

  #### After

  ```json Basic event structure theme={null}
  {
    "data": {
      # ... event specific data
    },
    "event_type": "daily.data.glucose.created",
    "user_id": "4a29dbc7-6db3-4c83-bfac-70a20a4be1b2",
    "client_user_id": "01HW3FSNVCHC3B2QB5N0ZAAAVG",
    "team_id": "6b74423d-0504-4470-9afb-477252ccf67a"
  }
  ```
</Accordion>

### Improved error response for User creation conflicts (Mar 2024)

The [Create User](/api-reference/user/create-user) endpoint has improved handling of
conflicts in Client User ID.

<Accordion title="Details" defaultOpen icon="circle-exclamation" iconType="duotone">
  We introduced this because the user creation endpoint being idempotent can help
  simplify your application logic.

  When the supplied `client_user_id` conflicts with an existing user, the 400 Bad Request response
  now includes the Junction User ID (`user_id`) and the creation date (`created_on`) of the conflicting user.

  Check out the [Create User](/api-reference/user/create-user) endpoint documentation.
</Accordion>

### User Undo Deletion (Feb 2024)

You can now undo user deletion that is still in the 7-day grace period.

<Accordion title="Details" defaultOpen icon="trash-undo" iconType="duotone">
  Check out the [User Undo Deletion](/api-reference/user/undo-delete-user) endpoint documentation.
</Accordion>
