---
title: "POST /b/{bucket}/folders"
method: POST
path: "/b/{bucket}/folders"
tags: ["folders"]
---

# POST /b/{bucket}/folders

`POST /b/{bucket}/folders`

Creates a new folder. Only applicable to buckets with hierarchical namespace enabled.

## Path parameters

- `bucket` string, required

## Query parameters

- `recursive` boolean

## Request body

- Folder — A folder. Only available in buckets with hierarchical namespace enabled.
  - `bucket` string — The name of the bucket containing this folder.
  - `id` string — The ID of the folder, including the bucket name, folder name.
  - `kind` string — The kind of item this is. For folders, this is always storage#folder.
  - `metageneration` string, int64 — The version of the metadata for this folder. Used for preconditions and for detecting changes in metadata.
  - `name` string — The name of the folder. Required if not specified by URL parameter.
  - `selfLink` string — The link to this folder.
  - `createTime` string, date-time — The creation time of the folder in RFC 3339 format.
  - `updateTime` string, date-time — The modification time of the folder metadata in RFC 3339 format.
  - `pendingRenameInfo` object — Only present if the folder is part of an ongoing rename folder operation. Contains information which can be used to query the operation status.
    - `operationId` string — The ID of the rename folder operation.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/storage.md) · [All operations](https://skmtc.dev/google/apis/storage/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/storage/revisions/4623cd2c71cf/schema)
