Quick Start

Get started with the Links SDK in minutes.

Installation

Install the SDK package using your preferred package manager.

npm install @links/sdk

Get Your Credentials

Before making any requests, you must retrieve your API Key from the Financial Accounting Hub.

Setup & Usage

Follow these steps to initialize the client and make your first request.

Initialize the Client

Import LinksSDK and create a new instance. You can authenticate using an apiKey or an accessToken.

src/lib/links.ts
import { LinksSDK } from '@links/sdk'; 

export const client = new LinksSDK({
  // Your API Key / Bearer Token
  apiKey: '<YOUR_API_KEY_OR_BEARER_TOKEN>',
});

Make a Request

Use the typed API instances (like unifiedContactsApi or unifiedCustomerApi) to interact with resources.

src/app/page.tsx
import { client } from '@/lib/links';

async function getContacts() {
  try {
    // Fetch paginated contacts
    const response = await client.unifiedContactsApi.getPaginatedUnifiedContactList(
      1, // page
      10 // limit
    );

    return response.data;
  } catch (error) {
    console.error('Failed to fetch contacts:', error);
    return null;
  }
}

On this page