MKCOL Method
This documentation is archived and is not being maintained.

MKCOL Method

EWS Managed API

Topic Last Modified: 2006-06-13

The WebDAV MKCOL method creates a new collection at the location specified by the Request-Uniform Resource Identifier (URI). When invoked without a request body, the collection will be created without member resources. When used with a request body, you can create members and properties on the collections or members.

The MKCOL method may be included in the scope of a transaction by submitting a Transaction Header with a lock token that corresponds to that transaction.

See Authentication and Security Using WebDAV for more information.

The list of WebDAV Protocol Status Codes in the following table is not comprehensive. For information about 500-level status codes, see WebDAV Status Codes: 500s.

Status Code Meaning

201 (Created)

The collection was created.

401 (Access Denied)

Resource requires authorization or authorization was denied.

403 (Forbidden)

The server does not allow collections to be created at the specified location, or the parent collection of the specified request URI exists but cannot accept members.

405 (Method Not Allowed)

The MKCOL method can only be performed on a deleted or non-existent resource.

409 (Conflict)

A resource cannot be created at the destination URI until one or more intermediate collections are created.

415 (Unsupported Media Type)

The request type of the body is not supported by the server.

507 (Insufficient Storage)

The destination resource does not have sufficient storage space.

The following example uses the WebDAV MKCOL method to create a collection called pub2/folder1/folder2 on the server

MKCOL /pub2/folder1/folder2/ HTTP/1.1
Content-Type: text/xml
Content-Length: XXX

HTTP/1.1 201 Created
© 2016 Microsoft