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 @planes/sdkNote: @planes/sdk is not published to npm yet. Today it is a private workspace package — consume it inside the monorepo as "@planes/sdk": "workspace:*", or request access from the Planes team. The install command above describes the intended published surface once publishing is enabled.
Create 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 '@planes/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);
});