> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.lucanto.eu/llms.txt.
> For full documentation content, see https://docs.lucanto.eu/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.lucanto.eu/_mcp/server.

# Quickstart

## 1. Create an API key

In the Lucanto app, go to **Settings → API keys** and create a
**personal access token**. The plaintext token is shown **once** —
copy it immediately. It looks like:

```
lct_pat_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

Choose scopes when you create the key. Start with `read:invoices` to
follow this guide; you can issue a broader key later. See
[Authentication](/authentication) for the full scope list.

## 2. Find your workspace ID

Every endpoint is scoped to a workspace. List the workspaces your token
can access:

```bash
curl https://app.lucanto.eu/api/v1/user/accounts \
  -H "Authorization: Bearer lct_pat_xxx"
```

The `id` of the workspace you want is the `account_id` you'll use below.

## 3. List invoices

```bash
curl https://app.lucanto.eu/api/v1/accounts/{account_id}/invoices \
  -H "Authorization: Bearer lct_pat_xxx"
```

```json
{
  "data": [
    { "id": 123, "type": "invoice", "number": "FAK2026-0001", "status": "paid", "...": "..." }
  ],
  "next_cursor": "eyJpZCI6MTIzfQ==",
  "has_more": true
}
```

That's it. From here:

* [Authentication](/authentication) — token types and scopes
* [Pagination](/pagination) — walking `next_cursor`
* [Errors](/errors) — handling non-2xx responses