---
title: "Delete a surface"
method: DELETE
path: "/api/workspaces/{slug}/surfaces/{surfaceSlug}"
tags: ["Surfaces"]
---

# Delete a surface

`DELETE /api/workspaces/{slug}/surfaces/{surfaceSlug}`

## Request

- Base URL: `https://trydock.ai`
- URL: `https://trydock.ai/api/workspaces/{slug}/surfaces/{surfaceSlug}`
- Auth: HTTP bearer

Archive a surface (soft delete: rows and doc body are kept). Restore it with `POST /surfaces/{surfaceSlug}/unarchive`. The workspace must keep at least one surface; archiving the last one returns 400.

## Path parameters

- `slug` string, required
- `surfaceSlug` string, required

## Response `200`

Deleted.

- object
  - `ok` true, required

## Other responses

- `400`: Workspace would have no surfaces left.

---

[API](https://skmtc.dev/trydock/apis/dock-rest-api.md) - [All operations](https://skmtc.dev/trydock/apis/dock-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trydock/apis/dock-rest-api/revisions/dd96ae96a412?raw)
