Contacts
Sync a Google account's contacts into your Zernio contacts, merged by email address with the people you already know from other channels.
A Google account connected with scopes=contacts copies its Google Contacts into the profile's contacts. You read them through /v1/contacts, like contacts from any other channel, and list the address book's groups with GET /v1/contacts/groups.
Read the synced contacts
List the contacts that came from Google with the platform filter:
curl "https://zernio.com/api/v1/contacts?profileId=PROFILE_ID&platform=google" \
-H "Authorization: Bearer $ZERNIO_API_KEY"Each synced person gets one email channel per address on the Google account, shown as Name (email). Read a contact's channels with GET /v1/contacts/{contactId}/channels.
Phone numbers are kept on those channels, in metadata.phones (E.164). They are used to find people you already know from WhatsApp, SMS or iMessage.
Filter by group
List the groups of the address book:
curl "https://zernio.com/api/v1/contacts/groups?accountId=ACCOUNT_ID" \
-H "Authorization: Bearer $ZERNIO_API_KEY"The list holds Google contact labels, such as Clients, and the system groups the Contacts app shows (My Contacts, Starred, Family, Friends, Coworkers). Group ids look like contactGroups/5a7c1d2e0b8f3a91. Each group carries Google's memberCount.
Each synced channel carries the ids of its groups in metadata.groups. List the contacts in one group with the group filter, which needs accountId:
curl "https://zernio.com/api/v1/contacts?accountId=ACCOUNT_ID&group=contactGroups/5a7c1d2e0b8f3a91" \
-H "Authorization: Bearer $ZERNIO_API_KEY"Groups are read-only: Zernio never changes them in Google. Memberships are not stored while content retention is off.
Search people
GET /v1/contacts/autocomplete finds people for an address field, read live from Google:
curl "https://zernio.com/api/v1/contacts/autocomplete?accountId=ACCOUNT_ID&q=ada&limit=10" \
-H "Authorization: Bearer $ZERNIO_API_KEY"With the contacts area it searches the user's Google Contacts. Each result has name, email, emails, phones, company, jobTitle, photoUrl and source. meta.sources lists which sources were searched.
When the sync runs
- Right after the account is connected with the
contactsarea, in the background. - Every 15 minutes after that, picking up only what changed since the last run.
There is no endpoint to start a sync on demand.
How contacts are matched
The sync never creates the same person twice:
- A Google contact already synced is updated in place.
- A Google contact whose address changed keeps its channel, moved to the new address.
- A person already in your contacts with one of its email addresses gets the Google email channels instead of a second contact.
- Otherwise, a person whose WhatsApp, SMS or iMessage channel has one of its phone numbers gets them.
- Anyone else becomes a new contact.
A phone number shared by two different contacts, such as a family line, matches neither. The sync never merges two existing contacts.
Phone numbers are matched only when written in international form, such as +34 612 345 678. A number saved without its country code is kept out of matching, since its country is unknown.
A contact the sync created follows the address book when the person changes there. A contact it attached to keeps its own name, company and email, and the sync only fills them when empty.
A full resync, such as after an expired sync token, only fills empty fields and never overwrites a contact.
How it behaves
- The sync reads the user's Google Contacts (People API connections). Contacts without an email address are skipped.
- It writes the name, company, photo and email, and keeps every address and phone number. Tags, custom fields and other channels are never touched.
- It is read-only: nothing is written back to Google.
- When a contact is deleted in Google, its Google channel is removed and
contact.deletedfires. The contact stays, with its other channels and history. contact.updatedfires when the sync adds or changes a contact, and never for a run that changed nothing.
If it fails
| Error | Cause | Fix |
|---|---|---|
| No contacts from Google | The account was connected without contacts | Connect again with contacts in scopes. |
| A person is missing | They have no email address in Google Contacts | Add an email address in Google Contacts. The next sync, within 15 minutes, picks it up. |