---
title: "Rename, move or re-own a folder"
method: PATCH
path: "/tables/folders/{folder_id}/"
tags: ["tables"]
---

# Rename, move or re-own a folder

`PATCH /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

Rename a folder, move it into another folder (parent_id, null for the top level) with everything in it, or change who owns it. A folder cannot move inside itself or one of its own folders.

## Path parameters

- `folder_id` string, uuid, required

## Request body

- TableFolderUpdateSchema: Request body for renaming, moving or re-owning a folder (omitted fields stay).
  - `name` union: Its new name.
    - string
    - unknown
  - `owner_user_id` union: The workspace member who owns it from now on; null for no owner.
    - string
    - unknown
  - `parent_id` union: The folder to move it into; null for the top level.
    - string, uuid
    - unknown

## Response `200`

Successful Response

- TableFolderSchema: 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

## 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)
