Stay organized with collections
Save and categorize content based on your preferences.
After
setting up authentication,
you can use the Domain Shared Contacts API to publish new shared contact entries to a
Google Workspace domain. Shared contacts can take up to 24 hours to
appear in the email address autocomplete and the contact manager.
Create an XML representation of the shared contact that you want to
publish in the form of an Atom <entry> element of the
Contact kind,
which might look similar to the following:
FIRST_NAME: First name of the shared contact—for
example, Alex.
LAST_NAME: The last name of the shared
contact—for example, Kim.
PRIMARY_EMAIL_ADDRESS: The preferred email
address of the shared contact—for example, alk@gmail.com.
PREFERRED_NAME: The name that is displayed for
the user—for example, Alex Kim
SECONDARY_EMAIL_ADDRESS: Another email address
for the shared contact—for example, alk@example.org.
PRIMARY_PHONE_NUMBER: The preferred phone number
for the shared contact—for example, (800) 555-0100.
SECONDARY_PHONE_NUMBER: Another phone number for
the shared contact—for example, (800) 555-0101.
INSTANT_MESSAGING_ADDRESS: The email address
associated with the shared contact's instant messaging information—for
example, alk@gmail.com.
CITY_NAME: The city name for the shared
contact—for example, Mountain View.
ADDRESS: The street address for the shared
contact—for example, 1600 Amphibious Blvd.
REGION_NAME: The state or province for the
shared contact—for example, CA.
POST_CODE: The ZIP or postal code for the shared
contact—for example, 94045.
COUNTRY_NAME: The country for the shared
contact—for example, United States.
FORMATTED_ADDRESS: The address of the shared
contact that is formatted using the convention of their country or
region—for example,1800 Amphibious Blvd Mountain View.
To publish this entry, send it to the contact-list feed URL:
Place your Atom <entry> element in the body of a new POST
request by using the application/atom+xml content type.
Send the POST request to the feed URL.
For example, to add a domain shared contact to the list belonging to
example.com, send the POST request with the new entry to the following
URL:
The Google server creates a contact by using the entry that you sent, then
returns an HTTP 201 CREATED status code, along with a copy of the new
contact in the form of an <entry> element. The entry returned is the same
one that you sent, but it also contains various elements added by the
server, such as an <id> element.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Create shared contacts\n\nAfter\n[setting up authentication](https://developers.google.com/workspace/guides/auth-overview),\nyou can use the Domain Shared Contacts API to publish new shared contact entries to a\nGoogle Workspace domain. Shared contacts can take up to 24 hours to\nappear in the email address autocomplete and the contact manager.\n\n1. Create an XML representation of the shared contact that you want to\n publish in the form of an Atom `\u003centry\u003e` element of the\n [Contact kind](https://developers.google.com/gdata/docs/2.0/elements#gdContactKind),\n which might look similar to the following:\n\n ```xml\n \u003catom:entry xmlns:atom='http://www.w3.org/2005/Atom'\n xmlns:gd='http://schemas.google.com/g/2005'\u003e\n \u003catom:category scheme='http://schemas.google.com/g/2005#kind'\n term='http://schemas.google.com/contact/2008#contact' /\u003e\n \u003cgd:name\u003e\n \u003cgd:givenName\u003eFIRST_NAME\u003c/gd:givenName\u003e\n \u003cgd:familyName\u003eLAST_NAME\u003c/gd:familyName\u003e\n \u003cgd:fullName\u003eFIRST_NAME LAST_NAME\u003c/gd:fullName\u003e\n \u003c/gd:name\u003e\n \u003catom:content type='text'\u003eNOTES\u003c/atom:content\u003e\n \u003cgd:email rel='http://schemas.google.com/g/2005#work'\n primary='true'\n address='PRIMARY_EMAIL_ADDRESS' displayName='PREFERRED_NAME' /\u003e\n \u003cgd:email rel='http://schemas.google.com/g/2005#home'\n address='SECONDARY_EMAIL_ADDRESS' /\u003e\n \u003cgd:phoneNumber rel='http://schemas.google.com/g/2005#work'\n primary='true'\u003e\n PRIMARY_PHONE_NUMBER\n \u003c/gd:phoneNumber\u003e\n \u003cgd:phoneNumber rel='http://schemas.google.com/g/2005#home'\u003e\n SECONDARY_PHONE_NUMBER\n \u003c/gd:phoneNumber\u003e\n \u003cgd:im address='INSTANT_MESSAGING_ADDRESS'\n protocol='http://schemas.google.com/g/2005#GOOGLE_TALK'\n primary='true'\n rel='http://schemas.google.com/g/2005#home' /\u003e\n \u003cgd:structuredPostalAddress\n rel='http://schemas.google.com/g/2005#work'\n primary='true'\u003e\n \u003cgd:city\u003eCITY_NAME\u003c/gd:city\u003e\n \u003cgd:street\u003eADDRESS\u003c/gd:street\u003e\n \u003cgd:region\u003eREGION_NAME\u003c/gd:region\u003e\n \u003cgd:postcode\u003ePOST_CODE\u003c/gd:postcode\u003e\n \u003cgd:country\u003eCOUNTRY_NAME\u003c/gd:country\u003e\n \u003cgd:formattedAddress\u003e\n FORMATTED_ADDRESS\n \u003c/gd:formattedAddress\u003e\n \u003c/gd:structuredPostalAddress\u003e\n \u003c/atom:entry\u003e\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eFIRST_NAME\u003c/var\u003e: First name of the shared contact---for example, Alex.\n - \u003cvar translate=\"no\"\u003eLAST_NAME\u003c/var\u003e: The last name of the shared contact---for example, Kim.\n - \u003cvar translate=\"no\"\u003ePRIMARY_EMAIL_ADDRESS\u003c/var\u003e: The preferred email address of the shared contact---for example, alk@gmail.com.\n - \u003cvar translate=\"no\"\u003ePREFERRED_NAME\u003c/var\u003e: The name that is displayed for the user---for example, Alex Kim\n - \u003cvar translate=\"no\"\u003eSECONDARY_EMAIL_ADDRESS\u003c/var\u003e: Another email address for the shared contact---for example, alk@example.org.\n - \u003cvar translate=\"no\"\u003ePRIMARY_PHONE_NUMBER\u003c/var\u003e: The preferred phone number for the shared contact---for example, (800) 555-0100.\n - \u003cvar translate=\"no\"\u003eSECONDARY_PHONE_NUMBER\u003c/var\u003e: Another phone number for the shared contact---for example, (800) 555-0101.\n - \u003cvar translate=\"no\"\u003eINSTANT_MESSAGING_ADDRESS\u003c/var\u003e: The email address associated with the shared contact's instant messaging information---for example, alk@gmail.com.\n - \u003cvar translate=\"no\"\u003eCITY_NAME\u003c/var\u003e: The city name for the shared contact---for example, Mountain View.\n - \u003cvar translate=\"no\"\u003eADDRESS\u003c/var\u003e: The street address for the shared contact---for example, 1600 Amphibious Blvd.\n - \u003cvar translate=\"no\"\u003eREGION_NAME\u003c/var\u003e: The state or province for the shared contact---for example, CA.\n - \u003cvar translate=\"no\"\u003ePOST_CODE\u003c/var\u003e: The ZIP or postal code for the shared contact---for example, 94045.\n - \u003cvar translate=\"no\"\u003eCOUNTRY_NAME\u003c/var\u003e: The country for the shared contact---for example, United States.\n - \u003cvar translate=\"no\"\u003eFORMATTED_ADDRESS\u003c/var\u003e: The address of the shared contact that is formatted using the convention of their country or region---for example,1800 Amphibious Blvd Mountain View.\n2. To publish this entry, send it to the contact-list feed URL:\n\n 1. Place your Atom `\u003centry\u003e` element in the body of a new `POST` request by using the `application/atom+xml` content type.\n 2. Send the `POST` request to the feed URL.\n\n For example, to add a domain shared contact to the list belonging to\n example.com, send the `POST` request with the new entry to the following\n URL: \n\n https://www.google.com/m8/feeds/contacts/example.com/full\n\n The Google server creates a contact by using the entry that you sent, then\n returns an `HTTP 201 CREATED` status code, along with a copy of the new\n contact in the form of an `\u003centry\u003e` element. The entry returned is the same\n one that you sent, but it also contains various elements added by the\n server, such as an `\u003cid\u003e` element.\n\n If your request fails, Google might return a different\n status code. For information about the status codes, see the\n [Google Data API protocol reference document](https://developers.google.com/gdata/docs/2.0/reference).\n\nNext steps\n----------\n\n- [Update or delete a photo for a shared contact](/workspace/admin/domain-shared-contacts/update-delete-photo-shared-contacts)"]]