---
title: "Create Directory"
method: POST
path: "/agent-knowledge/directories"
tags: ["agent-knowledge"]
---

# Create Directory

`POST /agent-knowledge/directories`

## Request

- Base URL: `https://api.traversal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.traversal.com/agent-knowledge/directories`
- Auth: none declared

## Request body

- CreateAgentKnowledgeDirectoryRequest
  - `path` string, required

## Response `201`

Successful Response

- CreateAgentKnowledgeDirectoryResponse
  - `kind` 'directory'
  - `id` string, nullable
  - `path` string, required
  - `parentPath` string, required
  - `name` string, required
  - `directoryKind` string, nullable
  - `status` string, nullable
  - `isUserVisible` boolean, required
  - `fileCount` integer, nullable
  - `directoryCount` integer, nullable
  - `categoryLabel` string, nullable
  - `commentCount` integer
  - `updatedAt` string, date-time, nullable
  - `node` AgentKnowledgeDirectoryWindowNodeResponse, required
    - `hasChildDirectories` boolean, required
    - `hasChildren` boolean, required
    - `id` string, nullable, required
    - `isUserVisible` boolean, required
    - `kind` 'directory', required
    - `name` string, required
    - `path` string, required
    - `updatedAt` string, date-time, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/traversal/apis/traversal-api.md) - [All operations](https://skmtc.dev/traversal/apis/traversal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/traversal/apis/traversal-api/revisions/31e1a8b7cf89?raw)
