Minctrl Docs

Work in another of your companies

POST
/auth/switch-company

Issue a session token scoped to another company the caller is an active member of.

The caller proved who they are when they signed in; this only changes which of their companies the session works in. A company they do not belong to, or belong to only as 'requested' / 'removed', answers 404 — the same as a company that does not exist. The switch is recorded in that company's audit chain as session_started.

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/auth/switch-company" \  -H "Content-Type: application/json" \  -d '{    "company_id": "b2e6a1c3-1a5e-44ae-a8fd-81f76fd715cf"  }'
null