Language

Workspaces

Generated from LinkSnap's own code: every route in this area, what it takes and how to call it.

Method Path What it does
GET /api/v1/workspaces Huudis is the source of truth.
POST /api/v1/workspaces Create new workspace
GET /api/v1/workspaces/current Get active workspace details
PATCH /api/v1/workspaces/current Update active workspace
GET /api/v1/workspaces/current/members List members
POST /api/v1/workspaces/current/members Invite member
DELETE /api/v1/workspaces/current/members/{id} Remove member
PATCH /api/v1/workspaces/current/members/{id} Change a member's role.
GET /api/v1/workspaces/current/stats Workspace stats
POST /api/v1/workspaces/switch Switch active workspace

Huudis is the source of truth.

GET /api/v1/workspaces

GET /workspaces — Huudis is the source of truth. Pulls the user's workspaces from Huudis, lazy-mirrors each into a local Workspace row, then returns the merged local view (with link/qr-code counts). Falls back to the local mirror on Huudis errors so the sidebar switcher stays visible.

Example

curl -X GET "https://linksnap.forjio.com/api/v1/workspaces" \
  -H "Authorization: ApiKey lsk_live_<your API key>"

Create new workspace

POST /api/v1/workspaces

POST /workspaces — create new workspace

Authentication: Person-only: a signed-in person's session. An API key is refused (403 PERSON_ONLY): a new workspace is owned by the person creating it, in Huudis. See authentication.

Body

Field Type Required Notes
name any no

Example

curl -X POST "https://linksnap.forjio.com/api/v1/workspaces" \
  -H "Cookie: linksnap_session=<your signed-in dashboard session>" \
  -H "Content-Type: application/json" \
  -d '{"name":null}'

Get active workspace details

GET /api/v1/workspaces/current

GET /workspaces/current — get active workspace details

Example

curl -X GET "https://linksnap.forjio.com/api/v1/workspaces/current" \
  -H "Authorization: ApiKey lsk_live_<your API key>"

Update active workspace

PATCH /api/v1/workspaces/current

PATCH /workspaces/current — update active workspace

Authentication: Person-only: a signed-in person's session. An API key is refused (403 PERSON_ONLY): the workspace’s name lives in Huudis and is changed with the person’s Huudis token. See authentication.

Body

Field Type Required Notes
name any no

Example

curl -X PATCH "https://linksnap.forjio.com/api/v1/workspaces/current" \
  -H "Cookie: linksnap_session=<your signed-in dashboard session>" \
  -H "Content-Type: application/json" \
  -d '{"name":null}'

List members

GET /api/v1/workspaces/current/members

GET /workspaces/current/members — list members

Example

curl -X GET "https://linksnap.forjio.com/api/v1/workspaces/current/members" \
  -H "Authorization: ApiKey lsk_live_<your API key>"

Invite member

POST /api/v1/workspaces/current/members

POST /workspaces/current/members — invite member

Authentication: Person-only: a signed-in person's session. An API key is refused (403 PERSON_ONLY): it changes who can sign in to the workspace (Huudis IAM). See authentication.

Body

Field Type Required Notes
email any no
role any no

Example

curl -X POST "https://linksnap.forjio.com/api/v1/workspaces/current/members" \
  -H "Cookie: linksnap_session=<your signed-in dashboard session>" \
  -H "Content-Type: application/json" \
  -d '{"email":null,"role":null}'

Remove member

DELETE /api/v1/workspaces/current/members/{id}

DELETE /workspaces/current/members/:id — remove member

Authentication: Person-only: a signed-in person's session. An API key is refused (403 PERSON_ONLY): it changes who can sign in to the workspace (Huudis IAM). See authentication.

Path parameters

Name Type Required Notes
id string yes

Example

curl -X DELETE "https://linksnap.forjio.com/api/v1/workspaces/current/members/:id" \
  -H "Cookie: linksnap_session=<your signed-in dashboard session>"

Change a member's role.

PATCH /api/v1/workspaces/current/members/{id}

PATCH /workspaces/current/members/:id — change a member's role. Owner/admin-gated (same gate as invite); the owner's own role can never be changed. Validation runs BEFORE the upstream push so a request the local rules reject never mutates Huudis; the push runs before the local write so the mirror can't resurrect the old role.

Authentication: Person-only: a signed-in person's session. An API key is refused (403 PERSON_ONLY): it changes what a member may do when signed in (Huudis IAM). See authentication.

Path parameters

Name Type Required Notes
id string yes

Body

Field Type Required Notes
role any no

Example

curl -X PATCH "https://linksnap.forjio.com/api/v1/workspaces/current/members/:id" \
  -H "Cookie: linksnap_session=<your signed-in dashboard session>" \
  -H "Content-Type: application/json" \
  -d '{"role":null}'

Workspace stats

GET /api/v1/workspaces/current/stats

GET /workspaces/current/stats — workspace stats

Query parameters

Name Type Required Notes
from any no
to any no

Example

curl -X GET "https://linksnap.forjio.com/api/v1/workspaces/current/stats" \
  -H "Authorization: ApiKey lsk_live_<your API key>"

Switch active workspace

POST /api/v1/workspaces/switch

POST /workspaces/switch — switch active workspace

Authentication: Person-only: a signed-in person's session. An API key is refused (403 PERSON_ONLY): it picks the person’s active workspace; a key belongs to one workspace. See authentication.

Body

Field Type Required Notes
workspaceId any no

Example

curl -X POST "https://linksnap.forjio.com/api/v1/workspaces/switch" \
  -H "Cookie: linksnap_session=<your signed-in dashboard session>" \
  -H "Content-Type: application/json" \
  -d '{"workspaceId":null}'
Language