---
title: "CreateDirectoryBody"
description: "Request body for creating a Directory."
section: "Reference"
group: "Types"
order: 69
---

## Definition

```ts
interface CreateDirectoryBody {
  workspaceId: string;
  name: string;
  parentId?: string | undefined;
  slug?: string | undefined;
}
```

## Fields

| Field         | Type                  | Notes                                                                                     |
| ------------- | --------------------- | ----------------------------------------------------------------------------------------- |
| `workspaceId` | `string`              | `required` — Workspace that will own the new directory.                                   |
| `name`        | `string`              | `required` — Display name for the directory.                                              |
| `parentId`    | `string \| undefined` | `optional` — Parent directory. Defaults to the workspace root.                            |
| `slug`        | `string \| undefined` | `optional` — Optional override. Defaults to slugify(name). Must be unique among siblings. |
