SDK npm package is not published yet and API environments may be unavailable.View status
Getting Started

Quickstart

Get to a working integration in under 10 minutes. By the end of this page you will have authenticated, made a request, and received a response.

Prerequisites

  • An Ananke Labs account with an active tenant
  • An API key generated from the Console (Settings → API Keys)
  • Node.js 18+ (for the TypeScript SDK) or any HTTP client

Base URL

All API requests go through the Integration API gateway:

EnvironmentBase URL
Productionhttps://api.anankelabs.net/v1
Local developmenthttp://localhost:5300/v1

Get your API key

Navigate to the Console → Settings → API Keys. Create a new key and copy the raw secret. This value is shown only once. Store it in an environment variable — never commit it to version control.

bash
export ANANKE_API_KEY="ak_live_..."

Install the TypeScript SDK

The fastest way to start is with the official SDK. It ships ESM, CJS, and TypeScript declarations.

bash
npm install @ananke/sdk

Alternatively, you can call the REST API directly with fetch, curl, or any HTTP client. All endpoints accept and return JSON.

First request

This example issues an Ananke Trust document using the SDK. Replace the template ID with one from your tenant.

TypeScript
import { AnankeClient } from "@ananke/sdk";

const client = new AnankeClient({
  baseUrl: "http://localhost:5300",
  apiKey:  process.env.ANANKE_API_KEY!,
});

const doc = await client.trust.documents.issue({
  templateId:     "your-template-id",
  recipientName:  "Jane Doe",
  recipientEmail: "jane@example.com",
  fields: [
    { key: "certNumber", value: "C-2026-001" },
    { key: "course",     value: "Platform Engineering" },
  ],
});

console.log(doc.reference);  // "TRF-XXXX"
console.log(doc.status);     // "Active"

Or with raw HTTP:

bash
curl -X POST http://localhost:5300/v1/trust/issuances \
  -H "x-api-key: ak_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "templateId": "your-template-id",
    "recipientName": "Jane Doe",
    "recipientEmail": "jane@example.com",
    "fields": [
      { "key": "certNumber", "value": "C-2026-001" }
    ]
  }'

Verify the result

Take the reference from the issuance response and verify it:

TypeScript
const result = await client.trust.verify.byReference("TRF-XXXX");

console.log(result.isValid);     // true
console.log(result.status);      // "active"
console.log(result.issuerName);  // "Your Org"

Next steps