Skip to navigation

List the current user's workspaces

View as Markdown

Returns a cursor-paginated list of the workspaces the authenticated user belongs to, in the standard { data, next_cursor, has_more } envelope. Ordered by id descending — newest workspaces appear first on the first page.

Most users have only a few workspaces, but an accountant or bookkeeper may belong to many client workspaces, so this list is genuinely paginated.

Pagination flow: call without a cursor to start. The response includes next_cursor (opaque base64 string) and has_more (boolean). Pass next_cursor as the cursor query parameter on the next request to fetch the following page. When has_more is false, stop iterating.

Each workspace includes a default flag: clients building selector UIs can pre-select the user’s last-used workspace.

Authentication

AuthorizationBearer

JWT issued via POST /api/v1/auth/sign_in. Used by mobile and SPA clients. Revoked tokens are rejected.

OR
AuthorizationBearer

Lucanto API key. Two prefixes:

  • lct_pat_<random><checksum> — personal access token (owner: User)
  • lct_live_<random><checksum> — workspace token, live data

Issue keys at /settings/api_keys (personal) or /:workspace_id/settings/api_keys (workspace). Plaintext token is shown once and never again.

Query parameters

cursorstringOptional

Pagination cursor from the previous response’s next_cursor.

limitintegerOptional1-100Defaults to 25
Number of items per page. Default 25, maximum 100.

Response

OK
next_cursorstring or null

Cursor to fetch the next page. Pass it as the cursor query parameter on the next request. null on the last page.

has_moreboolean
True when more pages exist after this one.
datalist of objects

Errors

401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error