Accounting APIv1

Quickstart

Make your first authenticated request in three steps.

1. Create an API key

In the app, go to Developer → API Keys (/settings/api-keys) and create a key. The secret is shown as a sk_live_… token. Copy it now.

The secret is shown once

The full sk_live_<public_id>.<secret> token is revealed exactly once, at create time (and again only when you rotate). It is never retrievable afterward. Store it in your secrets manager. If you lose it, rotate the key for a new secret. See Key lifecycle.

2. Call the API with curl

Send the key as a bearer token, and target a company with X-Company-Id:

curl https://your-app.example.com/api/v1/customers \
  -H "Authorization: Bearer sk_live_PUBLICID.SECRET" \
  -H "X-Company-Id: 0190abcd-1234-7000-8000-000000000000"

3. The same call as JavaScript

const res = await fetch('https://your-app.example.com/api/v1/customers', {
  headers: {
    Authorization: 'Bearer sk_live_PUBLICID.SECRET',
    'X-Company-Id': '0190abcd-1234-7000-8000-000000000000',
  },
});
const page = await res.json();
console.log(page.data, page.nextCursor, page.hasMore);

The response shape

List endpoints return a cursor page:

{
  "data": [{ "id": "…", "name": "Acme Co" }],
  "nextCursor": "eyJpZCI6IjAxOTAuLi4ifQ",
  "hasMore": true
}

Follow nextCursor to page through results; see Pagination. If you omit X-Company-Id, the key's default company (or your tenant's default) is used instead; see Company scoping.