string
required
A key from Settings → API keys, starting with gd_key_. Sent as a bearer token on every request.
string
required
The address your CRM is served on.
typeof fetch
A fetch to use instead of the global one, for older runtimes or tests.

Methods

Methods are grouped by what they work on: crm.contacts, crm.events, crm.externalAccounts, crm.subscriptions, crm.payments, crm.notes, crm.communications, crm.tasks, crm.goals, crm.chat and crm.calls. Every input and result is typed, so your editor lists what each one takes.
Already sent this customer? Look them up with contacts.resolve instead. Faster still: save contact.id in your own database the first time, and pass it as partyId from then on. No lookup needed.
Every method except contacts.upsert and contacts.get names the customer by the CRM’s partyId: the id that upsert returns, or what contacts.resolve finds from your own id.

Results

Every method resolves to a pair, and never throws:
Exactly one of the two is set. See Errors for every error.code. The SDK works in Node 18 and later, Bun, Deno, and edge runtimes such as Cloudflare Workers.