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”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
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Example
{ "error": { "code": "NOT_FOUND" }}Missing or invalid API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Example
{ "error": { "code": "NOT_FOUND" }}API key lacks required scope/role
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Example
{ "error": { "code": "NOT_FOUND" }}Conflicting idempotency key or resource processing state
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Example
{ "error": { "code": "NOT_FOUND" }}