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

# Delete playtable

`DELETE /api/playtables/{sid}`

## Request

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

Cascade soft-delete of a table AND everything scoped to it - including the table's PEOPLE (people live in exactly one playtable; no re-home on delete). Companies survive (multi-table membership). DESTRUCTIVE.

Flow: call without acknowledge first → 409 delete_blocked lists blockers. Hard blockers (resolve via other tools, then retry): active_workflow_records - stop/archive the owning workflows or remove the records; attached_workflow_sources - detach workflow sources reading this table's views or archive those workflows; running_playtable_run - cancel the run; import_in_progress - wait for or cancel the import. Soft blockers (confirm with the user, then pass acknowledge[]): people_present → "delete_people" (N people rows soft-deleted with the table); queued_cells → "cancel_queued_cells" (queued, not-yet-spent cell executions cancelled).

Cascade: views, fields, field deps, field values, people, data sources + items deleted; queued cells cancelled. No recovery TTL (recovery_available_until: null) - restore is an internal/DB operation only. Idempotent: a repeat call returns already_deleted:true with cascade:null. Finished runs, ledger receipts, finished workflow records/tasks, stoplist entries and tags are retained.

When NOT: removing people from a table (people-level op), archiving a workflow (workflows), or deleting a single view/field (their own delete tools).

Contract:
- MCP tool `delete_playtable`, registry package `mcp.playtables/playtables`, mount `playtables.tables`.
- 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 pt_tb_* sid of the row to delete.

## Query parameters

- `acknowledge[]` string[]: Soft-blocker resolution codes the user confirmed. Closed enum; arbitrary strings → 422.

## Response `200`

`delete_cascade` success envelope.

- DeletePlaytableResponse
  - `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-playtables.md) - [All operations](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-playtables/llms.txt) - [OpenAPI document](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-playtables/revisions/aa394506515d?raw)
