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

# Changing the properties of a file or directory (PROPPATCH)

Use the [PROPPATCH](http://www.webdav.org/specs/rfc4918.html#METHOD_PROPPATCH) method to change the properties of a file or directory on Yandex Disk. Applications can create their own custom properties for files and directories, for storing metainformation. Values of created properties can be requested using the PROPFIND method (see [Properties of a file or directory](https://yandex.com/dev/disk/doc/en/reference/propfind-resource-properties.md)).

The XML elements that are used in requests and responses are documented in the [protocol specification](http://www.webdav.org/specs/rfc4918.html#xml.element.definitions).

> For the ##/a/## directory, the `myprop` property is created with the `myvalue` value.
>
> ```yaml
> PROPPATCH /a/ HTTP/1.1
> Host: webdav.yandex.ru
> Accept: */*
> Authorization: OAuth 0c4181a7c2cf4521964a72ff57a34a07
> Content-Length: 159
> Content-Type: application/x-www-form-urlencoded
> 
> <?xml version="1.0" encoding="utf-8" ?>
> <propertyupdate xmlns="DAV:" xmlns:u="mynamespace">
>   <set><prop>
>     <u:myprop>myvalue</u:myprop>
>   </prop></set>
> </propertyupdate>
> 
> 
> ```
>
> Request response:
>
> ```yaml
> HTTP/1.1 207 Multi-Status
> Content-Type: application/xml; charset="utf-8"
> Content-Length: 235
>  
> <?xml version="1.0" encoding="utf-8"?>
> <d:multistatus xmlns:d="DAV:">
>   <d:response>
>     <d:href>/</d:href>
>     <d:propstat>
>       <d:status>HTTP/1.1 200 OK</d:status>
>       <d:prop>
>         <myprop xmlns="mynamespace"/>
>       </d:prop>
>     </d:propstat>
>   </d:response>
> </d:multistatus>
> ```
