> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postsyncer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create folder

> Create a media library folder (optional parent, color)

## Create folder

Creates a folder in the given workspace. Use the returned **`id`** as **`folder_id`** on [`POST /media/upload/file`](/api-reference/media/upload-file) or [`POST /media/upload/url`](/api-reference/media/upload-url).

### Body

<ParamField body="workspace_id" type="integer" required>
  Workspace that will own the folder
</ParamField>

<ParamField body="name" type="string" required>
  Display name
</ParamField>

<ParamField body="color" type="string">
  Hex color (e.g. `#4F46E5`). Defaults to `#4F46E5` if omitted.
</ParamField>

<ParamField body="parent_id" type="integer">
  Optional parent folder id (must be in the same workspace)
</ParamField>

Requires the **`posts`** ability.

### See also

<Card title="List folders" icon="list" href="/api-reference/folders/list" />
