Advanced Team Management
Covers the modern lifecycle routes for archived teams.
Step 1: Deactivate (Soft-Delete) A Team
Endpoint: DELETE /api/teams/lifecycle/:team_uuid?org_uuid=:org_uuid
~~~bash
curl -X DELETE "https://api.buttrbase.com/api/teams/lifecycle/team-uuid-abc?org_uuid=org-uuid-123" \
-H "Authorization: Bearer
Output: ~~~json { "data": { "id": 1, "name": "Frontend Developers", "org_uuid": "org-uuid-123", "team_uuid": "team-uuid-abc", "status": false }, "message": "Team deleted successfully" } ~~~
Step 2: List Inactive Teams
Endpoint: GET /api/teams/org/:org_uuid/inactive
~~~bash
curl -X GET "https://api.buttrbase.com/api/teams/org/org-uuid-123/inactive" \
-H "Authorization: Bearer
Output: ~~~json { "data": [ { "id": 1, "name": "Archived Team", "org_uuid": "org-uuid-123", "team_uuid": "team-uuid-abc", "status": false, "member_count": 3 } ] } ~~~
Step 3: Reactivate A Team
Endpoint: POST /api/teams/lifecycle/:team_uuid/reactivate
Input: ~~~json { "org_uuid": "org-uuid-123" } ~~~
~~~bash
curl -X POST https://api.buttrbase.com/api/teams/lifecycle/team-uuid-abc/reactivate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer
Output: ~~~json { "data": { "id": 1, "name": "Archived Team", "org_uuid": "org-uuid-123", "team_uuid": "team-uuid-abc", "status": true }, "message": "Team reactivated successfully" } ~~~
Important
- Team deletion is a soft-delete, not a hard-delete.
- The older
/team/*lifecycle routes still exist, but they should be treated as compatibility paths.