Normalize multiple APIs to your own universal schema using Nango functions.
API unification means building a single, consistent interface across multiple APIs that share the same domain — for example, syncing contacts from HubSpot, Salesforce, and Pipedrive using one unified Contact model.Nango lets you define your own unified models and implement the mapping logic in TypeScript functions. Unlike pre-built unified APIs, you control the schema and can handle API-specific edge cases without being boxed in.
Unification delivers the most value when you integrate with multiple APIs in the same category — CRMs, HR platforms, accounting systems, support tools — where customers choose between providers. Standardizing these into a single internal model means you only change the mapping logic, not your application.
Unification doesn’t have to be perfect to be useful. Even partial alignment across APIs reduces downstream complexity.
Not all APIs are good candidates. APIs with highly unique structures (like Notion’s block system) are difficult to unify with others. For those, use Nango’s proxy or functions without unification.
Once syncs are running, read records using the same model regardless of provider.
import { Nango } from '@nangohq/node';const nango = new Nango({ secretKey: process.env.NANGO_SECRET_KEY! });// Works the same for hubspot, salesforce, pipedrive — same model, same callconst { records } = await nango.listRecords<ContactUnified>({ providerConfigKey: 'hubspot', // or 'salesforce', 'pipedrive' connectionId: 'user-123', model: 'ContactUnified',});
Use your existing data model as the unified schema
If your application already has a data model for contacts, invoices, or tickets — use it as the unified model. This keeps your codebase consistent and avoids a separate translation layer in your app.
Expect nullable fields
Not every API provides the same data. Design your unified model with nullable fields for data that may be absent from some providers, and handle missing values gracefully.
Use the same model for reads and writes
Use identical input/output types for both syncs (reads) and actions (writes). This eliminates duplicate mapping logic and makes your integration easier to maintain.
Handle API-specific extensions
For fields unique to one provider, extend your unified model rather than polluting the shared schema. You can attach raw API responses in a separate field for maximum flexibility.