Posted by Sushmit Goswami, Product Manager, Google Apps for Work, and Wesley Chun, Developer Advocate, Google Apps
To provide developers and administrators with more fine-grained control, the Google Apps Admin SDK now includes new ___domain management features. These new APIs let you programmatically manage domains for your Google Apps account, similar to other RESTful resources like Users, Groups, etc., providing a superset of the ___domain management capabilities available on the Domains page in the Admin console today.
Change your primary ___domain
The Customers API gives enterprise developers and administrators the ability to swap the current primary ___domain with a selected secondary ___domain for a Google Apps installation. The “change primary” operation is essentially transparent to the user, but users moved to the secondary ___domain will be subject to certain restrictions (refer to this Help Center article for details). Customers who want to rebrand their business with a new primary ___domain can follow this up by renaming users from the old (now secondary) to the new (now primary) ___domain using the Users API.
Add and remove domains and aliases
The Domains API lets developers create tools for administrators to add and remove domains, similar to the functionality available on the Domains page in the Admin console. In addition, the API lets you programmatically add aliases for any ___domain, primary or secondary, but aliases for secondary domains can only be added via the API.