InformlyInformly

TypeScript SDK

Install and configure the Informly TypeScript SDK

Installation

npm install @informly/sdk

Initialize the Client

import { Informly } from "@informly/sdk";

const client = new Informly.Client({
  token: "YOUR_API_TOKEN",
});

Configuration

OptionTypeDefaultDescription
tokenstringYour API token (required)
environmentstringhttp://api.informly.co/api/v1API base URL
timeoutInSecondsnumber30Request timeout

Error Handling

try {
  const contact = await client.contacts.getContact({ id: "contact-id" });
} catch (error) {
  if (error.statusCode === 404) {
    console.log("Contact not found");
  }
}

For endpoint usage examples, see the API Reference — each endpoint includes a TypeScript tab with SDK code.

Last updated on

On this page