---
title: "Move a folder to Trash"
method: DELETE
path: "/tables/folders/{folder_id}/"
tags: ["tables"]
---

# Move a folder to Trash

`DELETE /tables/folders/{folder_id}/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/tables/folders/{folder_id}/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Move a folder to Trash with every folder and table in it, archived tables included, as Google Drive does. Trash lists the folder, and restoring it brings everything back together. Trash keeps it for the same 30 days as a table.

## Path parameters

- `folder_id` string, uuid, required

## Response `200`

Successful Response

- TableFolderTrashResultSchema: What deleting or restoring a folder moved.
  - `folder` TableFolderSchema, required: A workspace folder, as the Tables list draws it.
    - `created_at` string, date-time, required
    - `folder_count` integer: Folders directly in it.
    - `id` string, uuid, required
    - `last_viewed_at` string, date-time, nullable: When the CALLING USER last opened any table in it, at any depth; null when they never have.
    - `name` string, required
    - `nested_archived_count` integer: Archived tables in it at any depth, which go to Trash with it too.
    - `nested_table_count` integer: Tables in it at any depth, archived ones aside. What deleting it would send to Trash, archived tables added.
    - `owner_display_name` string, nullable: The owner's name, resolved for display.
    - `owner_user_id` string, nullable, required: Who to ask about it: whoever made it, unless somebody changed it.
    - `parent_id` string, uuid, nullable, required: The folder it sits in; null for the top level.
    - `table_count` integer: Tables directly in it, archived ones aside.
    - `updated_at` string, date-time, required
  - `folder_count` integer, required: Folders that moved, this one included.
  - `left_in_trash_table_ids` string[]: On a restore: tables that stayed in Trash because a live table has taken their name since. Each is now listed in Trash on its own.
  - `table_ids` string[], required: Tables that moved with it.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Folder not found
- `422`: Invalid request made to the API.
- `500`: Internal server error.
- `502`: Bad gateway error.
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/4a6bd71e3f02?raw)
