puter.teams.delete()Deletes a team. Owner account only.
The accounts the team provisioned are not deleted. What stops is the team paying for them, so the per-account charges end and the storage charges do not. Its handle is released, and its audit log stays readable to the owner account afterwards.
puter.teams.delete(uid)
uid (String) (required)
The team's identifier.
A Promise that resolves to nothing once the team is gone.
Rejects with not_the_team_owner if the caller is not the owner account.
Create a team then delete it
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
(async () => {
const team = await puter.teams.create({ name: 'Temporary' });
puter.print(`Created ${team.uid}<br>`);
await puter.teams.delete(team.uid);
puter.print('Deleted. Any accounts it provisioned still exist.');
})();
</script>
</body>
</html>