Skip to navigation

Mark a workspace as the user's default

View as Markdown

Marks the given workspace as the user’s default. Subsequent sessions opened in the web app land in this workspace without an explicit selector step. The change applies to the user globally — not just the API session.

Idempotent: calling on an already-default workspace succeeds and returns the same workspace body.

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.

Path parameters

workspace_idlongRequired>=1
Workspace ID. The numeric ID shown in your URLs.

Response

OK. The updated workspace with default: true.

idlong

Workspace ID. Use this in all workspace-scoped paths.

time_zonestring

The workspace’s time zone as an IANA identifier. Recurring documents are issued once this zone’s calendar day reaches the schedule’s next issue date, and recurring emails go out at the chosen hour in this zone — so a generator set to “morning” delivers at 08:00 here, not at 08:00 UTC.

Defaults to Europe/Bratislava, derived from the workspace’s registered country. Never null.

defaultboolean

true if this is the user’s default workspace. Exactly one workspace per user is the default at any time.

created_atdatetime
updated_atdatetime
display_namestring or nullOptional

Private, in-app label for the workspace, shown in the workspace switcher to the workspace’s OWN members (e.g. a short alias like “SC”). NOT shown to the workspace’s customers — the official customer-facing name is legal_identity.legal_name. May be null when no label is set; clients building a picker fall back to legal_identity.legal_name.

accounting_typeenum or nullOptional

The workspace’s bookkeeping mode. Drives expense category options and tax/VAT logic. simple is single-entry bookkeeping; double_entry is full double-entry; and flat_rate_expenses is the SK/CZ “paušálne výdavky” simplified regime for sole proprietors. null when the workspace hasn’t finished onboarding yet.

Allowed values:
user_roleenum or nullOptional

The caller’s built-in role in this workspace. Stays populated even when a custom role is in effect — it is the coarse fallback role and is always one of the four built-ins. null only if the caller somehow has no membership.

Allowed values:
permissionslist of stringsOptional

The caller’s effective permission keys in this workspace, one strongest key per area in "<area>:<level>" form (e.g. documents:manage, members:read). Resolved from the caller’s custom role when one applies and the plan includes it, otherwise from the built-in role. Additive to user_role — clients gate UI on this list.

logo_urlstring or nullOptionalformat: "uri"

Signed URL for the workspace logo (ActiveStorage blob URL). null when no logo is uploaded. URLs are time-limited — re-fetch the workspace record to get a fresh URL.

legal_identityobject or nullOptional

The workspace’s legal identity — registered name, tax IDs, VAT registration, contact details, and addresses. This is the same data that appears as supplier on every document the workspace issues.

This surface is read-only.

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error