Docs/Overview
Docs/SDK & REST API

SDK & REST API Reference

Every platform feature in the Exovon web dashboard is accessible via our control plane. Automate custom CI/CD workflows, build autonomous AI agent tooling, manage serverless PostgreSQL clusters, or stream real-time logs using the official @exovon/sdk and REST API.

Full TypeScript SDK

Zero-dependency, strictly typed TypeScript client supporting Node.js 18+, Bun, Deno, and modern Edge runtimes.

Real-Time Event Streaming

Stream live container build logs, health check probes, and canary traffic progression directly over Server-Sent Events (SSE).

Fine-Grained Scopes

Generate restricted Machine-to-Machine (M2M) tokens with read-only log access, project-isolated deploys, or database-only permissions.

1. Installation & Client Setup

Install the client library in your application or continuous integration runner:

Terminal
# Install via npm
npm install @exovon/sdk

# Or execute commands directly without installation
npx exovon --help

Initialize the client with your secret API token. Tokens are created in Project Settings → API Keys:

Client Initialization
import { ExovonClient } from '@exovon/sdk';

// Automatically loads process.env.EXOVON_API_KEY if omitted
const exovon = new ExovonClient({
  apiKey: process.env.EXOVON_API_KEY, // Format: exo_live_...
  maxRetries: 3,
});

// Verify active identity
const user = await exovon.whoami();
console.log(`Authenticated user: ${user.uid} (${user.tier})`);

2. Core SDK Operations

Common programmatically invoked actions supported by the SDK:

Programmatic Deployments

Package and deploy local workspaces with automated ignore rules:

Deploy Workspace
const deployment = await exovon.deployments.deploy({
  projectId: 'proj_01J8ABC123',
  sourceDir: './', // Automatically applies .gitignore and .exovonignore
  framework: 'nextjs',
  buildCommand: 'npm run build',
  outputDir: '.next',
}, (status) => {
  console.log(`[deploy] ${status}`);
});

console.log(`Deployment ready: ${deployment.url}`);

Serverless PostgreSQL Provisioning

Provision managed PostgreSQL clusters on demand:

Provision Database
const db = await exovon.infrastructure.provisionDatabase(
  'proj_01J8ABC123',
  { type: 'postgres' }
);

// DATABASE_URL is mounted automatically into project secrets
console.log('PostgreSQL cluster provisioned successfully.');

Instant Rollback

Switch the active Edge Router routing pointer to any prior healthy deployment in under 3 seconds:

Rollback Deployment
// Roll back to an explicit target deployment
const result = await exovon.deployments.rollback('proj_01J8ABC123', 'dep_prev_stable');
console.log(result.success);

3. REST API Endpoints

The base URL for all control plane calls is https://exovon-orchestrator-915509129865.asia-south1.run.app/api (or edge proxy https://exovon.in/api/v1). Authenticate by providing your API key in the Authorization header:

HTTP Header
Authorization: Bearer exo_live_...
MethodEndpointDescriptionRequired Scope
POST/deploymentsDispatch a new static or containerized deploymentdeployments:write
GET/deployments/:idRetrieve deployment status, logs, and live edge URLdeployments:read
POST/projects/:id/rollbackInstant routing pointer rollbackdeployments:rollback
POST/database/queryExecute parameterized SQL over HTTPSdatabase:query
POST/domainsMap custom domain and initiate TLS certificate issuancedomains:write
PUT/projects/:id/envBatch update encrypted environment variablesenv:write

4. Webhook HMAC Signature Verification

Exovon dispatches event webhooks for deployment updates and domain verification. Every payload is signed with an HMAC-SHA256 digest in the X-Exovon-Signature header:

Webhook Verification
import crypto from 'crypto';

function verifyWebhookSignature(rawBody: string, signatureHeader: string, secret: string): boolean {
  const expectedSignature = crypto
    .createHmac('sha256', secret)
    .update(rawBody)
    .digest('hex');

  return crypto.timingSafeEqual(
    Buffer.from(signatureHeader),
    Buffer.from(expectedSignature)
  );
}

Frequently Asked Questions

Can I use @exovon/sdk inside Edge runtimes?

Yes. The SDK is built with Web Fetch and Web Crypto APIs with zero native binary bindings, making it fully compatible with Cloudflare Workers, Deno, Bun, and Next.js Edge Runtime.

How do I regenerate a compromised API key?

Open Project Settings -> API Keys in the web dashboard and click 'Revoke'. Revocation propagates across all global Anycast nodes within 500 milliseconds.

Was this documentation page helpful?