Skip to navigation

Quickstart

From zero to your first authenticated request
View as Markdown

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

Personal access tokens (lct_pat_) are not used for the API. They are for AI agents and MCP clients — see MCP server.

Choose scopes when you create the token. Start with read:invoices to follow this guide; you can issue a broader token later. See 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

curl https://app.lucanto.eu/api/v1/workspaces/{workspace_id}/invoices \
-H "Authorization: Bearer lct_live_xxx"
{
"data": [
{ "id": 123, "type": "invoice", "number": "FAK2026-0001", "status": "issued", "payment_status": "paid", "...": "..." }
],
"next_cursor": "eyJpZCI6MTIzfQ==",
"has_more": true
}

That’s it. From here: