Typescript SDK

Apideck offers a native SDK for Typescript. Choose one language below to see our API Reference in your application’s language.

Command Line
npm install @apideck/unify

Getting started

The module supports all Apideck API endpoints. For complete information about the API, head to the docs. All endpoints require a valid apiKey so that's the only required parameter to initialize a new Apideck client

Typescript
import { Apideck } from "@apideck/unify";

const apideck = new Apideck({
  apiKey: process.env["APIDECK_API_KEY"] ?? "",
  consumerId: "<insert-consumer-id-here>",
  appId: "<insert-application-id-here>",
});

async function run() {
  const result = await apideck.crm.contacts.list({
    serviceId: "salesforce",
    filter: {
      name: "Elon Musk",
      firstName: "Elon",
      lastName: "Musk",
      email: "elon@tesla.com",
      phoneNumber: "111-111-1111",
      companyId: "12345",
      ownerId: "12345",
    },
    sort: {
      by: "created_at",
      direction: "desc",
    },
    passThrough: {
      "search": "San Francisco",
    },
    fields: "id,updated_at",
  });

  for await (const page of result) {
    // Handle the page
    console.log(page);
  }
}

run();