Skip to main content

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:write scope.
  • 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 newOwnerUserId to POST /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​

  1. Open Organization and scroll to Danger Zone.
  2. Select Delete, type the organization's code to confirm, and select Delete Organization.
  3. 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.

ResponseCodeMeaning
202The deletion is scheduled.
400ORGANIZATION_DELETION_CODE_MISMATCHThe confirmation code isn't the organization's code.
400VALIDATION_FAILEDconfirmationCode is missing.
403ORGANIZATION_NOT_OWNERThe caller isn't the organization's owner.
404ORGANIZATION_NOT_FOUNDThe ID isn't the caller's organization.
409ORGANIZATION_DELETION_NOT_CANCELLEDThe organization isn't cancelled.
409ORGANIZATION_DELETION_ALREADY_SCHEDULEDA deletion is already scheduled.
409ORGANIZATION_DELETION_DISABLEDOrganization 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"
ResponseCodeMeaning
201The deletion is withdrawn.
404ORGANIZATION_NOT_FOUNDThe ID isn't the caller's organization.
409ORGANIZATION_DELETION_NOT_SCHEDULEDNo deletion is scheduled.
409ORGANIZATION_DELETION_IN_PROGRESSThe 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.

  1. 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.
  2. 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:

RecordWhy it is kept
Audit log entriesKept for 3 years under the audit retention policy.
Contract acceptance recordsEvidence that the agreements were accepted.
Sanctions screening resultsEvidence of the compliance check, kept for audit.
Stripe customer and invoicesFinancial records. Contact details are cleared, as above.
A deletion recordThe organization's code and when it was deleted, so the deletion can be shown to have happened.