Skip to content

Quickstart

This guide gets you from zero to a working read request and a retry-safe write.

  • You need a DuitMyself Aurum account.
  • Create a personal API key from the mobile app’s API Access screen.
  • Treat the key like a server secret. Do not ship it in client-side code.

Production base URL: https://api.duitmyself.com

Start with GET /v1/me to confirm the key works and inspect the authenticated subject.

  curl "https://api.duitmyself.com/v1/me" \
-H "Authorization: Bearer key_..."

If you plan to write data, fetch GET /v1/agent/context next. It returns profile metadata plus accounts, categories, payees, and recent transactions in one request.

  curl "https://api.duitmyself.com/v1/agent/context?recentTransactionLimit=25" \
-H "Authorization: Bearer key_..."

Use an upsert endpoint when your system owns a stable source identifier. This lets you retry without creating duplicates.

  curl -X POST "https://api.duitmyself.com/v1/transactions/upsert" \
-H "Authorization: Bearer key_..." \
-H "Idempotency-Key: txn-demo-2026-04" \
-H "Content-Type: application/json" \
-d '{
  "externalId": "demo:txn:2026-04:salary",
  "accountId": "acct_...",
  "amount": -2500,
  "date": "2026-04-14",
  "note": "April salary"
}'
  • Positive amounts are expenses.
  • Negative amounts are income.
  • Transfers should use isTransfer: true and transferToAccountId.
  • POST and PATCH require Idempotency-Key.
  • System categories are readable but not writable.
Terminal window
pnpm add @duitmyself/api-client
  import { createDuitMyselfApiClient } from "@duitmyself/api-client";

const client = createDuitMyselfApiClient({
apiKey: process.env.DUITMYSELF_API_KEY!,
});

const me = await client.getMe();
const context = await client.getAgentContext({
recentTransactionLimit: 25,
});
  • Read Authentication for scopes, rate limits, and headers.
  • Read Safe writes before building retries or sync jobs.
  • Browse the API reference for resource-specific schemas and examples.
  • Use Agent workflows if you are building autonomous bookkeeping or reconciliation flows.