---
metadata:
  - name: generator
    content: Diplodoc Platform v5.44.0
alternate:
  - https://yandex.ru/dev/disk-api/doc/en/reference/create-folder.md
  - https://yandex.ru/dev/disk-api/doc/ru/reference/create-folder.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/disk-api/doc/en/llms.txt

# Creating a folder

To create a folder on Yandex Disk, specify the path to the new folder.


## Request format {#format}

Use the PUT method to send the request for creating a folder.
```
https://cloud-api.yandex.net/v1/disk/resources
 ? [path](*popup-path)=<path to the new folder>
 & [[fields](*popup-fields)=<properties to include in the response>]
```

path[*](*popup-a)
: The path to the folder being created. For example, to create a `Music` folder in the Yandex Disk root directory, set the parameter value to`%2FMusic`. The maximum folder name length is 255 characters. The maximum path length is 32760 characters. <br>
  
  <!-- source: en/_includes/reference/parameters-warehouse/id-format/path-encoding.md -->
  The path in the parameter value should be encoded in URL format.
  <!-- endsource: en/_includes/reference/parameters-warehouse/id-format/path-encoding.md -->


fields
: List of JSON properties to include in the response. Keys not specified in this list are omitted when generating a response. If the parameter isn't specified, the response is returned in full without omitting anything. <br>
Key names should be separated by commas, and embedded keys should be separated by dots. For example: `name,_embedded.items.path`.


\* Required parameter.

## Response format {#response}

If the request is processed without errors, the API returns the `201 Created` (folder successfully created). The response body contains a link to meta information about the created resource in the [Link](https://yandex.ru/dev/disk-api/doc/en/reference/response-objects.md#link) object.

<!-- source: en/_includes/reference/response-error.md -->
If the request caused an error, the relevant response code is returned, and the response body contains an [error description](https://yandex.ru/dev/disk-api/doc/en/reference/response-objects.md#error).
<!-- endsource: en/_includes/reference/response-error.md -->

Sample response:

```json
{
  "href": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FMusic",
  "method": "GET",
  "templated": false
}
```

<!-- source: en/_includes/reference/response-objects/id-link/link-table.md -->


#|
|| **Element** | **Description**||
|| `href` | URL. It may be a URL template. See the `templated` key. ||
|| `method` | The HTTP method for requesting the URL from the `href` key. ||
|| `templated` | Indicates a URL template according to [RFC 6570](http://tools.ietf.org/html/rfc6570). Possible values:

- "true" — URL template. To send a request to this address, replace the placeholder values in the curly brackets with the parameter values.
- "false" — The URL can be requested without changes.||
   |#
<!-- endsource: en/_includes/reference/response-objects/id-link/link-table.md -->

[*popup-path]: The path to the folder being created. For example, to create a `Music` folder in the Yandex Disk root directory, set the parameter value to`%2FMusic`. The maximum folder name length is 255 characters. The maximum path length is 32760 characters. <br>
  
  
The path in the parameter value should be encoded in URL format.

[*popup-fields]: List of JSON properties to include in the response. Keys not specified in this list are omitted when generating a response. If the parameter isn't specified, the response is returned in full without omitting anything. <br>
Key names should be separated by commas, and embedded keys should be separated by dots. For example: `name,_embedded.items.path`.

[*popup-a]: Required parameter.