# Zenith Public API

The Zenith API gives you **read-only access to your company's financial data** —
bank transactions, expenses, partners, bank accounts, and yearly report
aggregates — over plain HTTPS + JSON.

```
https://hub.zenith-books.com/api/public/v1
```

## A 60-second tour

```shell
# Who am I? (verifies your credentials)
curl https://hub.zenith-books.com/api/public/v1/me \
  -H "Authorization: Bearer zth_live_…" \
  -H "X-Company-Key: <company key>"

# Last month's bank transactions
curl "https://hub.zenith-books.com/api/public/v1/transactions?date_from=2026-06-01&date_to=2026-06-30" \
  -H "Authorization: Bearer zth_live_…" \
  -H "X-Company-Key: <company key>"
```

## What you can read

| Resource | Endpoint | Notes |
|---|---|---|
| Bank transactions | `/transactions`, `/transactions/{id}` | Clean bank-connector records; split transactions carry their pieces in `children` |
| Expenses | `/expenses`, `/expenses/{id}` | Supplier invoices with line items and payments |
| Partners | `/partners` | Suppliers/buyers, searchable |
| Bank accounts | `/bank-accounts` | Source of the `bank_account_id` filter |
| Account balances | `/bank-accounts/{id}/balances` | Stored balance series per account, newest first; first row is the current balance |
| Yearly summary | `/reports/yearly-summary` | Monthly totals by category — use this instead of paginating raw documents |
| Credentials | `/me` | The token + company bound to your credentials |

The API is **V1 and read-only**. Breaking changes will ship as `/v2` with a
documented sunset period — additive changes (new fields) can happen at any
time, so tolerate unknown fields.

The full machine-readable contract lives at
[`hub.zenith-books.com/api/public/v1/openapi.yaml`](https://hub.zenith-books.com/api/public/v1/openapi.yaml)
— the same document that renders the [API Reference](/api) section of this
site.

Next: [create an API token](/authentication), or plug your books straight into
Claude via [MCP](/connect-claude).
