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
| Field | Type | Description |
|---|
id | UUID | Unique request identifier |
organization_id | UUID | The organization being deleted |
requested_by | UUID | null | User ID who submitted the request |
reason | string | null | Optional reason provided at request time |
scheduled_for | datetime | null | When deletion is scheduled to be processed |
processed_at | datetime | null | When deletion was actually processed |
status | string | requested or processed |
created_at | datetime | When the request was created |
updated_at | datetime | When 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.
| Field | Type | Required | Description |
|---|
reason | string | No | Optional 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.