Creating a directory (MKCOL)

Use the MKCOL method to create a new directory on Yandex Disk.

According to the protocol, only one directory can be created as the result of a single request. If the application sends a request to create the /a/b/c/ directory, but the /a/ directory does not contain a /b/ directory, the service will not create the /b/ directory, and will respond with the code 409 Conflict.

The application creates the /b/ directory inside the /a/ directory, which is located in the Yandex Disk root directory.

MKCOL /a/b/ HTTP/1.1
Host: webdav.yandex.ru
Accept: */*
Authorization: OAuth 0c4181a7c2cf4521964a72ff57a34a07

If the /a/ directory exists and the /b/ directory was created successfully, the following response is returned:

HTTP/1.1 201 Created
Content-Length: 0