Skip to main content
Account deletion in Togul is a two-phase process. When you submit a deletion request, it is recorded and scheduled — data is retained but access is progressively restricted during the scheduled period. The deletion is not immediate. Both endpoints require the org.delete permission.
Account deletion cannot be undone once processed. All organization data, including projects, environments, flags, rules, and members, is permanently removed.

AccountDeletionRequest schema

FieldTypeDescription
idUUIDUnique request identifier
organization_idUUIDThe organization being deleted
requested_byUUID | nullUser ID who submitted the request
reasonstring | nullOptional reason provided at request time
scheduled_fordatetime | nullWhen deletion is scheduled to be processed
processed_atdatetime | nullWhen deletion was actually processed
statusstringrequested or processed
created_atdatetimeWhen the request was created
updated_atdatetimeWhen the request was last updated

List deletion requests

Returns all deletion requests for the current organization. GET /api/v1/account-deletion — requires org.delete permission.
curl http://localhost:8080/api/v1/account-deletion \
  -H "Authorization: Bearer $TOKEN"
Response:
{
  "requests": [
    {
      "id": "d1e2f3a4-b5c6-7890-abcd-ef1234567890",
      "organization_id": "org-uuid-here",
      "requested_by": "user-uuid-here",
      "reason": "Switching to a different provider",
      "scheduled_for": "2026-04-21T00:00:00Z",
      "processed_at": null,
      "status": "requested",
      "created_at": "2026-03-21T15:00:00Z",
      "updated_at": "2026-03-21T15:00:00Z"
    }
  ]
}

Request account deletion

Submits a deletion request for the current organization. You can optionally provide a reason. POST /api/v1/account-deletion — requires org.delete permission.
FieldTypeRequiredDescription
reasonstringNoOptional explanation for the deletion request
curl -X POST http://localhost:8080/api/v1/account-deletion \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Switching to a different provider"
  }'
Response:
{
  "request": {
    "id": "d1e2f3a4-b5c6-7890-abcd-ef1234567890",
    "organization_id": "org-uuid-here",
    "requested_by": "user-uuid-here",
    "reason": "Switching to a different provider",
    "scheduled_for": "2026-04-21T00:00:00Z",
    "processed_at": null,
    "status": "requested",
    "created_at": "2026-03-21T15:00:00Z",
    "updated_at": "2026-03-21T15:00:00Z"
  }
}

What happens after a request is submitted

Once a deletion request has status requested:
  • The request is scheduled for processing at scheduled_for
  • Data is retained but access to the organization is restricted during this period
  • When the scheduled time arrives and the request is processed, status changes to processed and processed_at is set
If you need to cancel a scheduled deletion before it is processed, contact support.

Build docs developers (and LLMs) love