Skip to main content

Prerequisites

  • A running Vela instance — self-host locally or use the cloud
  • A client secret (vela_cs_...) — to manage schemas and rules
  • An API key (vela_live_...) — to ingest events
Both credentials are generated from the dashboard. See the credentials guide.

Step 1: Install the SDK

Step 2: Set credentials as environment variables

Never hardcode credentials in your source files.
For local dev, put these in a .env file and load with dotenv.

Step 3: Register an event schema

Schemas tell Vela the exact shape of each event type. An event without a matching schema is rejected at ingest time with a 400 error.

Step 4: Send your first event

A successful ingest returns 201:
If a required field is missing, you get 400:

Step 5: Create a notification rule (optional)

Notification rules decide what events trigger alerts and where they go. Destinations (Slack, Discord, Email) are configured in the dashboard first — then referenced by ID in the rule.
Now every order.placed event with amountCents > 10000 will post a Slack message automatically — with retries and a dead-letter queue built in.

What’s next

Core Concepts

Understand apps, schemas, events, and rules in depth.

TypeScript SDK

Batch ingestion, error handling, all resource methods.

CLI

Manage schemas as code with diff, push, and pull.

API Reference

Direct HTTP API docs with request/response examples.