# Edit Folder

Source: https://agenta.ai/docs/reference/api/edit-folder

`PUT /folders/{folder_id}`

Base URL: `https://us.cloud.agenta.ai/api` (US cloud), `https://eu.cloud.agenta.ai/api` (EU cloud) or `$AGENTA_HOST/api` (self-hosted). Authentication: `Authorization: ApiKey YOUR_API_KEY`.

Rename or move a folder.

Use this endpoint to change a folder's `slug`, `name`, or
`parent_id`. The `id` in the request body must match the path
parameter or the call returns `400`. Name and path-uniqueness rules
from create apply: invalid names return `400`, a path collision
returns `409`, and a missing `parent_id` returns `404`.

## Parameters

- `folder_id` (in path, string (uuid), required)

## Request body schema

Content type: `application/json` (required)

- `folder` (object, required): Folder edit payload. `id` must match the path parameter. Only fields present in the payload are changed.
  - `flags` (object, nullable)
  - `tags` (object, nullable)
  - `meta` (object, nullable)
  - `name` (string, nullable)
  - `description` (string, nullable)
  - `slug` (string, nullable)
  - `id` (string (uuid), nullable)
  - `kind` (string, one of: "applications", nullable): Resource family. Must match the current folder's kind; defaults to `applications`.
  - `parent_id` (string (uuid), nullable): New parent folder id. Include the key with a `null` value to move the folder to the root; omit the key to keep the existing parent.

## Response schemas

### 200: Successful Response

- `count` (integer): Number of folders returned (`0` or `1`). Default: `0`.
- `folder` (object, nullable): The folder, when found. Omitted when `count` is `0`.
  - `flags` (object, nullable)
  - `tags` (object, nullable)
  - `meta` (object, nullable)
  - `name` (string, nullable)
  - `description` (string, nullable)
  - `created_at` (string (date-time), nullable)
  - `updated_at` (string (date-time), nullable)
  - `deleted_at` (string (date-time), nullable)
  - `created_by_id` (string (uuid), nullable)
  - `updated_by_id` (string (uuid), nullable)
  - `deleted_by_id` (string (uuid), nullable)
  - `slug` (string, nullable)
  - `id` (string (uuid), nullable)
  - `kind` (string, one of: "applications", nullable): Resource family this folder organizes. Only `applications` is defined today, and it also covers workflows, evaluators, and testsets (they share the artifact table).
  - `path` (string, nullable): Dot-separated materialized path built from the folder's slug and its ancestors' slugs. Read-only; derived by the server.
  - `parent_id` (string (uuid), nullable): Id of the parent folder, or `null` for a root folder.

### 422: Validation Error

- `detail` (array of object)
  - `loc` (array of string | integer, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (Context)
