GTM Engineering term, automation and APIs

SDK

An SDK (software development kit) is a packaged set of code libraries, tools and docs that makes it easier to build on a platform or call its API from a specific language.

Also called: software development kit, client library, API wrapper, tracking SDK

SDK sits under every stage: it's part of the data and systems the whole funnel runs on, near related terms like API, REST API and API key (the blue squares).

An SDK, or software development kit, is a packaged set of libraries, tools and documentation that makes it easier to build on a platform or call its API from code. Instead of hand-writing HTTP requests, you install the vendor's library and call functions like contacts.create(). GTM teams meet SDKs in two places: client libraries for tools like CRMs and AI models, and tracking libraries that send product events.

How it works

An API defines what you can ask a service to do. An SDK wraps that API for one language, such as JavaScript, Python, Ruby or Go, and handles the tedious parts:

  • Authentication: you pass your API key or token once and it's attached to every call.
  • Pagination: list functions follow cursors for you.
  • Retries and errors: many SDKs back off on rate limits and raise readable exceptions.
  • Types: objects and fields are defined, so your editor autocompletes and flags typos.

Official SDKs come from the vendor. HubSpot, Stripe and the major AI model providers publish their own. Community SDKs fill gaps, such as popular open-source Salesforce libraries. Under the hood, most SDKs still make REST API calls.

The second kind is the tracking SDK: a snippet or library you add to your site or app that captures event tracking data and ships it to product analytics or a CDP.

Example

Say you need to export 25,000 contacts from a CRM API that returns 100 per page. Hand-rolled, you write the request, parse the cursor, loop 25,000 / 100 = 250 times, catch 429s, sleep, retry and handle the last partial page. That's easily 60 to 80 lines and a few hours of debugging edge cases (assumption).

With the vendor's SDK, it's often a single paginated "get all" call plus a few lines of error handling. Same 250 requests on the wire, maybe 20 minutes of work. Across a dozen integrations, that difference adds up to days.

When to use an SDK

Use the official SDK when you're writing real code: a serverless function, a data sync script or a custom integration. It keeps you current with API changes and cuts boilerplate.

Skip it when you're in an iPaaS with a prebuilt connector, or when the SDK is unmaintained and lags the API. A stale SDK is worse than none, because it hides which API version you're actually calling.

Common mistakes

  • Using an abandoned community SDK that still targets a deprecated API version.
  • Pinning no version, so an SDK update changes behavior on the next deploy.
  • Assuming the SDK handles rate limits when it doesn't.
  • Installing tracking SDKs on the site and in the app with different event names for the same action.
  • Hardcoding keys into SDK setup code instead of reading them from environment variables.

FAQ

What is the difference between an API and an SDK?

The API is the interface a service exposes, the endpoints and rules for talking to it. The SDK is a toolkit that calls that API for you in a specific language, handling authentication, pagination, retries and data types.

Do I need an SDK to use an API?

No. You can always call a REST API directly with HTTP requests. An SDK just saves time and reduces bugs, especially for pagination, error handling and typed data.

What is a tracking SDK?

A tracking SDK is a library you install in a website or app to send user events to an analytics or customer data tool. Product analytics and CDP vendors provide them so you can record actions like signups and feature usage.

See all automation and APIs terms ↳

Used in these articles