Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All Add (Sync)

The Add element is an optional child element of the Commands element in Sync command requests and an optional child element of the Commands element and the Responses element in Sync command responses. It creates a new object in a collection on the client or on the server.

Elements referenced in this section are defined in the AirSync namespace, except where otherwise indicated by the presence of a namespace prefix (as defined in section 2.2.1).

Command request/response

Parent elements

Child elements

Data type

Number allowed

Sync command request (section

Commands (section

ClientId (section

ApplicationData (section

Class (section

email2:Send ([MS-ASEMAIL] section

container ([MS-ASDTYPE] section 2.2)

0...N (optional)

Sync command response


ServerId (section

ApplicationData (section


0...N (optional)

Sync command response

Responses (section





Status (section


0...N (optional)

When a new item is being sent from the client to the server, the ClientId element specifies a temporary ID for the item, which is unique on the client. The ApplicationData element specifies the item data. The server then responds with an Add element in a Responses element, which specifies the client ID and the server ID that was assigned to the new item.

When the client sends a Sync command request to the server and a new item has been added to the server collection since the last synchronization, the server responds with an Add element in a Commands element. This Add element specifies the server ID and data of the item to be added to the collection on the client.

One or more Add elements can appear as a child of the Commands and Responses elements for a particular collection.

The Add element cannot be used to add any non-draft email items from the client to the server, or to modify the contents of the recipient information cache. Draft email items are not supported in protocol versions 2.5, 12.0, 12.1, 14.0, and 14.1. If a client attempts to add a non-draft email to the server, a Status element with a value of 6 is returned as a child of the Add element. If a client attempts to add an item to the recipient information cache, a Status element with a value of 4 is returned as a child of the Sync element.

If the server ID in an Add element from the server matches the server ID for an item on the client, the client treats the addition as a change to the client item.

The server is not required to send an individual response for every operation that is sent by the client. The client only receives responses for successful additions, successful fetches, successful changes that include an attachment being added, and failed changes and deletions. When the client does not receive a response, the client MUST assume that the operation succeeded unless informed otherwise.

Protocol Versions

The following table specifies the protocol versions that support this element. The client indicates the protocol version being used by setting either the MS-ASProtocolVersion header, as specified in [MS-ASHTTP] section, or the Protocol version field, as specified in [MS-ASHTTP] section, in the request.

Protocol version

Element support













When protocol version 16.0 is used and the Add element is a child of the Responses element, the ApplicationData element is supported as a child of the Add element.

© 2015 Microsoft