Deactivate organisation
https://app.speybooks.com/api/v1/admin/orgs/{id}/deactivateDeactivate an organisation. A reversible soft delete: it sets
deactivated_at and locks the organisation out at the request
chokepoint, on both the API key path and the session path. All data
is retained and the action is independent of billing state.
Deactivation is the within-window alternative to erasure. Hard
deletion is disabled (see deleteOrg); to take an organisation
offline while keeping its records, deactivate it here and reactivate
later.
Idempotent: deactivating an already-deactivated organisation is a no-op that preserves the original timestamp, reason, and actor, and writes no second audit record.
Request Body
reason: one ofcustomer_request,non_payment,admin_action,migration_abandoned. Required, recorded in both the audit trail and thedeactivated_reasoncolumn.note: optional free-text for the audit trail, minimum 5 characters.
Records an ORGANISATION_DEACTIVATED action in the audit log. A
repeat on an already-deactivated organisation returns
alreadyDeactivated: true and writes no audit record.
Error responses:
404 NOT_FOUND: no organisation with that id.400:reasonmissing or outside the allowed set.
Path parameters
idstringrequiredBody parameters
reasonstringrequiredcustomer_requestnon_paymentadmin_actionmigration_abandonednotestringoptionalResponse
Show response fields
deactivatedAtstringdate-timemessagestring