> ## Documentation Index
> Fetch the complete documentation index at: https://docs.synthetic.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Read your company's books from Synthetic over a plain REST API.

Synthetic keeps a company's books. It connects to the company's bank accounts, payroll and business tools, records what happened, and produces accrual-basis financial statements. The Synthetic API lets your own software read that data.

The API is a read-only REST API at `https://app.synthetic.ai/api/v1`. Responses from the API are JSON. Amounts are integers in cents. Timestamps are ISO 8601 strings.

## Terms used in this API

| Term         | Meaning                                                                                                                                                      |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Entity**   | The business whose books Synthetic keeps. An API key belongs to one entity and reads only its data. The `GET /me` route returns the entity a key belongs to. |
| **Customer** | Someone the entity bills.                                                                                                                                    |
| **Invoice**  | A bill the entity raises for a customer.                                                                                                                     |
| **Payment**  | Money a customer paid the entity. Synthetic applies a payment to the customer's invoices; the part not yet applied is its unapplied amount.                  |
| **Bank fee** | The fee a bank charged for processing a payment. Synthetic records it as a payment of type `BANK_FEE`, nested inside the payment it was charged against.     |
| **API key**  | A secret your software sends to prove who it is. Created in Synthetic under **Settings → API keys**.                                                         |
| **Claim**    | A permission a key holds, such as reading payments. `GET /me` lists a key's claims.                                                                          |

## What you can read

| Route                | Returns                                                          |
| -------------------- | ---------------------------------------------------------------- |
| `GET /health`        | Confirms the API is reachable. No key needed.                    |
| `GET /me`            | The entity your key belongs to and the claims it holds.          |
| `GET /payments`      | The entity's cash payments, one page at a time.                  |
| `GET /payments/{id}` | One cash payment by id.                                          |
| `GET /openapi.json`  | The OpenAPI document describing the routes above. No key needed. |

Payments are the only resource today. Each payment carries its amount, how much of it has been applied to invoices, the customer it came from once one has been attributed, the date it was received, and its bank fee if one was charged. A bank fee is read through its payment and has no route of its own.

## Your first request

1. In Synthetic, open **Settings → API keys** and create a key. Copy the secret when it is shown, because it is shown only once.

2. Confirm the key works:

   ```bash theme={null}
   curl https://app.synthetic.ai/api/v1/me \
     -H "Authorization: Bearer <key>"
   ```

3. List payments:

   ```bash theme={null}
   curl "https://app.synthetic.ai/api/v1/payments?limit=10" \
     -H "Authorization: Bearer <key>"
   ```

The **API Reference** tab lists every route except `GET /openapi.json`, with its parameters and response fields. It is generated from the API's own OpenAPI document at `https://app.synthetic.ai/api/v1/openapi.json`.
