DevelopersIntermediate
10 min read
Updated 6 May 2025

Official SDKs

QuintaGo provides official SDKs for Node.js and Python. The SDKs handle authentication, pagination, retries, and type safety — so you can integrate faster without writing boilerplate.

Node.js SDK

Install via npm or yarn:

npm install @quintago/sdk
# or
yarn add @quintago/sdk

Basic usage:

import { QuintaGo } from '@quintago/sdk';

const client = new QuintaGo({
  apiKey: process.env.QUINTAGO_API_KEY,
});

// List leads
const { data: leads } = await client.leads.list({
  stage: 'new_enquiry',
  limit: 50,
});

// Create a lead
const lead = await client.leads.create({
  name: 'Ana & Pedro Silva',
  email: 'ana@example.com',
  phone: '+351912345678',
  eventDate: '2025-10-15',
  guests: 120,
});

console.log(lead.id); // lead_01HXXXXXXXXXX

Python SDK

pip install quintago
from quintago import QuintaGo

client = QuintaGo(api_key=os.environ["QUINTAGO_API_KEY"])

# List leads
leads = client.leads.list(stage="new_enquiry", limit=50)

# Create a lead
lead = client.leads.create(
    name="Ana & Pedro Silva",
    email="ana@example.com",
    phone="+351912345678",
    event_date="2025-10-15",
    guests=120,
)

print(lead.id)  # lead_01HXXXXXXXXXX

TypeScript types

The Node.js SDK ships full TypeScript definitions. All API response types are exported:

import type { Lead, Proposal, WebhookEvent } from '@quintago/sdk';

function handleLead(lead: Lead) {
  console.log(lead.name, lead.stage);
}

// Type-safe webhook handler
function handleWebhook(event: WebhookEvent) {
  if (event.type === 'lead.stage_changed') {
    const { lead } = event.data;
    console.log(lead.stage, lead.previousStage);
  }
}

Error handling

import { QuintaGoError, RateLimitError } from '@quintago/sdk';

try {
  const lead = await client.leads.get('lead_invalid');
} catch (err) {
  if (err instanceof QuintaGoError) {
    console.error(err.code, err.message, err.status);
    // 'not_found', 'Lead not found', 404
  }

  if (err instanceof RateLimitError) {
    console.log('Retry after:', err.retryAfter, 'seconds');
  }
}

SDK changelog

  • v1.3.0 — Added Proposals API and TypeScript generics for custom fields
  • v1.2.0 — Automatic retry with exponential backoff on 5xx errors
  • v1.1.0 — Pagination helpers: client.leads.listAll()
  • v1.0.0 — Initial release with Leads, Messages, and Webhooks
Tags:sdknodepythonlibraries

Was this article helpful?