Create a workspace
POST
/organizations
const url = 'https://api.invogi.com/v1/organizations';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Example supplier"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.invogi.com/v1/organizations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Example supplier" }'Requires a Clerk session, without a selected workspace. Creates the default company and an OWNER membership. A user who already created an unupgraded free workspace must reuse, upgrade or restore it. Another-industry text is required only for OTHER.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
id
required
string
name
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
Processing failed; use the error code and request ID for troubleshooting.
Media typeapplication/json