---
title: "Create a folder"
method: POST
path: "/api/workspaces/{slug}/folders"
tags: ["Files"]
---

# Create a folder

`POST /api/workspaces/{slug}/folders`

## Request

- Base URL: `https://trydock.ai`
- URL: `https://trydock.ai/api/workspaces/{slug}/folders`
- Auth: HTTP bearer

## Path parameters

- `slug` string, required

## Request body

- object
  - `surfaceSlug` string, required
  - `parentFolderId` string, nullable
  - `name` string, required

## Response `200`

Folder created

- object
  - `id` string, required
  - `name` string, required
  - `parentFolderId` string, nullable, required
  - `position` integer, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Changes

- **2026-11-05** `767beae124a8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/trydock/apis/dock-rest-api/changes/api/workspaces/:slug/folders/post.md)

---

[API](https://skmtc.dev/trydock/apis/dock-rest-api.md) - [All operations](https://skmtc.dev/trydock/apis/dock-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trydock/apis/dock-rest-api/revisions/dd96ae96a412?raw)
