Skip to main content
POST
Switch the active workspace

Authorizations

hq-session
string
cookie
required

Browser session cookie set by sign-in. Web SPA only; not for PAT/OAuth integrators.

Body

application/json
slug
string
required

Tenant slug of the workspace to switch to.

Response

Active workspace switched (fresh session cookie set)

name
string
required
onboarded
boolean
required

Whether the target tenant has finished onboarding. The SPA lands the user on /onboarding when false (the router gate is the backstop).

slug
string
required
session_token
string | null

Native clients (the iOS/mobile app, X-Hq-Native: 1) can't ride the Set-Cookie re-scope - they store an explicit bearer. When the switch is requested natively we additionally mint a fresh native session token (hqses_<sealed>) for the target workspace, byte-identical underneath to the cookie. None for web callers (they use the cookie).