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:
| Environment | Base URL |
|---|---|
| Production | https://api.anankelabs.net/v1 |
| Local development | http://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.
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.
npm install @ananke/sdkAlternatively, 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.
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:
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:
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
- Learn about Ananke Trust — issuance, templates, lifecycle
- Learn about Ananke TCode — stamp PDFs with DataMatrix barcodes
- API Reference — full endpoint details
- TypeScript SDK — configuration and methods