Service: zimbraMail

Command: ContactAction
Namespace: urn:zimbraMail
Description: Contact Action
Properties:
Authorization token required true
Admin Authorization token required false

ContactActionRequest

    <ContactActionRequest> ## ContactActionRequest
        <action [id="{comma-sep-ids}"] op="{operation}" [tcon="{[-]constraint}"] [tag="{tag} (Integer)"] [l="{folder-id}"]
                   [rgb="{rgb-color}"] [color="{color} (Byte)"] [name="{name}"] [f="{flags}"] [t="{tags}"] [tn="{tag-names}"]
                   [nei="{non-existent-ids} (0|1)"] [nci="{newly-created-ids} (0|1)"]> ## ContactActionSelector
            (<a n="{attr-name}" [aid="{upload-id}"] [id="{item-id} (Integer)"] [part="{subpart-name}"]>{value}</a> ## NewContactAttr)*
        </action>
    </ContactActionRequest>

elements and attributes you can define within a <ContactActionRequest> element:

XPath Required / Optional Description
/action Required (only 1) Contact action selector
/action@id Optional (0 or 1) Type: String
Comma separated list of item IDs to act on. Required except for TagActionRequest, where the tags items can be specified using their tag names as an alternative.
/action@op Required (only 1) Type: String
Operation
For ItemAction - delete|dumpsterdelete|recover|read|flag|priority|tag|move|trash|rename|update|color|lock|unlock|resetimapuid|copy
For MsgAction - delete|read|flag|tag|move|update|spam|trash
For ConvAction - delete|read|flag|priority|tag|move|spam|trash
For FolderAction - read|delete|rename|move|trash|empty|color|[!]grant|revokeorphangrants|url|import|sync|fb|[!]check|update|[!]syncon|retentionpolicy|[!]disableactivesync|webofflinesyncdays
For TagAction - read|rename|color|delete|update|retentionpolicy
For ContactAction - move|delete|flag|trash|tag|update
For DistributionListAction -
    delete         delete the list
    rename         rename the list
    modify         modify the list
    addOwners      add list owner
    removeOwners   remove list owners
    setOwners      set list owners
    grantRights    grant rights
    revokeRights   revoke rights
    setRights      set rights
    addMembers     add list members
    removeMembers  remove list members
    resetimapuid   reset IMAP item UIDs
 
/action@tcon Optional (0 or 1) Type: String
List of characters; constrains the set of affected items in a conversation
t include items in the Trash
j include items in Spam/Junk
s include items in the user's Sent folder (not necessarily "Sent")
d include items in Drafts folder
o include items in any other folder
A leading '-' means to negate the constraint (e.g. "-t" means all messages not in Trash)
/action@tag Optional (0 or 1) Type: Integer
Deprecated - use "tn" instead
/action@l Optional (0 or 1) Type: String
Folder ID
/action@rgb Optional (0 or 1) Type: String
RGB color in format #rrggbb where r,g and b are hex digits
/action@color Optional (0 or 1) Type: Byte
color numeric; range 0-127; defaults to 0 if not present; client can display only 0-7
/action@name Optional (0 or 1) Type: String
Name
/action@f Optional (0 or 1) Type: String
Flags
/action@t Optional (0 or 1) Type: String
Tags - Comma separated list of integers. DEPRECATED - use "tn" instead
/action@tn Optional (0 or 1) Type: String
Comma-separated list of tag names
/action@nei Optional (0 or 1) Type: 0|1
Flag to signify that any non-existent ids should be returned
/action@nci Optional (0 or 1) Type: 0|1
Flag to signify that ids of new items should be returned
applies to COPY action
/action/a Optional (0 or more) Type: {value}
New Contact attributes
Description for element text content:Attribute data
Date related attributes like "birthday" and "anniversary" SHOULD use "yyyy-MM-dd" format or, if the year isn't specified "--MM-dd" format
/action/a@n Required (only 1) Type: String
Attribute name
/action/a@aid Optional (0 or 1) Type: String
Upload ID
/action/a@id Optional (0 or 1) Type: Integer
Item ID. Used in combination with subpart-name
/action/a@part Optional (0 or 1) Type: String
Subpart Name

ContactActionResponse

    <ContactActionResponse> ## ContactActionResponse
        <action [zid="{grantee-id}"] [d="{display-name}"] [key="{access-key}"] id="{success-ids}" op="{operation}"
                   [nei="{non-existent-ids}"] [nci="{newly-created-ids}"] /> ## FolderActionResult
    </ContactActionResponse>

elements and attributes you can define within a <ContactActionResponse> element:

XPath Required / Optional Description
/action Required (only 1) Action result
/action@zid Optional (0 or 1) Type: String
Grantee Zimbra ID
/action@d Optional (0 or 1) Type: String
Display name
/action@key Optional (0 or 1) Type: String
Access key (Password)
/action@id Required (only 1) Type: String
Comma-separated list of ids which have been successfully processed
/action@op Required (only 1) Type: String
Operation
/action@nei Optional (0 or 1) Type: String
Comma-separated list of non-existent ids (if requested)
/action@nci Optional (0 or 1) Type: String
Comma-separated list of newly created ids (if requested)