Delete the current workspace (OWNER only)
DELETE
/organizations/current
const url = 'https://api.invogi.com/v1/organizations/current';const options = { method: 'DELETE', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"confirm_name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.invogi.com/v1/organizations/current \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "confirm_name": "example" }'Soft delete. The workspace stops resolving for every member, its API keys and pending invites are revoked, and scheduled ERP sync skips it. Its records and audit trail are kept for the retention period, and an owner can restore it from the app. Refused with CONFLICT while the workspace has a subscription that is not canceled.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”X-Invogi-Organization
string format: uuid
For a Clerk session, selects a workspace in which the user has an active membership. If omitted, the remembered accessible workspace is used. API keys remain bound to their own workspace and cannot select another tenant.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
confirm_name
required
The workspace name
string
Example generated
{ "confirm_name": "example"}Responses
Section titled “Responses”Workspace deleted and audit event recorded
Invalid request
Media typeapplication/json
Missing or invalid API key
Media typeapplication/json
API key lacks required scope/role
Media typeapplication/json
Conflicting idempotency key or resource processing state
Media typeapplication/json