Skip to navigation

TypeScript SDK

A typed TypeScript client for the Minikai API.

The TypeScript SDK is published to npm as minikai. It ships with full type definitions, so requests and responses are typed end-to-end and authentication is handled for you.

Install

npm install minikai

Create a client

import { MinikaiClient } from 'minikai'
const client = new MinikaiClient({ token: process.env.MINIKAI_API_KEY })

Choose your data region

The client defaults to Australia. If your workspace is in the United Kingdom, pass that environment instead of writing the base URL yourself. Data regions covers how to tell which region you are in.

import { MinikaiClient, MinikaiEnvironment } from 'minikai'
const client = new MinikaiClient({
token: process.env.MINIKAI_API_KEY,
environment: MinikaiEnvironment.UnitedKingdom,
})

Make a request

Every endpoint in the API Reference maps to a typed method on the client, grouped by resource (records, Minis, labels and users). Each reference page shows a copy-ready TypeScript snippet for that endpoint, so the quickest way to write a call is to open the endpoint and copy its example.