---
title: "Preview playtable delete"
method: POST
path: "/api/playtables/{sid}/delete-preview"
tags: ["playtables"]
---

# Preview playtable delete

`POST /api/playtables/{sid}/delete-preview`

## Request

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

The read-only dry run of delete_playtable: every blocker the delete would answer (hard ones to resolve first, soft ones listed unwaived with the resolution codes to pass as acknowledge) and the projected cascade (people, views, fields, deps, cells with the queued ones, sources paused) plus what survives (companies kept). Nothing is locked or written: the counts are advisory, the delete re-checks under its lock. Show the user what dies before asking for the confirm; item is the table.

Contract:
- MCP tool `preview_playtable_delete`, registry package `mcp.playtables/playtables`, mount `playtables.tables`.
- Operation `action`, response envelope `action`.
- Flags: read only.

## Path parameters

- `sid` string, required: Playtable sid (pt_tb_…).

## Response `200`

`action` success envelope.

- PreviewPlaytableDeleteResponse
  - `success` true, required
  - `operation` 'action', required
  - `action` string, required: kebab-case verb; matches the route segment.
  - `item` object, nullable, required
    - `sid` string, required
    - `team_sid` string, required
    - `name` string, required
    - `description` string, nullable, required
    - `agent_sid` string, nullable, required: The AI SDR picked for this table (ub_ag_…, block 10 step 10.2): the agent that works every thread of its people, every setting on the agent itself (its Brief, goal, link, scenarios: update_agent). Null = the team's default agent, whichever it is. The table's own setup of before (ai_sdr_setup, 2026-10-12 to 2026-10-30) became an agent of its own in step 10.3.
    - `company_default_view_sid` string, required: pt_vw_… default view of the companies tab; auto-created with the table, read-only.
    - `people_default_view_sid` string, required: pt_vw_… default view of the people tab; auto-created with the table, read-only.
    - `config` object, required
      - `auto_run` boolean, required: When true, action fields fire automatically on rows entering the table (empty→queued). Default false.
    - `created_by` object, required
      - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
      - `actor_sid` string, nullable, required
      - `team_sid` string, required
      - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
      - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
      - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
      - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
      - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
      - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
    - `deleted_by` object, nullable, required
      - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
      - `actor_sid` string, nullable, required
      - `team_sid` string, required
      - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
      - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
      - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
      - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
      - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
      - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
    - `created_at` string, required
    - `updated_at` string, required
    - `deleted_at` string, nullable, required
  - `result` object, required
    - `already_deleted` boolean, required: true when the table is gone already: then blockers and cascade are empty.
    - `blockers` object[], required: Hard first (resolve them with other tools), then every soft one, none waived; delete_playtable takes the soft ones' resolution codes as acknowledge[].
      - `type` string, required: Machine-readable blocker type (active_flow, pending_tasks, …).
      - `severity` string, required: hard = resolve it with another tool first (the delete refuses until it is gone); soft = pass its resolution code in delete_playtable's acknowledge[].
      - `description` string, required
      - `entity_sid` string, nullable
      - `count` integer
      - `resolution` string, required: Hard: tool name to call. Soft: code for acknowledge[].
      - `resolution_hint` string, required
    - `cascade` object, required
      - `details` object[], required: Per-entity projected counts: people, playtable_views, playtable_fields, playtable_field_deps, playtable_field_values (with queued, the cells cancelled unspent), data_sources (deleted 0, with paused: sources are paused and detached, never deleted).
        - `entity` string, required
        - `deleted` integer, required
      - `retained` object[], required: What survives: companies (multi-table membership), with how many keep their other tables.
        - `entity` string, required
        - `kept` integer, 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)
