Getting Started
1. Get An API Key
Ask a tenant owner/admin to create an API client and mint a key with the least scopes needed:
- Journey build automation:
journey.build. - Registration capture:
registration.write. - Current admin journey reads also need
journey.build;journey.readis reserved for a future read-only route gate.
Never paste a real key into source, docs, chat, tickets, or logs.
Store it in the caller's secret manager as
VOYAGE_API_KEY.
For browser-based registration portals, keep
VOYAGE_API_KEY on a server-side proxy. The browser should
post to the portal backend, and the backend should call Voyage with the
SDK.
2. Install The SDK
pnpm add @voyage/sdk3. Call A Journey Endpoint
import { createVoyageClient } from "@voyage/sdk";
const voyage = createVoyageClient({
baseUrl: "https://api.example.com",
tenantSlug: "acme-events",
apiKey: process.env.VOYAGE_API_KEY ?? "vyg_live_xxx",
});
const liveJourneys = await voyage.journeys.list({
type: "event",
status: "live",
});
console.log(liveJourneys.surfaces.map((journey) => journey.publicUrl));4. Submit A Registration
const result = await voyage.journeys.submitPublicRegistration("private-preview", {
selectedTickets: [{ tierId: "general", quantity: 1 }],
guest: {
firstName: "Ada",
lastName: "Lovelace",
email: "ada@example.com",
phone: "+15555550123",
},
agreedToTerms: true,
surfaceType: "journey",
});
console.log(result.orderRef);The complete reference app lives at
examples/custom-registration-portal.
Required Runtime Inputs
| Input | Example | Notes |
|---|---|---|
baseUrl |
https://api.example.com |
Edge gateway base URL |
tenantSlug |
acme-events |
Used as /t/{tenantSlug} unless base URL is already
tenant-scoped |
apiKey |
vyg_live_xxx |
Phase-A API key; do not expose in browser bundles |
journey slug |
private-preview |
Public journey slug returned by create/read/publish calls |
eventId |
evt_123 |
Required for registration capture; bind via journey
eventId or config _eventId |