TypeScript SDK
Install and configure the Informly TypeScript SDK
Installation
npm install @informly/sdkInitialize the Client
import { Informly } from "@informly/sdk";
const client = new Informly.Client({
token: "YOUR_API_TOKEN",
});Configuration
| Option | Type | Default | Description |
|---|---|---|---|
token | string | — | Your API token (required) |
environment | string | http://api.informly.co/api/v1 | API base URL |
timeoutInSeconds | number | 30 | Request 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