---
title: "Delete team"
method: DELETE
path: "/api/teams/{sid}"
tags: ["teams"]
---

# Delete team

`DELETE /api/teams/{sid}`

## Request

- Base URL: `https://beta.getsales.io/id/v1`
- URL: `https://beta.getsales.io/id/v1/api/teams/{sid}`
- Auth: HTTP bearer and API key in header `Team-SID`

Cascade soft-delete a workspace and its rows (members, keys, sessions, OAuth clients, brands, certificates); its share goes back to the pool. Owner only. DESTRUCTIVE, no restore: the data is erased 30 days later. Soft blockers (active keys, other members) answer 409 delete_blocked until acknowledged. Deleting the owner's last workspace leaves the account untouched and teamless. The caller's session is revoked by the cascade: re-mint for the surviving team first.

Contract:
- MCP tool `delete_team`, registry package `mcp.id/teams`, mount `id.identity`.
- Operation `delete`, response envelope `delete_cascade`.
- Flags: dangerous: the MCP layer gates it behind a preview/commit token, and the effect cannot be undone through this API.

## Path parameters

- `sid` string, required: The ts_tm_* sid of the row to delete.

## Query parameters

- `acknowledge[]` string[]: Resolution codes of the soft blockers the user confirmed (error.blockers[].resolution of a delete_blocked answer).
- `next_default_team_sid` string: Which of the caller's other live memberships becomes their working team afterwards; default the oldest. 422 when it is not an active membership of theirs.

## Response `200`

`delete_cascade` success envelope.

- DeleteTeamResponse
  - `success` true, required
  - `operation` 'delete', required
  - `item` object, required
  - `already_deleted` boolean, required
  - `soft_deleted` boolean, required
  - `cascade` object, nullable, required
    - `summary` string, required
    - `details` object[], required
      - `entity` string, required
      - `deleted` integer, required
      - `cancelled` integer
    - `recovery_available_until` string, nullable, required
  - `meta` object, required
    - `trace_id` string, required: UUID v7; same 128-bit value as the X-Trace-Id header.
    - `span_id` string, required: 16 hex chars, root span of this request.
    - `timestamp` string, required: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
    - `duration_ms` integer, required: Server-side wall clock.
    - `team_sid` string, nullable: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
    - `actor_type` string, nullable: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.

## Other responses

- `4XX`: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
- `5XX`: MCP error envelope with `error.code` internal_error or service_unavailable.

---

[API](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-id.md) - [All operations](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-id/llms.txt) - [OpenAPI document](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-id/revisions/95e48541fe85?raw)
