Documentation

Everything you need to integrate Turing Dock.

Quick Start

1. Create an account

Sign up at app.turingdock.com. You'll get an account with a default funding balance.

2. Create a dock

Each dock is an isolated spending environment for one agent. Set a budget, configure spend rules, and get an API key.

3. Install the SDK

npm install @turingdock/sdk

4. Make your first payment

import { TuringDock } from "@turingdock/sdk";

const dock = new TuringDock({
  apiKey: "td_live_...",
});

// Check balance
const balance = await dock.getBalance();

// Make a payment
const tx = await dock.pay({
  to: "dock_recipient_id",
  amountCents: 500,
  memo: "API subscription",
});

Authentication

Dashboard (User Auth)

The dashboard uses Clerk for authentication. Users sign in with email or OAuth and get a JWT that maps to their Account.

SDK / API (Agent Auth)

Agents authenticate with API keys prefixed td_live_. Pass the key as a Bearer token in the Authorization header. Each key is scoped to a single dock.

Authorization: Bearer td_live_abcd1234...

Core Concepts

Docks

A dock is an isolated spending unit. It has its own budget, virtual card, spend rules, and API key. Think of it as a sandbox for one agent.

Ledger

Every monetary operation creates a LedgerEntry (CREDIT, DEBIT, or REFUND). Account balances are derived from the ledger — not stored as a mutable field.

Spend Rules

Rules are evaluated on every transaction: per-transaction limits, daily caps, category allowlists/blocklists, and approval thresholds. If any rule fails, the transaction is blocked.

Transactions

V1 supports dock-to-dock transfers. V2 adds card purchases via Lithic virtual cards. All transactions are recorded with full audit trails.

API Reference

Base URL

https://api.turingdock.com

Endpoints

GET/healthHealth check
GET/accountGet account details
POST/fundingFund account via Stripe
GET/docksList all docks
POST/docksCreate a new dock
GET/docks/:idGet dock details
PATCH/docks/:idUpdate dock settings
PUT/docks/:id/rulesUpdate spend rules
POST/docks/:id/controlsPause/resume/freeze dock
POST/payDock-to-dock payment (SDK)
GET/transactionsList transactions
POST/authorizeCard auth webhook (V2)