---
title: "Create a folder"
method: POST
path: "/folders"
tags: ["Folders"]
---

# Create a folder

`POST /folders`

## Request

- Base URL: `https://api5.optimove.net/content/v1`
- URL: `https://api5.optimove.net/content/v1/folders`
- Auth: API key in header `X-API-KEY`

Creates a folder at the root, or inside another folder when `parentId` is set.

## Request body

- FolderRequest
  - `name` string, required: Folder name. Must be unique (case-sensitive) among the folders with the same parent.
  - `parentId` string, uuid, nullable: Id of the parent folder. Leave out or set to `null` for a root folder.

## Response `201`

The folder was created.

- FolderResponse
  - `id` string, uuid, required
  - `name` string, required
  - `parentId` string, uuid, nullable: Id of the parent folder, or `null` for a root folder.
  - `createdAt` string, date-time, required
  - `createdBy` string, required
  - `updatedAt` string, date-time, required
  - `updatedBy` string, required

## Other responses

- `400`: The request is malformed or fails validation.
- `401`: The `X-API-KEY` header is missing or the API key is not valid.
- `403`: The API key doesn't have the admin role, or the tenant isn't allowed to change this item.
- `404`: The parent folder doesn't exist.
- `409`: Another folder with the same parent already has this name.
- `429`: The tenant's rate limit is reached. Retry after the time in `x-ratelimit-reset`.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/optimove/apis/content-api.md) - [All operations](https://skmtc.dev/optimove/apis/content-api/llms.txt) - [OpenAPI document](https://skmtc.dev/optimove/apis/content-api/revisions/2f4f55f36f0e?raw)
