---
title: "Bulk Import Connections"
method: POST
path: "/v2/link/bulk_import"
tags: ["link"]
---

# Bulk Import Connections

`POST /v2/link/bulk_import`

## Request body

- BulkImportConnectionsBody
  - `provider` 'oura' | 'fitbit' | 'garmin' | 'strava' | 'wahoo' | 'ihealth' | 'withings' | 'google_fit' | 'dexcom_v3' | 'polar' | 'cronometer' | 'omron' | 'whoop_v2' | 'my_fitness_pal_v2' | 'ultrahuman' | 'runkeeper' | 'google_health', required — ℹ️ This enum is non-exhaustive.
  - `connections` ConnectionRecipe[], required
    - `user_id` string, uuid, required — Vital User ID. The user must be created ahead of the bulk import operation.
    - `access_token` string, required — * OAuth 2.0 providers (Fitbit, etc): The latest Access Token. * OAuth 1.0 providers (Garmin): The Access Token.
    - `refresh_token` string, required — * OAuth 2.0 providers (Fitbit, etc): The latest Refresh Token. * OAuth 1.0 providers (Garmin): The Token Secret.
    - `provider_id` string, required — User ID of the data provider. * Fitbit: 6-character Fitbit User ID * Garmin: 36-character Garmin User ID
    - `expires_at` integer, required — Access token expiry date, in terms of UNIX epoch seconds. * OAuth 2.0 providers (Fitbit, etc): The latest expiry date on your record. * OAuth 1.0 providers (Garmin): Use the constant value `2147483647`.
    - `oauth_scopes` string[], nullable — OAuth scopes of the data provider. Specify `null` if you do not have any scopes on record. * Fitbit: Has scopes * Garmin: No scope
  - `wait_for_completion` boolean — Whether or not the endpoint should wait for the Bulk Op to complete before responding. When `wait_for_completion` is enabled, the endpoint may respond 200 OK if the Bulk Op takes less than 20 seconds to complete. Otherwise, the endpoint always responds with 202 Created once the submitted data have been enqueued successfully. You can use the [List Bulk Ops](https://docs.tryvital.io/api-reference/link/list-bulk-ops) endpoint to inspect the progress of the Bulk Op.

## Response `200`

Successful Response

- BulkImportConnectionsResponse
  - `user_ids_imported` string[], required
  - `user_ids_failed` string[], required

## Other responses

- `202` — Accepted
- `422` — Validation Error

---

[API](https://skmtc.net/tryvital/apis/junction-api.md) · [All operations](https://skmtc.net/tryvital/apis/junction-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tryvital/junction-api/versions/d28f5cec7d79/schema)
