Skip to content
GetmeDocs
Sign inCreate account

Getting started

  • Getme developer documentation

API Reference

  • Introduction
  • Authentication
  • Errors
  • Idempotent requests
  • Metadata
  • Pagination
  • Request IDs
  • Versioning
  • Webhooks
  • Event Catalog
  • SDKs and CLI

Core Resources

  • Auth
  • Events

Site Resources

  • Forms
  • Sites

Commerce Resources

  • Brands
  • Categories
  • Products
  • Services

Crm Resources

  • Customers

Other Resources

  • Media

Dev Tools

  • CLIBeta
  • Website source with the CLIBeta
  • Webhooks with the CLIBeta
  • SDKsBeta
  • Node SDKBeta
  • Python SDKBeta

Guides

  • Guides
  • Quickstart
  • Website source workflow
  • Webhook handler

Changelog

  • Changelog
  • June 10, 2026 - Developer platform docs beta
  • July 15, 2026 - Install token lifecycle safety
  • July 15, 2026 - Source-first site development
  • July 15, 2026 - Site source navigation warnings
Loading documentation...
HomeSDKsNode SDK

Node SDK

Beta

Use the official Getme Node SDK for TypeScript and JavaScript integrations.

Getme Node is the official JavaScript and TypeScript client for Getme developer APIs.

Installation

bash
npm install @getme-tech/getme-node

Node.js 20 or newer is required.

Source code: github.com/getme-tech/getme-node

Quick start

ts
import {GetmeClient} from "@getme-tech/getme-node";

const getme = new GetmeClient({
  apiKey: process.env.GETME_API_KEY,
});

const sites = await getme.sites.list();
const products = await getme.products.list({limit: 10});

console.log(sites.data.map((site) => site.name));
console.log(products.data.map((product) => product.name));

GETME_API_KEY should contain an app-install access token such as gmat_test_... or gmat_live_....

Pagination

List endpoints use cursor pagination:

ts
const firstPage = await getme.sites.list({limit: 25});
const lastSite = firstPage.data.at(-1);

if (firstPage.has_more && lastSite) {
  const nextPage = await getme.sites.list({
    limit: 25,
    cursor: lastSite.id,
  });
  console.log(nextPage.data.length);
}

For full scans, use auto-paging:

ts
for await (const site of getme.sites.listAutoPaging({limit: 100})) {
  console.log(site.id, site.name);
}

for await (const product of getme.products.listAutoPaging({limit: 100})) {
  console.log(product.id, product.name);
}

The SDK sends cursor as starting_after. Pagination primitives are shared by resources so future list endpoints use the same behavior.

Commerce catalog

ts
const product = await getme.products.create({
  name: "Coffee",
  sku: "COF-001",
  status: "draft",
});

await getme.products.update(product.id, {status: "active"});
await getme.products.archive(product.id);

await getme.categories.create({name: "Menu", type: "product"});
await getme.brands.create({name: "Acme"});
await getme.services.create({name: "Consulting"});

Mutating resource methods generate an idempotency key automatically unless you provide one.

Website source

Create a standalone site directly from a complete custom source tree when no live site or base-theme selection exists:

ts
const custom = await getme.sites.development.createFromSource({
  name: "Custom storefront",
  message: "Initial source",
  files: customThemeFiles,
});

console.log(custom.site_id, custom.id, custom.source_revision);

The API validates the full archive before creating the draft. custom.site_id and custom.id intentionally identify the same standalone development session. Subsequent source writes, previews, and publish requests use the existing development-session methods.

ts
const session = await getme.sites.development.createSession("site_...", {
  source_revision: "rev_live",
  name: "Header update",
});

await getme.sites.development.pushBatch("site_...", session.id, {
  source_revision: "rev_live",
  files: {
    "theme.json": JSON.stringify({name: "Updated theme"}),
  },
});

await getme.sites.pages.upsertContent("site_...", session.id, "wpag_...", "en", {
  source_revision: "rev_live",
  values: {title: "Updated docs"},
});

const preview = await getme.sites.development.preview("site_...", session.id, {
  expires_days: 7,
});

console.log(preview.preview_url);

Source and page content writes are staged in the development session. They do not publish to the live site. Create a publish request when the change is ready for owner review.

Webhook verification

Use webhook helpers with the raw request body. Do not verify a parsed JSON body.

ts
import {constructEvent} from "@getme-tech/getme-node/webhooks";

const event = constructEvent(rawBody, signatureHeader, "whsec_...");
console.log(event.type);

For local tests, generate signed fixtures without calling the network:

ts
import {generateTestPayload, generateTestHeader} from "@getme-tech/getme-node/webhooks/testing";

const payload = generateTestPayload({
  id: "wevt_test",
  object: "event",
  type: "booking.cancelled",
  environment: "test",
  livemode: false,
});
const signatureHeader = generateTestHeader(payload.rawBody, "whsec_test");

On this page

  • Installation
  • Quick start
  • Pagination
  • Commerce catalog
  • Website source
  • Webhook verification