zimbra

zimbra user account creation using SOAP/REST


I want to create a Zimbra account when ever user signup in my application. is there any SOAP/REST calls for doing this job in Zimbra.

Please let me know if there are any other ways.


Solution

  • A SOAP account creation request should look like that :

    <CreateAccountRequest name="{account-name}" password="{account-password}"> ## CreateAccountRequest
        (<a n="{key}" /> ## Attr)*
    </CreateAccountRequest>
    

    name contains the full Zimbra account name : uid@domain.com.

    If you don't specifiy a password, the user won't be able to log in. (The password can be set later anyways).

    a tag allows you to send some optionals attributes.

    Example :

    <CreateAccountRequest xmlns="urn:zimbraAdmin">
        <name>username@domain.com</name>
        <password>foobar</password>
        <a n="givenName">John</a>
        <a n="sn">Doe</a>
        <a n="displayName">John Doe</a>
        <a n="zimbraCOSId">The CoS id comes here.</a>
    </CreateAccountRequest>
    

    Documentation : Zimbra SOAP requests