Skip to main content
The @vela/sdk package provides a type-safe client for the Vela API. It has zero runtime dependencies and uses the native fetch API.

Features

  • Zero dependencies — uses native fetch (Node.js 18+, all modern browsers)
  • Dual CJS + ESM — works with any module system
  • Full TypeScript types — all inputs and responses are typed
  • Two clientsVelaIngestClient for events, VelaManagementClient for everything else
  • Typed error hierarchy — catch specific error types like VelaNotFoundError

Two clients

ClientAuthPurpose
VelaIngestClientAPI key (vela_live_...)Send events
VelaManagementClientClient secret (vela_cs_...)Manage apps, schemas, rules
import { VelaIngestClient, VelaManagementClient } from '@vela/sdk';

// Ingest events
const ingest = new VelaIngestClient(process.env.VELA_API_KEY);
await ingest.ingest({ event: 'order.placed', data: { orderId: 'ord_1' }, level: 'info' });

// Manage resources
const client = new VelaManagementClient(process.env.VELA_CLIENT_SECRET);
const apps = await client.apps.list();

Installation

Install and set up the SDK.

Ingest Client

Send single and batch events.

Management Client

Manage apps, schemas, and rules.

Error Handling

Handle API errors gracefully.