SolariumSolariumDocs
Browse The Docs

Docs/Get Started

Quickstart

Make your first request: find your organization, then create, categorize and confirm a transaction.

The Solarium API is GraphQL. Every request is a POST to https://api.trysolarium.com/graphql/ with your API key, and every query and mutation takes an organizationId. This walks through booking one transaction from start to finish.

Want your AI app to do this instead? Use With AI connects Claude or ChatGPT in a minute, with no code.

1. Get An API Key

Create one in Settings > API Keys. Choose Look Only to read, or Look And Make Changes to book transactions. The key is shown once, so keep it somewhere safe. See Authentication.

2. Find Your Organization

A key belongs to one organization. Ask for its id:

bash
curl -X POST https://api.trysolarium.com/graphql/ \
  -H "Authorization: Bearer sol_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ myOrganizations { id name } }"}'
json
{ "data": { "myOrganizations": [{ "id": "a1b2c3d4-...", "name": "My Company Inc." }] } }

The rest of this page uses a small Python helper. Any HTTP client works the same way.

python
import httpx

API_URL = "https://api.trysolarium.com/graphql/"
API_KEY = "sol_your_key_here"

def query(q, variables=None):
    resp = httpx.post(API_URL, json={"query": q, "variables": variables or {}},
                      headers={"Authorization": f"Bearer {API_KEY}"})
    return resp.json()["data"]

org_id = query("{ myOrganizations { id name } }")["myOrganizations"][0]["id"]

3. Look Up Your Accounts

A transaction needs a category (what it was for) and a payment account (the card or bank it came from). Both are accounts.

python
accounts = query("""
  query($orgId: UUID!) {
    listAccounts(organizationId: $orgId, limit: 50) {
      items { id name accountType }
    }
  }
""", {"orgId": org_id})

4. Create A Transaction

It lands in Review, waiting to be categorized and confirmed.

python
created = query("""
  mutation($orgId: UUID!) {
    createLedgerEvent(organizationId: $orgId, merchantName: "Staples Canada",
                      amount: "42.50", transactionDate: "2026-01-15", eventType: "expense") {
      success eventId
    }
  }
""", {"orgId": org_id})
event_id = created["createLedgerEvent"]["eventId"]

5. Categorize It

Set the category and the payment account, using ids from step 3.

python
query("""
  mutation($orgId: UUID!, $eventId: UUID!) {
    updateStagedEntry(organizationId: $orgId, eventId: $eventId,
                      categoryId: "category-account-uuid", paymentId: "payment-account-uuid") {
      success
    }
  }
""", {"orgId": org_id, "eventId": event_id})

6. Confirm It

Confirming posts it to the books, and to QuickBooks when it's connected.

python
query("""
  mutation($orgId: UUID!, $eventId: UUID!) {
    confirmLedgerEvent(organizationId: $orgId, eventId: $eventId) { success journalEntryId }
  }
""", {"orgId": org_id, "eventId": event_id})

Give An Agent The API

For an AI agent that can't add a connector, paste these instructions into it with your key in place of sol_your_key_here. Keys you create in the dashboard come with these filled in.

text
You have access to the Solarium accounting API.

Endpoint: https://api.trysolarium.com/graphql/
Method: POST with JSON body {"query": "...", "variables": {...}}
Auth header: Authorization: Bearer sol_your_key_here

First, find the organization: query { myOrganizations { id name } }
Use its id as organizationId on every call.

Transactions go: create, then categorize, then confirm.
  listLedgerEvents(organizationId, limit, status, search, dateFrom, dateTo)
  createLedgerEvent(organizationId, merchantName, amount, transactionDate, eventType)
  updateStagedEntry(organizationId, eventId, categoryId, paymentId)
  confirmLedgerEvent(organizationId, eventId)
  listAccounts(organizationId, limit, search)
  listContacts(organizationId, limit, search)
  incomeStatement(organizationId, startDate, endDate)
  importBankStatement(organizationId, paymentAccountId, rows: [...])

Amounts are strings ("42.50"). Dates are YYYY-MM-DD.
Event types: "expense", "income", "transfer".
Full docs as Markdown: https://trysolarium.com/llms.txt

Next Steps

  • Reports: profit and loss, balance sheet and aging.
  • Errors: what a failed request returns.