Delete organisation

DELETE https://app.speybooks.com/api/v1/admin/orgs/{id}

Permanently delete an organisation and all associated accounting data. Implements GDPR Article 17. This operation is irreversible.

Confirmation

Requires confirm: "DELETE" and reason (minimum 5 characters).

Stripe Cleanup

If the organisation has a Stripe subscription, it is cancelled via stripe.subscriptions.cancel(). Stripe errors are logged but do not block deletion (subscription may already be cancelled).

Cascade Delete (Transaction)

Deletes in dependency order within a single transaction:

  1. journal_entry_lines
  2. journal_entries
  3. invoice_lines
  4. invoices
  5. transactions
  6. contacts
  7. accounts
  8. audit_log
  9. user_organisations
  10. organisations

Side Effects

  • Writes ORG_DELETED_GDPR to admin_audit_log with the deleted organisation name

Note: linked users are not deleted, only their organisation membership. Users become orphaned and can be deleted separately or re-assigned.

Path parameters

id string required
Organisation ID to permanently delete.

Response

200 Organisation permanently deleted (GDPR). Stripe subscription cancelled, all data cascade-deleted.
Show response fields
message string

Error codes

404 Organisation not found.