Zimbra REST API Reference

Zimbra exposes its data via a REST API. This document is the reference for that functionality.

REST (REpresentational State Transfer) is an approach for building application services that make resources available via a URL. For example, the following REST command retrieves all inbox items as a simple RSS feed:


Learn more about REST at the Wikipedia article Representational State Transfer.


Command Format

The format of a Zimbra REST command is:


The following describes the components of the REST command:

Component Description
protocol The transport protocol, for example, http.
host The host name or IP address of the Zimbra Collaboration Suite server
port The port number, for example, 7070.
user The user. To load an explicit user account, specify the user in one of the following formats:
  • john.doe
  • john.doe@mydomain.com
  • http://localhost:7070/home/john.doe@mydomain.com/inbox.rss

You can also use "~" as a shortcut to the current user. For example:

object Designates the object to perform the command against. This might be a folder (such as inbox or drafts) or omitted (to download a specific item). If omitted, the query parameters will provide the information the command requires.

For example, to download the inbox folder as XML:


For example, to download an item:

params A list of command-specific URL parameters. See the specific command for a list of the required and optional parameters.

Response Formats

The following describes the various response formats. Not all command support all formats. See your specific command for a list of supported formats:

Format Description
xml Extensible Markup Language file format. See the Wikipedia article http://en.wikipedia.org/wiki/XML
json JavaScript Object Notation file format. See http://www.json.org
rss Really Simple Syndication web feed format. See http://en.wikipedia.org/wiki/RSS
html Hyper Text Markup Language file format. Produced the output as a web page.
zip Data compression and archive format.
tar Data compression and archive format ("tarball").
tgz Compressed tar file.
ics iCalendar file format. See the Wikipedia article http://en.wikipedia.org/wiki/ICalendar
csv Common Separated Values file format.
sync Requests that the server return additional meta-data in the response headers. When using this option, the headers are returned inline of the response, unless you specify nohdr=1.

For example, get a mail message by item id and return the meta-data in the response headers and inline.


For example, get a mail message by item id and return the meta-data in the response headers only.


X-Zimbra-ItemId: 288 X-Zimbra-FolderId: 2 X-Zimbra-Tags: X-Zimbra-Flags: u X-Zimbra-Received: 1109546683000 X-Zimbra-Modified: 1263601466000 X-Zimbra-Change: 33 X-Zimbra-Revision: 33 X-Zimbra-Conv: -288




The API supports the following methods to retrieve Zimbra data.

Mail Methods

Get Folder

Address Book Methods

Get Contacts

Calendar Methods

Get Calendar

Task Methods

Get Tasks

Item Methods

Get Item
Get Attachment

Verified Against: Zimbra Collaboration Suite 6.0 Date Created: 01/16/2010
Article ID: https://wiki.zimbra.com/index.php?title=Zimbra_REST_API_Reference Date Modified: 2010-01-17

Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search