For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SandboxDashboard
DocumentationAPI ReferenceChangelog
  • Getting Started
    • Overview
      • Overview
      • TypeScript
      • Python
  • Concepts
    • Eligibility
    • Providers
    • Patients
    • Notes
    • Services
    • Revalidation
    • Consent
  • Eligibility
    • Soft Eligibility
    • Hard Eligibility
    • Policy Errors
    • Conditional Patient Responsibility
  • Guides
    • Enrollment Status
    • Monitoring Payer Health
    • Webhook Behavior
  • Integrations
LogoLogo
SandboxDashboard
On this page
  • Features
  • Installation
  • Quick Start
  • Resources
Getting StartedAPI Client

TypeScript

Was this page helpful?
Previous

Python

Next
Built with

Bridge provides a TypeScript client for interacting with the Bridge API. This SDK simplifies API integration by providing type-safe methods, automatic authentication handling, and built-in error handling.

Features

  • Type Safety: Full TypeScript support with generated types from our API specification
  • Authentication: Automatic token management and refresh handling
  • Error Handling: Comprehensive error handling with detailed error messages
  • Request/Response Validation: Built-in validation for all API requests and responses
  • Modern JavaScript: ES6+ features with async/await support

Installation

Install the SDK from npm:

$npm install @usebridge/api

Or using yarn:

$yarn add @usebridge/api

Quick Start

1import { BridgeApiClient, BridgeApiEnvironment } from "@usebridge/api"
2
3// Initialize the client
4const client = new BridgeApiClient({
5 apiKey: "your-api-key",
6 environment: BridgeApiEnvironment.Production, // or BridgeApiEnvironment.Sandbox (defaults to BridgeApiEnvironment.Production if not specified)
7})
8
9// Create a Patient
10const patient = await client.patients.v2.createPatient({
11 firstName: "Jane",
12 lastName: "Smith",
13 email: "patient@example.com",
14 dateOfBirth: "2000-01-01",
15})

Resources

NPM Package
GitHub Repository
API Reference
Testing Guide