4.5 CreateFolder Request and Response

The following example illustrates the command to create a new folder. For details about the associated XML schema definitions (XSD), see [MS-ASCMD].

Request:

 POST /Microsoft-Server-ActiveSync?Cmd=FolderCreate&User=fakename@Contoso.com&DeviceId=v140Device&DeviceType=SmartPhone HTTP/1.1
 Content-Type: application/vnd.ms-sync.wbxml
 MS-ASProtocolVersion: 14.0
 User-Agent: ASOM
 Host: Contoso.com
  
 <?xml version="1.0" encoding="utf-8"?>
 <FolderCreate xmlns="FolderHierarchy:">
   <SyncKey>3</SyncKey>
   <ParentId>5</ParentId>
   <DisplayName>CreateNewFolder</DisplayName>
   <Type>12</Type>
 </FolderCreate>

Response:

  
 HTTP/1.1 200 OK
 Content-Type: application/vnd.ms-sync.wbxml
  
 Date: Thu, 12 Mar 2009 20:s26:06 GMT
 Content-Length: 24
  
 <?xml version="1.0" encoding="utf-8"?>
 <FolderCreate 
 xmlns="FolderHierarchy:">
   <Status>1</Status>
   <SyncKey>4</SyncKey>
   <ServerId>23</ServerId>
 </FolderCreate>