Delete Your Organization
The owner of a cancelled organization can ask for it to be permanently deleted. The deletion is scheduled for the end of a 30-day retention window. Until then the organization stays read-only, and the owner can restore it. Once the window ends, the organization and its data are deleted and can't be recovered.
The owner can do this from the Danger Zone at the bottom of the Dashboard's Organization page, or through the API.
Before you start
- The organization must be cancelled: its subscription has ended. Cancel from the Dashboard's Billing page first. See Billing FAQ.
- Only the organization's owner can schedule or withdraw a deletion, and their credentials need the
organization:organization-deletions:writescope. - If the owner is leaving, they can first hand ownership to another signed-in admin of the organization. In the Dashboard, use Transfer Ownership in the Danger Zone (see Transfer ownership). Through the API, send the new owner's auth user ID as
newOwnerUserIdtoPOST /organization-ownership/transfers. If the owner can no longer sign in, contact support to have a new owner set. - Export anything you want to keep. The organization stays readable during the retention window, but nothing can be recovered after it.
In the Dashboard
- Open Organization and scroll to Danger Zone.
- Select Delete, type the organization's code to confirm, and select Delete Organization.
- The Danger Zone then shows the date the deletion takes effect. To keep the organization, select Restore Organization before then.
The Delete button is disabled until the organization is cancelled, and for anyone but the owner.
Schedule the deletion through the API
Delete the organization by its ID, passing its code as confirmationCode to confirm. The code is compared ignoring case. GET /organizations returns the organization's ID.
curl -X DELETE "https://api.loomloyalty.com/organizations/$ORGANIZATION_ID?confirmationCode=acme-corp" \
-H "Authorization: Bearer $TOKEN"
The deletion is queued, not done at once: the response is 202 Accepted with the organization, whose deletionScheduledDateTime says when the deletion takes effect.
| Response | Code | Meaning |
|---|---|---|
| 202 | The deletion is scheduled. | |
| 400 | ORGANIZATION_DELETION_CODE_MISMATCH | The confirmation code isn't the organization's code. |
| 400 | VALIDATION_FAILED | confirmationCode is missing. |
| 403 | ORGANIZATION_NOT_OWNER | The caller isn't the organization's owner. |
| 404 | ORGANIZATION_NOT_FOUND | The ID isn't the caller's organization. |
| 409 | ORGANIZATION_DELETION_NOT_CANCELLED | The organization isn't cancelled. |
| 409 | ORGANIZATION_DELETION_ALREADY_SCHEDULED | A deletion is already scheduled. |
| 409 | ORGANIZATION_DELETION_DISABLED | Organization deletion isn't available yet. Contact support. |
Restore the organization through the API
Until the scheduled time, the owner can withdraw the deletion by creating a restoration. The organization stays cancelled.
curl -X POST "https://api.loomloyalty.com/organizations/$ORGANIZATION_ID/restorations" \
-H "Authorization: Bearer $TOKEN"
| Response | Code | Meaning |
|---|---|---|
| 201 | The deletion is withdrawn. | |
| 404 | ORGANIZATION_NOT_FOUND | The ID isn't the caller's organization. |
| 409 | ORGANIZATION_DELETION_NOT_SCHEDULED | No deletion is scheduled. |
| 409 | ORGANIZATION_DELETION_IN_PROGRESS | The scheduled time has passed and the deletion may already be running. It can't be withdrawn. |
Once the scheduled time has passed, the organization also can't be reinstated.
What happens when the window ends
A nightly job deletes organizations whose scheduled time has passed. It works in two stages and retries anything that fails on the next night, so the deletion can take more than one night to finish.
- Connected services. The organization is removed from:
- Analytics: every analytics row for its environments.
- Notifications: its notification tenant, and the notification profiles of users who are removed.
- Sign-in: the sign-in organization of each of its environments. Every member loses access to it.
- Billing: the Stripe customer is kept with its invoices, but its name, address, shipping address and phone number are cleared and it is marked as belonging to a deleted organization.
- Your data. Every record the organization holds is deleted: environments, customers, programs, rules, offers, segments, data models, configuration, roles, API clients and the rest. The organization's code becomes free to use again.
Users
A user whose only organization is the one being deleted is deleted with it: their account, their sign-in identity and their notification profile. A user who also belongs to another organization keeps their account and loses only their access to this one.
What is kept
A few records outlive the organization because they are evidence or legal records, not your loyalty data:
| Record | Why it is kept |
|---|---|
| Audit log entries | Kept for 3 years under the audit retention policy. |
| Contract acceptance records | Evidence that the agreements were accepted. |
| Sanctions screening results | Evidence of the compliance check, kept for audit. |
| Stripe customer and invoices | Financial records. Contact details are cleared, as above. |
| A deletion record | The organization's code and when it was deleted, so the deletion can be shown to have happened. |
Related
- Billing FAQ, for cancelling a subscription
- Organization Details, to find the organization's code