API reference

The ledger API

The ledger API: accounts, transactions, balances and reversals over plain HTTPS and JSON.

Every workspace has its own API at https://<workspace-key>.aquorum.ai, pinned to its own schema, so a key for one workspace is inert at every other.

Authentication

HTTP Basic: the service-account key id as the username, the secret as the password (keyId and secret in the Postman environment).

Your ids, not ours

Wherever an account or a transaction is expected, pass its id or ext:<yourId>. Every workspace starts with ext:main, ext:disbursement and ext:reversal.

Minor units only

Amounts are whole numbers of the account's smallest unit: 10000 is $100.00. A decimal is refused; send a digit string for amounts beyond 2^53.

Timestamps

Every timestamp you send needs a UTC offset (2026-10-31T00:00:00Z, never 2026-10-31T00:00:00), and may carry up to six fractional digits; any past the sixth are dropped. Every timestamp you get back is UTC to the microsecond, always six digits: 2026-11-05T16:00:00.123456Z. Older rows end in 000, because they were stamped to the millisecond. A createdAt you were given can go straight back as since or until and means exactly that instant.

Pagination

A list returns data and nextCursor. Pass nextCursor back as cursor, unchanged and with the same filters, until it is null. It is opaque: don't parse or build one, because its format can change. Transactions and an account's entries come newest first, and accounts oldest first. Rows with the same createdAt are ordered by id in the same direction, so a page boundary between them never drops or repeats a row; transaction and account ids are random, so within a tie that order means nothing more. All the entries of one transaction share its createdAt, and when one touches an account twice, the line written last comes first. Take the order from the list rather than sorting on createdAt. A cursor that is corrupt, from another list, or from an older format is a 400 with detail Invalid cursor, never a silent restart from page one.

Safe to retry

A transaction's externalId is its idempotency key. The same body again returns the original with 200; the same id with a different body is a 409.

Errors

application/problem+json (RFC 9457), naming the rule that refused the request, so a client can tell the balance from the hold from the account's flags.

POST/v1/transactions

Post a transaction

Requires transaction.write

A transaction is a set of postings, each a source, a destination and one amount, applied atomically. An unbalanced transaction cannot be expressed. Entries are append-only: a mistake is undone by a reversal, or corrected by a clawback.

Up to 50 postings per transaction.

externalIdrequiredYour id for the movement, and its idempotency key.
postingsrequired1–50 of { source, destination, amount }. Accounts by id or ext:.
effectiveAtWhen it counts toward available. Defaults to now; past dates are refused.
overdraftThis movement may take an account across zero, if the account allows it.
backupFundingSourceAn account that absorbs a shortfall. Mutually exclusive with overdraft.
metadataFree-form JSON object.
tagsUp to 32 free-form strings, e.g. payout, withdrawal. Stored sorted and deduplicated, returned on every read, set once. Nothing filters on them.
Request
curl https://acme.aquorum.ai/v1/transactions \
  -u "$KEY_ID:$SECRET" \
  -H 'Content-Type: application/json' \
  -d '{
  "externalId": "payout-8812",
  "tags": [
    "payout"
  ],
  "postings": [
    {
      "source": "ext:main",
      "destination": "ext:seller_42",
      "amount": 10000
    }
  ]
}'
Response201 Created
{
  "id": "1691c56d-4237-4778-abe8-05a459b3e66d",
  "externalId": "payout-8812",
  "status": "posted",
  "overdraft": false,
  "actor": "key:ak_live_8Kq2xN4vTz",
  "metadata": {},
  "tags": [
    "payout"
  ],
  "createdAt": "2026-11-05T16:00:00.000000Z",
  "reversesTransactionId": null,
  "reversible": true,
  "reversibleReason": null,
  "entries": [
    {
      "accountId": "fc468d05-e226-45a0-a34e-32cadd7dc2c8",
      "accountExternalId": "main",
      "amount": -10000,
      "accountSequence": 1,
      "postedSequence": 1
    },
    {
      "accountId": "0295de4c-87d2-440d-ac3b-90743b07d195",
      "accountExternalId": "seller_42",
      "amount": 10000,
      "accountSequence": 1,
      "postedSequence": 1
    }
  ]
}

GET/v1/transactions/:id

Get a transaction

Requires transaction.read

Address it by our id or by yours, as ext:<externalId>: the lookup for support and reconciliation when all you have is your own reference.

reversible says whether a reversal would be accepted right now: a hint for a UI, not a promise, since the account can move before you act on it.

Path

idrequiredTransaction id, or ext:<yourId>.
Request
curl https://acme.aquorum.ai/v1/transactions/$TRANSACTION_ID \
  -u "$KEY_ID:$SECRET"
Response200 OK
{
  "id": "1691c56d-4237-4778-abe8-05a459b3e66d",
  "externalId": "payout-8812",
  "status": "posted",
  "overdraft": false,
  "actor": "key:ak_live_8Kq2xN4vTz",
  "metadata": {},
  "tags": [
    "payout"
  ],
  "createdAt": "2026-11-05T16:00:00.000000Z",
  "reversesTransactionId": null,
  "reversible": false,
  "reversibleReason": "account_moved",
  "entries": [
    {
      "accountId": "fc468d05-e226-45a0-a34e-32cadd7dc2c8",
      "accountExternalId": "main",
      "amount": -10000,
      "accountSequence": 1,
      "postedSequence": 1
    },
    {
      "accountId": "0295de4c-87d2-440d-ac3b-90743b07d195",
      "accountExternalId": "seller_42",
      "amount": 10000,
      "accountSequence": 1,
      "postedSequence": 1
    }
  ]
}

GET/v1/transactions

List transactions

Requires transaction.read

Newest first, paged by cursor (see Pagination above). Also filters on since and until (timestamps with an offset), which the (created_at, id) index serves. Nothing else filters: ?status= or any other parameter is a 400.

Query

limitPage size, up to 200. Default 50.
Request
curl "https://acme.aquorum.ai/v1/transactions?limit=50" \
  -u "$KEY_ID:$SECRET"
Response200 OK
{
  "data": [
    {
      "id": "ecea03d5-b6bf-4e98-a67a-7a5af48aa3f6",
      "externalId": "earnings-1043",
      "status": "posted",
      "overdraft": false,
      "actor": "key:ak_live_8Kq2xN4vTz",
      "metadata": {},
      "tags": [],
      "createdAt": "2026-11-05T16:00:00.000000Z",
      "reversesTransactionId": null,
      "reversible": true,
      "reversibleReason": null,
      "entries": [
        {
          "accountId": "fc468d05-e226-45a0-a34e-32cadd7dc2c8",
          "accountExternalId": "main",
          "amount": -5000,
          "accountSequence": 2,
          "postedSequence": 2
        },
        {
          "accountId": "0295de4c-87d2-440d-ac3b-90743b07d195",
          "accountExternalId": "seller_42",
          "amount": 5000,
          "accountSequence": 2,
          "postedSequence": 2
        }
      ]
    },
    {
      "id": "1691c56d-4237-4778-abe8-05a459b3e66d",
      "externalId": "payout-8812",
      "status": "posted",
      "overdraft": false,
      "actor": "key:ak_live_8Kq2xN4vTz",
      "metadata": {},
      "tags": [
        "payout"
      ],
      "createdAt": "2026-11-05T16:00:00.000000Z",
      "reversesTransactionId": null,
      "reversible": false,
      "reversibleReason": "account_moved",
      "entries": [
        {
          "accountId": "fc468d05-e226-45a0-a34e-32cadd7dc2c8",
          "accountExternalId": "main",
          "amount": -10000,
          "accountSequence": 1,
          "postedSequence": 1
        },
        {
          "accountId": "0295de4c-87d2-440d-ac3b-90743b07d195",
          "accountExternalId": "seller_42",
          "amount": 10000,
          "accountSequence": 1,
          "postedSequence": 1
        }
      ]
    }
  ],
  "nextCursor": null
}

POST/v1/transactions/:id/reverse

Reverse a transaction

Requires transaction.write

No body.

Undoes a transaction posted by mistake by mirroring it, only while every account the original credited has not moved since: the same money, not just enough money. At most once per transaction; a retry returns the same reversal with 200.

Once the window has closed, claw back instead: an ordinary transaction in the opposite direction.

Path

idrequiredThe transaction to reverse: its id, or ext:<yourId>.
Request
curl -X POST https://acme.aquorum.ai/v1/transactions/$MISTAKE_ID/reverse \
  -u "$KEY_ID:$SECRET"
Response201 Created
{
  "id": "b5b8c898-ac85-4858-adfc-452e1a67b48a",
  "externalId": "reversal:e79cbad6-2295-49c9-aee3-c1330892906d",
  "status": "posted",
  "overdraft": false,
  "actor": "key:ak_live_8Kq2xN4vTz",
  "metadata": {
    "reverses": "e79cbad6-2295-49c9-aee3-c1330892906d"
  },
  "tags": [],
  "createdAt": "2026-11-05T16:00:00.000000Z",
  "reversesTransactionId": "e79cbad6-2295-49c9-aee3-c1330892906d",
  "reversible": false,
  "reversibleReason": "is_reversal",
  "entries": [
    {
      "accountId": "fc468d05-e226-45a0-a34e-32cadd7dc2c8",
      "accountExternalId": "main",
      "amount": 3000,
      "accountSequence": 4,
      "postedSequence": 4
    },
    {
      "accountId": "0295de4c-87d2-440d-ac3b-90743b07d195",
      "accountExternalId": "seller_42",
      "amount": -3000,
      "accountSequence": 5,
      "postedSequence": 5
    }
  ]
}

POST/v1/accounts

Create an account

Requires account.write

An account holds a balance. Its type is its normal side: a credit account holds funds and stays at or above zero; a debit account is a source of funds and stays at or below zero, presented negated. currency and scale are copied at creation and never change.

externalIdrequiredYour id for the account; address it as ext:<externalId>.
nameDefaults to externalId.
typecredit (default) or debit.
currencyDefaults to the workspace's currency.
allowOutflowMay money ever leave this account? Default true.
allowOverdraftMay its balance cross to the side it does not belong on? Default false.
metadataFree-form JSON object.
tagsArray of strings, returned on every read. Nothing filters on them.
Request
curl https://acme.aquorum.ai/v1/accounts \
  -u "$KEY_ID:$SECRET" \
  -H 'Content-Type: application/json' \
  -d '{
  "externalId": "seller_42",
  "name": "Seller 42",
  "type": "credit",
  "metadata": {
    "country": "US"
  },
  "tags": [
    "sellers"
  ]
}'
Response201 Created
{
  "id": "0295de4c-87d2-440d-ac3b-90743b07d195",
  "externalId": "seller_42",
  "name": "Seller 42",
  "currency": "USD",
  "scale": 2,
  "type": "credit",
  "allowOutflow": true,
  "allowOverdraft": false,
  "sequence": 0,
  "metadata": {
    "country": "US"
  },
  "tags": [
    "sellers"
  ],
  "lastActivityAt": null,
  "createdAt": "2026-11-05T16:00:00.000000Z",
  "updatedAt": "2026-11-05T16:00:00.000000Z"
}

GET/v1/accounts

List accounts

Requires account.read

Oldest first, paged by cursor: pass the previous page's nextCursor, which is null on the last page (see Pagination above). balances=true adds each account's balance. Nothing filters: no index serves a filter here, so ?tag= or any other parameter is a 400.

Query

balancesInclude each account's balance. Off by default, since a balance is a sum.
limitPage size, up to 200. Default 50.
Request
curl "https://acme.aquorum.ai/v1/accounts?balances=true&limit=50" \
  -u "$KEY_ID:$SECRET"
Response200 OK
{
  "data": [
    {
      "id": "fc468d05-e226-45a0-a34e-32cadd7dc2c8",
      "externalId": "main",
      "name": "main",
      "currency": "USD",
      "scale": 2,
      "type": "debit",
      "allowOutflow": true,
      "allowOverdraft": false,
      "sequence": 0,
      "metadata": {},
      "tags": [],
      "lastActivityAt": null,
      "createdAt": "2026-11-05T16:00:00.000000Z",
      "updatedAt": "2026-11-05T16:00:00.000000Z",
      "balance": {
        "posted": 0,
        "available": 0,
        "presented": {
          "posted": 0,
          "available": 0
        }
      }
    },
    {
      "id": "d5205c90-6fe2-44b7-a850-2b96332f2178",
      "externalId": "disbursement",
      "name": "disbursement",
      "currency": "USD",
      "scale": 2,
      "type": "credit",
      "allowOutflow": false,
      "allowOverdraft": false,
      "sequence": 0,
      "metadata": {},
      "tags": [],
      "lastActivityAt": null,
      "createdAt": "2026-11-05T16:00:00.000000Z",
      "updatedAt": "2026-11-05T16:00:00.000000Z",
      "balance": {
        "posted": 0,
        "available": 0,
        "presented": {
          "posted": 0,
          "available": 0
        }
      }
    },
    {
      "id": "ddf56d63-2eb4-4f0b-acbe-a627723c8121",
      "externalId": "reversal",
      "name": "reversal",
      "currency": "USD",
      "scale": 2,
      "type": "debit",
      "allowOutflow": true,
      "allowOverdraft": false,
      "sequence": 0,
      "metadata": {},
      "tags": [],
      "lastActivityAt": null,
      "createdAt": "2026-11-05T16:00:00.000000Z",
      "updatedAt": "2026-11-05T16:00:00.000000Z",
      "balance": {
        "posted": 0,
        "available": 0,
        "presented": {
          "posted": 0,
          "available": 0
        }
      }
    },
    {
      "id": "0295de4c-87d2-440d-ac3b-90743b07d195",
      "externalId": "seller_42",
      "name": "Seller 42",
      "currency": "USD",
      "scale": 2,
      "type": "credit",
      "allowOutflow": true,
      "allowOverdraft": false,
      "sequence": 0,
      "metadata": {
        "country": "US"
      },
      "tags": [
        "sellers"
      ],
      "lastActivityAt": null,
      "createdAt": "2026-11-05T16:00:00.000000Z",
      "updatedAt": "2026-11-05T16:00:00.000000Z",
      "balance": {
        "posted": 0,
        "available": 0,
        "presented": {
          "posted": 0,
          "available": 0
        }
      }
    },
    {
      "id": "7b0863f3-1c41-427c-a23a-75604e1bf1e6",
      "externalId": "seller_43",
      "name": "Seller 43",
      "currency": "USD",
      "scale": 2,
      "type": "credit",
      "allowOutflow": true,
      "allowOverdraft": false,
      "sequence": 0,
      "metadata": {},
      "tags": [],
      "lastActivityAt": null,
      "createdAt": "2026-11-05T16:00:00.000000Z",
      "updatedAt": "2026-11-05T16:00:00.000000Z",
      "balance": {
        "posted": 0,
        "available": 0,
        "presented": {
          "posted": 0,
          "available": 0
        }
      }
    }
  ],
  "nextCursor": null
}

GET/v1/accounts/:ref

Get an account

Requires account.read

Path

refrequiredAccount id, or ext:<yourId>.
Request
curl https://acme.aquorum.ai/v1/accounts/ext:seller_42 \
  -u "$KEY_ID:$SECRET"
Response200 OK
{
  "id": "0295de4c-87d2-440d-ac3b-90743b07d195",
  "externalId": "seller_42",
  "name": "Seller 42",
  "currency": "USD",
  "scale": 2,
  "type": "credit",
  "allowOutflow": true,
  "allowOverdraft": false,
  "sequence": 0,
  "metadata": {
    "country": "US"
  },
  "tags": [
    "sellers"
  ],
  "lastActivityAt": null,
  "createdAt": "2026-11-05T16:00:00.000000Z",
  "updatedAt": "2026-11-05T16:00:00.000000Z"
}

PATCH/v1/accounts/:ref

Update an account

Requires account.write

Only name, metadata and tags can change; never the currency, the type or the flags.

Path

refrequiredAccount id, or ext:<yourId>.
Request
curl -X PATCH https://acme.aquorum.ai/v1/accounts/ext:seller_42 \
  -u "$KEY_ID:$SECRET" \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Seller 42 (Acme)",
  "tags": [
    "sellers",
    "acme"
  ]
}'
Response200 OK
{
  "id": "0295de4c-87d2-440d-ac3b-90743b07d195",
  "externalId": "seller_42",
  "name": "Seller 42 (Acme)",
  "currency": "USD",
  "scale": 2,
  "type": "credit",
  "allowOutflow": true,
  "allowOverdraft": false,
  "sequence": 0,
  "metadata": {
    "country": "US"
  },
  "tags": [
    "sellers",
    "acme"
  ],
  "lastActivityAt": null,
  "createdAt": "2026-11-05T16:00:00.000000Z",
  "updatedAt": "2026-11-05T16:00:00.000000Z"
}

DELETE/v1/accounts/:ref

Delete an account

Requires account.write

Only an account with a zero posted balance can be deleted; otherwise 409. Move the money first. The handle is not freed for reuse.

Path

refrequiredAccount id, or ext:<yourId>.
Request
curl -X DELETE https://acme.aquorum.ai/v1/accounts/ext:seller_43 \
  -u "$KEY_ID:$SECRET"
Response200 OK
{
  "deleted": true,
  "accountId": "7b0863f3-1c41-427c-a23a-75604e1bf1e6"
}

GET/v1/accounts/:ref/balance

Get an account's balance

Requires balance.read

posted is everything on the books; available is only what is in force, which is what a debit may draw on. Both are in stored signs, which sum to zero across the workspace; presented is the same numbers as a person reads them.

Path

refrequiredAccount id, or ext:<yourId>.
Request
curl https://acme.aquorum.ai/v1/accounts/ext:seller_42/balance \
  -u "$KEY_ID:$SECRET"
Response200 OK
{
  "accountId": "0295de4c-87d2-440d-ac3b-90743b07d195",
  "externalId": "seller_42",
  "currency": "USD",
  "scale": 2,
  "type": "credit",
  "asOf": "2026-11-05T16:00:00.000000Z",
  "posted": 15000,
  "available": 10000,
  "presented": {
    "posted": 15000,
    "available": 10000
  },
  "sequence": 2
}

GET/v1/accounts/:ref/entries

List an account's entries

Requires transaction.read

One account's history, newest first: one row per entry, with amount signed for this account (credit positive, debit negative), the transaction's externalId, status, tags and metadata, and the counterparties on the other side.

sinceInclusive start, on createdAt.
untilExclusive end, on createdAt.
limit1–200, default 50.
cursornextCursor from the previous page, unchanged. Opaque; see Pagination above.

Timestamps need an explicit offset. With neither bound it is the full history. Paged by cursor, never by offset, so a page cannot shift under new writes. To split by kind, read tags on each row: the API does not filter on them, and ?tag= or any other parameter is a 400 rather than silently ignored.

Path

refrequiredAccount id, or ext:<yourId>.

Query

sinceInclusive start, on createdAt. An ISO-8601 timestamp with an explicit offset.
limit1–200, default 50.
Request
curl "https://acme.aquorum.ai/v1/accounts/ext:seller_42/entries?since=$NINETY_DAYS_AGO&limit=50" \
  -u "$KEY_ID:$SECRET"
Response200 OK
{
  "data": [
    {
      "transactionId": "38a2fde0-82f3-4df7-aa01-16f7709cecb5",
      "externalId": "clawback-8813",
      "status": "posted",
      "tags": [],
      "metadata": {},
      "amount": -2000,
      "accountSequence": 7,
      "effectiveAt": "2026-11-05T16:00:00.000000Z",
      "createdAt": "2026-11-05T16:00:00.000000Z",
      "counterparties": [
        {
          "accountId": "fc468d05-e226-45a0-a34e-32cadd7dc2c8",
          "accountExternalId": "main",
          "amount": 5000
        },
        {
          "accountId": "ddf56d63-2eb4-4f0b-acbe-a627723c8121",
          "accountExternalId": "reversal",
          "amount": -3000
        }
      ]
    },
    {
      "transactionId": "e6f6dc75-eb69-47c9-a678-4aba77b852ce",
      "externalId": "clawback-8812",
      "status": "posted",
      "tags": [],
      "metadata": {},
      "amount": -2000,
      "accountSequence": 6,
      "effectiveAt": "2026-11-05T16:00:00.000000Z",
      "createdAt": "2026-11-05T16:00:00.000000Z",
      "counterparties": [
        {
          "accountId": "fc468d05-e226-45a0-a34e-32cadd7dc2c8",
          "accountExternalId": "main",
          "amount": 2000
        }
      ]
    },
    {
      "transactionId": "b5b8c898-ac85-4858-adfc-452e1a67b48a",
      "externalId": "reversal:e79cbad6-2295-49c9-aee3-c1330892906d",
      "status": "posted",
      "tags": [],
      "metadata": {
        "reverses": "e79cbad6-2295-49c9-aee3-c1330892906d"
      },
      "amount": -3000,
      "accountSequence": 5,
      "effectiveAt": "2026-11-05T16:00:00.000000Z",
      "createdAt": "2026-11-05T16:00:00.000000Z",
      "counterparties": [
        {
          "accountId": "fc468d05-e226-45a0-a34e-32cadd7dc2c8",
          "accountExternalId": "main",
          "amount": 3000
        }
      ]
    },
    {
      "transactionId": "e79cbad6-2295-49c9-aee3-c1330892906d",
      "externalId": "payout-8813",
      "status": "reversed",
      "tags": [],
      "metadata": {},
      "amount": 3000,
      "accountSequence": 4,
      "effectiveAt": "2026-11-05T16:00:00.000000Z",
      "createdAt": "2026-11-05T16:00:00.000000Z",
      "counterparties": [
        {
          "accountId": "fc468d05-e226-45a0-a34e-32cadd7dc2c8",
          "accountExternalId": "main",
          "amount": -3000
        }
      ]
    },
    {
      "transactionId": "6127c1bd-8fec-47b0-a9c4-15afd41daadc",
      "externalId": "withdrawal-208",
      "status": "posted",
      "tags": [
        "withdrawal"
      ],
      "metadata": {},
      "amount": -6000,
      "accountSequence": 3,
      "effectiveAt": "2026-11-05T16:00:00.000000Z",
      "createdAt": "2026-11-05T16:00:00.000000Z",
      "counterparties": [
        {
          "accountId": "d5205c90-6fe2-44b7-a850-2b96332f2178",
          "accountExternalId": "disbursement",
          "amount": 6000
        }
      ]
    },
    {
      "transactionId": "ecea03d5-b6bf-4e98-a67a-7a5af48aa3f6",
      "externalId": "earnings-1043",
      "status": "posted",
      "tags": [],
      "metadata": {},
      "amount": 5000,
      "accountSequence": 2,
      "effectiveAt": "2026-11-08T16:00:00.000000Z",
      "createdAt": "2026-11-05T16:00:00.000000Z",
      "counterparties": [
        {
          "accountId": "fc468d05-e226-45a0-a34e-32cadd7dc2c8",
          "accountExternalId": "main",
          "amount": -5000
        }
      ]
    },
    {
      "transactionId": "1691c56d-4237-4778-abe8-05a459b3e66d",
      "externalId": "payout-8812",
      "status": "posted",
      "tags": [
        "payout"
      ],
      "metadata": {},
      "amount": 10000,
      "accountSequence": 1,
      "effectiveAt": "2026-11-05T16:00:00.000000Z",
      "createdAt": "2026-11-05T16:00:00.000000Z",
      "counterparties": [
        {
          "accountId": "fc468d05-e226-45a0-a34e-32cadd7dc2c8",
          "accountExternalId": "main",
          "amount": -10000
        }
      ]
    }
  ],
  "nextCursor": null
}

GET/health

Check health

No credentials needed

Liveness. The only route that takes no credentials, and it says nothing about the workspace behind it.

Request
curl https://acme.aquorum.ai/health
Response200 OK
{
  "status": "ok"
}