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

# Quickstart

## 1. Create a workspace token

API requests authenticate with a **workspace token**. It is bound to one
workspace and is meant for integrations that act as the workspace itself.
The plaintext token is shown **once** — copy it immediately. It looks like:

```
lct_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

> **Note**
>
> Personal access tokens (`lct_pat_`) are not used for the API. They are for
> AI agents and MCP clients — see [MCP server](/mcp).

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

## 2. Note your workspace ID

Every endpoint is scoped to a workspace. A workspace token is bound to one
workspace, and the `workspace_id` in the path must match it, or the request
returns `403`. Use that workspace's ID as the `workspace_id` below.

## 3. List invoices

```bash
curl https://app.lucanto.eu/api/v1/workspaces/{workspace_id}/invoices \
  -H "Authorization: Bearer lct_live_xxx"
```

```json
{
  "data": [
    { "id": 123, "type": "invoice", "number": "FAK2026-0001", "status": "issued", "payment_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