Getting Started
Quick start guide for building on Planes
Prerequisites
- Node.js 18+ and npm/pnpm
- TypeScript 5+ (recommended)
- A Planes developer account (register at /developers/register)
Install the SDK
bash
npm install @planescrm/sdkCreate Your First App
Follow these steps to build and publish your first Planes marketplace app:
- Register as a developer at /developers/register
- Create a new app at /developers/apps/new
- Use your sandbox environment to build and test
- Submit your app for review
- Once approved, your app appears in the marketplace
Quick Example
typescript
import { PlanesClient } from '@planescrm/sdk';
// Authenticate with a pk_live_ API key (or { accessToken },
// or OAuth { clientId, clientSecret } — see the SDK Reference).
const client = new PlanesClient({ apiKey: 'pk_live_...' });
// List a page of opportunities. List responses are
// { data, meta: { page, limit, total, totalPages } }.
const { data, meta } = await client.opportunities.list({ page: 1, limit: 20 });
console.log(`Showing ${data.length} of ${meta.total} opportunities`);
// React to webhook deliveries. Subscribe by "{entity_type}.{event_type}";
// the handler receives the full signed delivery, and the entity snapshot
// lives at delivery.event.snapshot.
client.webhooks.on('opportunity.created', (delivery) => {
console.log('New opportunity:', delivery.event.snapshot);
});