Remember the selected workspace
PUT
/me/active-organization
const url = 'https://api.invogi.com/v1/me/active-organization';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"organization_id":"9b0e4d51-27be-4cfa-8fd5-652f4e2d94ad"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.invogi.com/v1/me/active-organization \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "organization_id": "9b0e4d51-27be-4cfa-8fd5-652f4e2d94ad" }'Requires a signed-in Clerk session; no workspace selection is needed.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
organization_id
required
string format: uuid
Example
{ "organization_id": "9b0e4d51-27be-4cfa-8fd5-652f4e2d94ad"}Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
organization_id
required
string
role
required
string
Example
{ "role": "OWNER"}Invalid request
Media typeapplication/json
Missing or invalid API key
Media typeapplication/json
API key lacks required scope/role
Media typeapplication/json