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:
| Check | Description |
|---|---|
| Active members | Count of members to reassign |
| Projects | Projects needing migration |
| Data volume | Storage to archive/migrate |
| Integrations | External connections to sever |
| Pending tasks | Incomplete 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": ["internal-tools"],
"estimated_archive_size": "52.1 GB",
"can_delete": true
}
2. Member Reassignment
Options:
| Option | Action |
|---|---|
| Reassign to team | Move members to another team |
| Reassign to individual | Make independent contributors |
| Revoke access | Remove from organization |
| No action | Leave unassigned (dangerous) |
Reassignment Flow:
- Admin selects destination per member
- System transfers memberships
- Permissions updated automatically
- Members notified of change
3. Project Migration
Migration Options:
| Option | Description |
|---|---|
| Transfer | Move to another team |
| Archive | Read-only preservation |
| Clone | Copy to new team |
| Delete | Permanent 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 Type | Retention | Format |
|---|---|---|
| Team settings | 7 years | JSON |
| Member history | 7 years | JSON |
| Audit logs | 7 years | JSON |
| Project archives | 30 days* | Compressed |
| Chat history | 30 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:
| Day | State | Recovery |
|---|---|---|
| 0-7 | Soft deleted | Instant restore |
| 8-14 | Soft deleted | Restore with warning |
| 15-29 | Soft deleted | Admin approval required |
| 30+ | Permanent deletion | Not recoverable |
During Soft Delete:
- Team invisible in UI
- Data preserved in archive
- Members reassigned
- Projects migrated
- Integrations disabled
6. Permanent Deletion
After 30 Days:
- Archive moved to cold storage
- Team ID blacklisted
- Audit record created
- Storage reclaimed
- Final notifications sent
API Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/api/v1/teams/{id}/deletion-preview | GET | Preview deletion impact |
/api/v1/teams/{id}/delete | POST | Initiate soft delete |
/api/v1/teams/{id}/restore | POST | Restore soft-deleted team |
/api/v1/teams/{id}/force-delete | DELETE | Permanent 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
| Error | Cause | Resolution |
|---|---|---|
ACTIVE_BILLING | Team has active subscription | Cancel subscription first |
PENDING_TRANSFERS | Incomplete project transfers | Complete transfers |
MEMBER_CONFLICTS | Reassignment issues | Resolve conflicts |
ARCHIVE_FAILED | Storage error | Retry archival |
Audit Events
| Event | Logged |
|---|---|
team.delete.initiated | Admin, Team, Reason |
team.members.reassigned | Member count, Destinations |
team.projects.migrated | Project count, Destinations |
team.data.archived | Archive reference, Size |
team.soft_deleted | Deletion timestamp |
team.restored | Restore timestamp, Admin |
team.permanent_deleted | Final deletion timestamp |
Related Workflows
Last Updated: January 11, 2026