---
title: "Restore a trashed table"
method: POST
path: "/tables/{table_id}/restore/"
tags: ["tables"]
---

# Restore a trashed table

`POST /tables/{table_id}/restore/`

## 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/{table_id}/restore/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Bring a trashed table back, with every column, row and cell it held, into the folder it was in (the top level when that folder is in Trash too).

Fails if a live table has taken its name in the meantime. One of the two has to be renamed first, and this endpoint will not guess which.

## Path parameters

- `table_id` string, uuid, required

## Response `200`

Successful Response

- TableReadSchema: A table definition with its authoritative row counter.
  - `ai_made` boolean: Whether the AI Assistant created this table through a granted action. The owner is still the person who approved it.
  - `archived_at` string, date-time, nullable: When somebody archived it; null for a table on the list. An archived table is left out of All, its folder, Favorites and Recent, and still found by search and opened as before.
  - `auto_run` boolean, required: Whether data changes request recompute runs by themselves. Column-definition changes always recompute.
  - `created_at` string, date-time, required
  - `deleted_at` string, date-time, nullable: When the table was moved to trash; null for a live table.
  - `description` string, nullable, required
  - `folder_id` string, uuid, nullable: The folder it sits in; null for the top level.
  - `folder_path` TableFolderCrumbSchema[]: The folders on the way to it, from the top level down; empty at the top level. What the list says under a search result and the table's own breadcrumb shows.
    - `id` string, uuid, required
    - `name` string, required
  - `former_tags` string[]: The tags it carried when folders replaced tags, when it carried more than one and so waits for somebody to file it. Empty once it is filed.
  - `id` string, uuid, required
  - `is_favorite` boolean: Whether the CALLING USER starred this table. Per-user, so a teammate may see a different value. Always false for API-key callers, which have no user to have preferences.
  - `keep_existing_results` boolean, required: Whether a manual run-all only fills the errored, empty and stale cells rather than recomputing every cell in scope.
  - `last_viewed_at` string, date-time, nullable: When the calling user last opened this table; null means never.
  - `name` string, required
  - `owner_display_name` string, nullable: The owner's name, resolved for display. Null when there is no owner or the account has no name to show.
  - `owner_user_id` string, nullable: Who created the table. Null for tables older than this field and for anything a background job created. NOT an access control: every member of the organisation can open and edit every table.
  - `row_count` integer, required: Exact row count, maintained atomically by row mutations.
  - `shared_as_template` boolean: Whether this table's shape is readable by anyone with the link, with no sign-in. Never its rows.
  - `updated_at` string, date-time, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Table not found in trash
- `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)
