Skip to main content
POST
Create a Link token
Creates a Link token that you’ll use to initialize the Link flow in your frontend application.

Request Body Parameters

Required Parameters

  • user_id (string) - A unique identifier for the end user from your system. Do not use PII like email or phone.
  • org_id (string) - A unique identifier for the organization from your system (e.g., clinic or hospital ID).

Optional Parameters (for creating new organizations)

If the org_id doesn’t exist yet, provide these parameters to create the organization:
  • emr_name (string) - The EMR system name. Contact support for a list of supported EMR systems.
  • emr_instance_domain (string) - The EMR instance URL (e.g., https://your-emr-instance.com)

Other Optional Parameters

  • access_token (string) - Include to use update mode for an existing connection

Example Request (Existing Organization)

Example Request (New Organization)

Example Response

Update Mode

To use update mode for an existing connection, include the access_token in your request:
The Link token is single-use and expires after 30 minutes.

Authorizations

client_id
string
header
required
client_secret
string
header
required
access_token
string
header
required

Body

application/json
user_id
string
required

Your user ID for the account being linked.

org_id
string
required

Your organization ID for the account being linked.

access_token
string

Existing access token, when re-linking an account.

emr_name
string

EMR to link. Required when creating a new org (org_id not seen before).

emr_instance_domain
string

The EMR instance domain. Required when creating a new org.

timezone
string

IANA timezone for the account (e.g. America/New_York).

use_custom_domain
boolean

Whether emr_instance_domain is a custom domain.

domain_name
string

Domain name to record for an existing org that lacks one.

Response

Link token created

success
boolean
required
token
string
required