Skip to main content

WF-115: Team Deletion/Archival

Workflow ID: WF-115 Category: Team Management Priority: P1 Last Updated: January 11, 2026


Overview

This workflow handles team deletion or archival, including member reassignment, project migration, data preservation, and a 30-day soft delete recovery period.


Trigger Events

  • Admin initiates team deletion
  • Team restructuring/merger
  • Organization downsizing
  • Compliance-required removal

Sequence Diagram


Process Steps

1. Deletion Preview

System Analysis:

CheckDescription
Active membersCount of members to reassign
ProjectsProjects needing migration
Data volumeStorage to archive/migrate
IntegrationsExternal connections to sever
Pending tasksIncomplete work items

Preview Response:

{
"team_id": "team_123",
"team_name": "Engineering Alpha",
"members": {
"count": 12,
"roles": {"admin": 2, "member": 10}
},
"projects": {
"count": 5,
"total_storage_gb": 45.2
},
"pending_work": {
"tasks": 23,
"pull_requests": 7
},
"integrations": ["github", "slack"],
"estimated_archive_size": "52.1 GB",
"can_delete": true
}

2. Member Reassignment

Options:

OptionAction
Reassign to teamMove members to another team
Reassign to individualMake independent contributors
Revoke accessRemove from organization
No actionLeave unassigned (dangerous)

Reassignment Flow:

  1. Admin selects destination per member
  2. System transfers memberships
  3. Permissions updated automatically
  4. Members notified of change

3. Project Migration

Migration Options:

OptionDescription
TransferMove to another team
ArchiveRead-only preservation
CloneCopy to new team
DeletePermanent removal (requires confirmation)

Per-Project Selection:

{
"project_id": "proj_456",
"action": "transfer",
"destination_team": "team_789",
"migrate_history": true,
"migrate_issues": true,
"notify_collaborators": true
}

4. Data Archival

Archived Data:

Data TypeRetentionFormat
Team settings7 yearsJSON
Member history7 yearsJSON
Audit logs7 yearsJSON
Project archives30 days*Compressed
Chat history30 days*JSON

*Extended on request

Archive Package:

team_123_archive.tar.gz
├── team_metadata.json
├── members/
│ └── member_history.json
├── projects/
│ ├── proj_456.tar.gz
│ └── proj_789.tar.gz
├── audit_logs/
│ └── team_audit_log.json
└── MANIFEST.json

5. Soft Delete Period

30-Day Recovery Window:

DayStateRecovery
0-7Soft deletedInstant restore
8-14Soft deletedRestore with warning
15-29Soft deletedAdmin approval required
30+Permanent deletionNot recoverable

During Soft Delete:

  • Team invisible in UI
  • Data preserved in archive
  • Members reassigned
  • Projects migrated
  • Integrations disabled

6. Permanent Deletion

After 30 Days:

  1. Archive moved to cold storage
  2. Team ID blacklisted
  3. Audit record created
  4. Storage reclaimed
  5. Final notifications sent

API Endpoints

EndpointMethodPurpose
/api/v1/teams/{id}/deletion-previewGETPreview deletion impact
/api/v1/teams/{id}/deletePOSTInitiate soft delete
/api/v1/teams/{id}/restorePOSTRestore soft-deleted team
/api/v1/teams/{id}/force-deleteDELETEPermanent delete (admin)

Request: Delete Team

POST /api/v1/teams/team_123/delete
{
"member_actions": [
{"user_id": "usr_1", "action": "transfer", "destination": "team_789"},
{"user_id": "usr_2", "action": "revoke"}
],
"project_actions": [
{"project_id": "proj_456", "action": "transfer", "destination": "team_789"},
{"project_id": "proj_789", "action": "archive"}
],
"reason": "team_restructure",
"notify_members": true,
"archive_data": true
}

Response

{
"status": "soft_deleted",
"team_id": "team_123",
"deleted_at": "2026-01-11T12:00:00Z",
"recovery_deadline": "2026-02-10T12:00:00Z",
"archive_reference": "ARC-TEAM-2026-0111-001",
"members_reassigned": 12,
"projects_migrated": 5,
"data_archived_gb": 52.1
}

Notifications

To Team Members

Subject: Your team "[Team Name]" has been archived

Content:

  • Reason for archival
  • Your new team assignment (if applicable)
  • Data export deadline
  • Recovery period information

To Organization Admins

Subject: Team deletion completed

Content:

  • Team details
  • Actions taken
  • Archive reference
  • Recovery instructions

Error Handling

ErrorCauseResolution
ACTIVE_BILLINGTeam has active subscriptionCancel subscription first
PENDING_TRANSFERSIncomplete project transfersComplete transfers
MEMBER_CONFLICTSReassignment issuesResolve conflicts
ARCHIVE_FAILEDStorage errorRetry archival

Audit Events

EventLogged
team.delete.initiatedAdmin, Team, Reason
team.members.reassignedMember count, Destinations
team.projects.migratedProject count, Destinations
team.data.archivedArchive reference, Size
team.soft_deletedDeletion timestamp
team.restoredRestore timestamp, Admin
team.permanent_deletedFinal deletion timestamp


Last Updated: January 11, 2026