---
title: "Admin Delete Survey"
method: DELETE
path: "/admin/surveys/{survey_id}"
---

# Admin Delete Survey

`DELETE /admin/surveys/{survey_id}`

## Request

- Base URL: `https://api.local-mcp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.local-mcp.com/admin/surveys/{survey_id}`
- Auth: none declared. Required headers: `x-admin-key`

Permanently delete a survey and (via ON DELETE CASCADE) its targets + responses.

PREVIEW BY DEFAULT. Without ?confirm=true this reports what the delete would destroy and
changes nothing. The count matters because the CASCADE is invisible from the call site: the
request says "delete survey 8" and the FK quietly takes every answer anyone ever gave it.
On 2026-08-08 we reconstructed 19 deleted responses across resets and survey deletions, and the
only signal left was a row counter — no record of whose answers they were.

"The UI confirms" was the old safeguard, and it isn't one: the endpoint is called from curl and
from agents far more often than from the UI, and neither sees that dialog.

## Path parameters

- `survey_id` integer, required

## Query parameters

- `confirm` boolean

## Headers

- `x-admin-key` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/local-mcp/apis/lmcp-api.md) · [All operations](https://skmtc.dev/local-mcp/apis/lmcp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/local-mcp/apis/lmcp-api/revisions/f1f1c502623a?raw)
