Apideck Vault is here!Learn more

Search docs

SDKs

Apideck offers native SDKs in several popular programming languages. Choose one language below to see our API Reference in your application’s language.

Command Line

npm install @apideck/node

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

Node.js

import Apideck from 'apideck';

const apideck = new Apideck({
  apiKey: <insert-api-key-here>,
  applicationId: <insert-application-id-here>,
  consumerId: <insert-consumer-id-here>,
  serviceId: <insert-service-id-here>
});

Example

Retrieving a list of all contacts and updating the first record with a new address.

Node.js

import { Apideck, PhoneNumberType } from 'apideck'

const apideck = new Apideck({
  apiKey: <insert-api-key-here>,
  applicationId: <insert-application-id-here>,
  consumerId: <insert-consumer-id-here>,
  serviceId: <insert-service-id-here>
});

const { data } = await apideck.crm.contacts.list({
  limit: 10
})

const result = await apideck.crm.contacts.update({
  id: data[0].id!,
  contact: {
    name: "John Doe",
    firstName: "John",
    lastName: "Doe",
    addresses: [{
      city: "Hoboken",
      line1: "Streetname 19",
      state: "NY"
    }],
    phoneNumbers: [{
      number: "0486565656",
      phoneType: PhoneNumberType.Home
    }]
  }
})

console.info(result)

Methods

Once you created a new Apideck client you can use following methods

Node.js

import { Apideck } from 'apideck';

const apideck = new Apideck({
  apiKey: <insert-api-key-here>,
  applicationId: <insert-application-id-here>,
  consumerId: <insert-consumer-id-here>,
  serviceId: <insert-service-id-here>
});

// Companies API
apideck.crm.companies.list(parameters);
apideck.crm.companies.retrieve(parameters);
apideck.crm.companies.create(parameters);
apideck.crm.companies.update(parameters);
apideck.crm.companies.delete(parameters);

// Contacts API
apideck.crm.contacts.list(parameters);
apideck.crm.contacts.retrieve(parameters);
apideck.crm.contacts.create(parameters);
apideck.crm.contacts.update(parameters);
apideck.crm.contacts.delete(parameters);

// Leads API
apideck.crm.leads.list(parameters);
apideck.crm.leads.retrieve(parameters);
apideck.crm.leads.create(parameters);
apideck.crm.leads.update(parameters);
apideck.crm.leads.delete(parameters);

// Opportunities API
apideck.crm.opportunities.list(parameters);
apideck.crm.opportunities.retrieve(parameters);
apideck.crm.opportunities.create(parameters);
apideck.crm.opportunities.update(parameters);
apideck.crm.opportunities.delete(parameters);