---
title: "Create Folder"
method: POST
path: "/folders/"
tags: ["Folders"]
---

# Create Folder

`POST /folders/`

Create a folder.

The folder name must match `[\w -]+` (letters, digits, underscore,
space, hyphen); other characters return `400`. The resulting path
(the slug joined to the parent's path with a dot) must be unique
within the project, otherwise the call returns `409`. Passing a
`parent_id` that does not exist returns `404`. Paths are capped at
10 levels of nesting and slugs at 64 characters.

## Request body

- FolderCreateRequest
  - `folder` FolderCreate, required
    - `flags` object, nullable
    - `tags` object, nullable
    - `meta` object, nullable
    - `name` string, nullable
    - `description` string, nullable
    - `slug` string, nullable
    - `kind` 'applications'
    - `parent_id` string, uuid, nullable — Id of the parent folder. Omit or set to `null` to create a root folder.

## Response `200`

Successful Response

- FolderResponse
  - `count` integer — Number of folders returned (`0` or `1`).
  - `folder` Folder
    - `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` 'applications'
    - `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.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.net/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/versions/ea6421d829f1/schema)
