intercom-client

Official TypeScript/Node.js SDK for the Intercom API, covering contacts, conversations, tickets, and help center resources with full type safety.

SDK
npm
v7.0.3
389stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
60/100Good
Development Activity48
Maintenance24
Community88
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
80/100Excellent
Architecture85
Code Quality80
Innovation75
Learning Curve80

intercom-client is the official Node.js and TypeScript SDK for the Intercom customer messaging and support platform’s REST API. Generated with Fern directly from Intercom’s API definition, it exposes every resource — contacts, companies, conversations, tickets, articles, help centers, data attributes, and more — as a typed, promise-based client with request and response interfaces exported for every operation.

The library ships as a modern dual CJS/ESM package with runtime support for Node.js 18+, Vercel, Cloudflare Workers, Deno, Bun, and React Native. It bundles automatic retries with exponential backoff and jitter, configurable timeouts, abortable requests, iterator-based pagination, pluggable authentication, and structured logging, so teams building on top of Intercom (chat, help desk, ticketing, or workflow automation) get a consistent, low-boilerplate client instead of hand-rolling HTTP calls against the raw API.

What You Get

  • A single IntercomClient with lazily-instantiated, resource-scoped sub-clients (client.contacts, client.conversations, client.tickets, etc.) for every Intercom API area
  • Fully typed request and response interfaces for every endpoint, exported under the Intercom namespace
  • Typed error subclasses (e.g. UnauthorizedError, NotFoundError) thrown per documented failure mode, plus a base IntercomError and IntercomTimeoutError
  • Automatic pagination via an AsyncIterable Page wrapper so list endpoints can be looped over directly or paged manually
  • Built-in retry-with-backoff, configurable timeouts, abort-signal support, and a swappable fetch implementation for restricted runtimes
  • Support for both region-specific environments (US, EU, AU) and a custom baseUrl override, plus a withRawResponse() accessor for raw headers/status

Common Use Cases

  • Syncing contacts, companies, and their custom attributes between Intercom and an internal CRM or data warehouse
  • Building conversational or helpdesk automations that read and reply to conversations, tickets, and notes
  • Publishing and maintaining Help Center articles and collections programmatically from a CMS or docs pipeline
  • Sending targeted in-app or push messages and tracking custom data events from a product backend
  • Exporting Intercom data (companies, conversations, data attributes) in bulk for analytics or compliance workflows

Under The Hood

Architecture The SDK centers on IntercomClient (src/Client.ts), which lazily instantiates one dedicated client per API resource (AdminsClient, ContactsClient, ConversationsClient, and 30+ others under src/api/resources/) via ??= getters, so only the resources a consumer touches get constructed. Every resource client shares normalized options from BaseClient.ts (auth provider, headers, timeout, retries, custom fetch) and delegates actual HTTP work to core/fetcher, which wraps fetch with retry/backoff (requestWithRetries.ts), URL construction, and typed response parsing. Pagination is abstracted into a single reusable Page<T, R> class (core/pagination/Page.ts) implementing AsyncIterable, and authentication is pluggable through an AuthProvider interface with BearerToken/BasicAuth implementations — a change to the core request or pagination contract would ripple through every one of the 36 resource clients, since they all import from the same core/ and BaseClient.ts modules rather than duplicating request logic.

Tech Stack Written in TypeScript and built with tsc into parallel CJS and ESM output (tsconfig.cjs.json / tsconfig.esm.json), targeting Node.js 18+ as well as Cloudflare Workers, Deno, Bun, and React Native via a pluggable fetch layer. Ships with zero runtime dependencies; tooling is Biome for linting and formatting, Vitest for tests (with a unit/wire project split), and MSW for mock HTTP servers in wire tests. Package management is pnpm with a workspace config, and the whole client is generated from Intercom’s API definition using the Fern code-generation toolchain, with a large reference.md serving as the exhaustive per-method API reference.

Code Quality Test coverage spans three tiers: tests/unit for core utilities (auth, fetcher, URL encoding, base64, logging), tests/wire for per-resource request/response contract tests against a mock server pool, and tests/integration for end-to-end calls against live-shaped fixtures across nearly every resource. Errors are modeled as typed classes rather than swallowed, methods carry JSDoc with @param/@throws/@example blocks, and Biome enforces consistent formatting and lint rules across the generated codebase. Being Fern-generated, hand-authored contributions are discouraged in favor of regenerating from the API definition, which trades some organic code-review history for strict internal consistency across all 36 resources.

API Design The public surface favors discoverability and safety over minimalism: resource-scoped clients (client.contacts.list(...)) read naturally, every parameter and return type is fully typed, and list endpoints return an async-iterable Page so callers can for await results without manually tracking cursors. Advanced needs are covered without adding boilerplate to the common path — request-level header/query overrides, retry limits, timeouts, abort signals, and a .withRawResponse() escape hatch for raw headers are all opt-in. The version pin (version option, e.g. 2.14) and region-specific IntercomEnvironment constants make it straightforward to target a specific Intercom API version and data region explicitly.

Used by 5 apps in this directory

TypeScript
99%
Other

Activepieces

Automation · AI Assistants

24,298

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
64
Dependency
Built with
TypeScript99%
Updated today
TypeScript
100%
MIT

Botpress

AI Assistants · AI Development · Customer Support

14,893

The open-source hub for building and deploying LLM-powered AI agents with TypeScript-first tooling, 40+ integrations, and a revolutionary code-execution agent framework.

View details
94
Repo Health
82
Technical
64
Dependency
Built with
TypeScript100%
Updated 3 days ago
TypeScript
100%
Other

Dub

Marketing · Analytics

24,676

The open-source link attribution platform for short links, conversion tracking, and affiliate programs — powering 100M+ clicks monthly.

View details
80
Repo Health
78
Technical
62
Dependency
Built with
TypeScript100%
Updated 2 days ago
TypeScript
94%
Apache 2.0

flue

AI Agents · Developer Tools

8,141

Build autonomous AI agents and powerful workflows with a programmable TypeScript harness that gives any model sessions, tools, sandboxes, and durable execution.

View details
67
Repo Health
82
Technical
73
Dependency
Built with
TypeScript94%
Updated 1 weeks ago
JavaScript
26%
AGPL 3.0

Omnivore

Knowledge Management · Bookmarks Archiving · Note Taking

16,228

Self-hosted read-it-later platform with highlights, newsletters, PDFs, and seamless Obsidian and Logseq integration.

View details
88
Repo Health
74
Technical
65
Dependency
Built with
JavaScript26%
TypeScript25%
HTML19%
Updated 2 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search