---
title: "Create Directory"
method: POST
path: "/api/v1/beta/directories"
tags: ["Beta", "Directories"]
---

# Create Directory

`POST /api/v1/beta/directories`

Create a new directory within the specified project.

If data_source_id is provided, validates that the data source exists
and belongs to the same project.

## Query parameters

- `project_id` string, uuid, nullable
- `organization_id` string, uuid, nullable

## Cookies

- `session` string, nullable

## Request body

- DirectoryCreateRequest — API request schema for creating a directory.
  - `name` string, required — Human-readable name for the directory.
  - `description` string, nullable — Optional description shown to users.
  - `data_source_id` string, nullable — Optional data source id the directory syncs from.

## Response `201`

Successful Response

- DirectoryResponse — API response schema for a directory.
  - `id` string, required — Unique identifier for the directory.
  - `created_at` string, date-time, nullable — Creation datetime
  - `updated_at` string, date-time, nullable — Update datetime
  - `project_id` string, required — Project the directory belongs to.
  - `name` string, required — Human-readable name for the directory.
  - `description` string, nullable — Optional description shown to users.
  - `data_source_id` string, nullable — Optional data source id the directory syncs from. Null if just manual uploads.
  - `deleted_at` string, date-time, nullable — Optional timestamp of when the directory was deleted. Null if not deleted.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/run-llama/apis/llama-platform.md) · [All operations](https://skmtc.dev/run-llama/apis/llama-platform/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/run-llama/llama-platform/revisions/01ac7197eb4a/schema)
