> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Contacts API reference

> API reference for Google Contacts: every `googlecontacts.api.*` operation with input and output types.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Contact Groups

### create

`contactGroups.create`

Create a contact group

**Risk:** `write`

```ts theme={null}
await corsair.googlecontacts.api.contactGroups.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |
| `etag` | `string` | No | — |
| `metadata` | `object` | No | — |
| `groupType` | `string` | No | — |
| `name` | `string` | No | — |
| `formattedName` | `string` | No | — |
| `memberResourceNames` | `string[]` | No | — |
| `memberCount` | `number` | No | — |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   updateTime?: string,
>   deleted?: boolean
> }
> ```

***

### delete

`contactGroups.delete`

Delete a contact group, optionally with its contacts \[DESTRUCTIVE · IRREVERSIBLE]

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecontacts.api.contactGroups.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |
| `deleteContacts` | `boolean` | No | Also delete the contacts in the group, not just the group |

**Output:** `void`

***

### get

`contactGroups.get`

Get a single contact group

**Risk:** `read`

```ts theme={null}
await corsair.googlecontacts.api.contactGroups.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | e.g. "contactGroups/myContacts" |
| `maxMembers` | `number` | No | — |
| `groupFields` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |
| `etag` | `string` | No | — |
| `metadata` | `object` | No | — |
| `groupType` | `string` | No | — |
| `name` | `string` | No | — |
| `formattedName` | `string` | No | — |
| `memberResourceNames` | `string[]` | No | — |
| `memberCount` | `number` | No | — |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   updateTime?: string,
>   deleted?: boolean
> }
> ```

***

### list

`contactGroups.list`

List contact groups

**Risk:** `read`

```ts theme={null}
await corsair.googlecontacts.api.contactGroups.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | — |
| `pageToken` | `string` | No | — |
| `syncToken` | `string` | No | — |
| `groupFields` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contactGroups` | `object[]` | No | — |
| `nextPageToken` | `string` | No | — |
| `nextSyncToken` | `string` | No | — |
| `totalItems` | `number` | No | — |

> [accordion] contactGroups full type
>
> ```ts theme={null}
> {
>   resourceName: string,
>   etag?: string,
>   metadata?: {
>     updateTime?: string,
>     deleted?: boolean
>   },
>   groupType?: string,
>   name?: string,
>   formattedName?: string,
>   memberResourceNames?: string[],
>   memberCount?: number
> }[]
> ```

***

### modifyMembers

`contactGroups.modifyMembers`

Add or remove contacts from a group

**Risk:** `write`

```ts theme={null}
await corsair.googlecontacts.api.contactGroups.modifyMembers({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |
| `resourceNamesToAdd` | `string[]` | No | — |
| `resourceNamesToRemove` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `notFoundResourceNames` | `string[]` | No | — |
| `canNotRemoveLastContactGroupResourceNames` | `string[]` | No | — |

***

### update

`contactGroups.update`

Rename a contact group

**Risk:** `write`

```ts theme={null}
await corsair.googlecontacts.api.contactGroups.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |
| `etag` | `string` | Yes | — |
| `name` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |
| `etag` | `string` | No | — |
| `metadata` | `object` | No | — |
| `groupType` | `string` | No | — |
| `name` | `string` | No | — |
| `formattedName` | `string` | No | — |
| `memberResourceNames` | `string[]` | No | — |
| `memberCount` | `number` | No | — |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   updateTime?: string,
>   deleted?: boolean
> }
> ```

***

## Contacts

### create

`contacts.create`

Create a new contact

**Risk:** `write`

```ts theme={null}
await corsair.googlecontacts.api.contacts.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `person` | `object` | Yes | — |
| `personFields` | `string[]` | No | Person fields to return, e.g. \["names","emailAddresses","phoneNumbers"]. Defaults to names, emailAddresses and phoneNumbers. |

> [accordion] person full type
>
> ```ts theme={null}
> {
>   names?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     displayName?: string,
>     familyName?: string,
>     givenName?: string,
>     middleName?: string,
>     honorificPrefix?: string,
>     honorificSuffix?: string
>   }[],
>   emailAddresses?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     value?: string,
>     type?: string,
>     displayName?: string
>   }[],
>   phoneNumbers?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     value?: string,
>     canonicalForm?: string,
>     type?: string
>   }[],
>   organizations?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     name?: string,
>     title?: string,
>     department?: string
>   }[],
>   addresses?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     formattedValue?: string,
>     streetAddress?: string,
>     city?: string,
>     region?: string,
>     postalCode?: string,
>     country?: string,
>     countryCode?: string,
>     type?: string
>   }[],
>   biographies?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     value?: string,
>     contentType?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |
| `etag` | `string` | No | — |
| `metadata` | `object` | No | — |
| `names` | `object[]` | No | — |
| `emailAddresses` | `object[]` | No | — |
| `phoneNumbers` | `object[]` | No | — |
| `organizations` | `object[]` | No | — |
| `addresses` | `object[]` | No | — |
| `photos` | `object[]` | No | — |
| `biographies` | `object[]` | No | — |
| `memberships` | `object[]` | No | — |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   sources?: {
>     type?: string,
>     id?: string,
>     etag?: string
>   }[],
>   deleted?: boolean,
>   objectType?: string
> }
> ```

> [accordion] names full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   displayName?: string,
>   familyName?: string,
>   givenName?: string,
>   middleName?: string,
>   honorificPrefix?: string,
>   honorificSuffix?: string
> }[]
> ```

> [accordion] emailAddresses full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   type?: string,
>   displayName?: string
> }[]
> ```

> [accordion] phoneNumbers full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   canonicalForm?: string,
>   type?: string
> }[]
> ```

> [accordion] organizations full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   name?: string,
>   title?: string,
>   department?: string
> }[]
> ```

> [accordion] addresses full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   formattedValue?: string,
>   streetAddress?: string,
>   city?: string,
>   region?: string,
>   postalCode?: string,
>   country?: string,
>   countryCode?: string,
>   type?: string
> }[]
> ```

> [accordion] photos full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   url?: string,
>   default?: boolean
> }[]
> ```

> [accordion] biographies full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   contentType?: string
> }[]
> ```

> [accordion] memberships full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   contactGroupMembership?: {
>     contactGroupId?: string,
>     contactGroupResourceName?: string
>   }
> }[]
> ```

***

### delete

`contacts.delete`

Permanently delete a contact \[DESTRUCTIVE · IRREVERSIBLE]

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.googlecontacts.api.contacts.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |

**Output:** `void`

***

### deletePhoto

`contacts.deletePhoto`

Remove a contact's photo \[DESTRUCTIVE]

**Risk:** `destructive`

```ts theme={null}
await corsair.googlecontacts.api.contacts.deletePhoto({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |
| `personFields` | `string[]` | No | Person fields to return, e.g. \["names","emailAddresses","phoneNumbers"]. Defaults to names, emailAddresses and phoneNumbers. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |
| `etag` | `string` | No | — |
| `metadata` | `object` | No | — |
| `names` | `object[]` | No | — |
| `emailAddresses` | `object[]` | No | — |
| `phoneNumbers` | `object[]` | No | — |
| `organizations` | `object[]` | No | — |
| `addresses` | `object[]` | No | — |
| `photos` | `object[]` | No | — |
| `biographies` | `object[]` | No | — |
| `memberships` | `object[]` | No | — |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   sources?: {
>     type?: string,
>     id?: string,
>     etag?: string
>   }[],
>   deleted?: boolean,
>   objectType?: string
> }
> ```

> [accordion] names full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   displayName?: string,
>   familyName?: string,
>   givenName?: string,
>   middleName?: string,
>   honorificPrefix?: string,
>   honorificSuffix?: string
> }[]
> ```

> [accordion] emailAddresses full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   type?: string,
>   displayName?: string
> }[]
> ```

> [accordion] phoneNumbers full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   canonicalForm?: string,
>   type?: string
> }[]
> ```

> [accordion] organizations full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   name?: string,
>   title?: string,
>   department?: string
> }[]
> ```

> [accordion] addresses full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   formattedValue?: string,
>   streetAddress?: string,
>   city?: string,
>   region?: string,
>   postalCode?: string,
>   country?: string,
>   countryCode?: string,
>   type?: string
> }[]
> ```

> [accordion] photos full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   url?: string,
>   default?: boolean
> }[]
> ```

> [accordion] biographies full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   contentType?: string
> }[]
> ```

> [accordion] memberships full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   contactGroupMembership?: {
>     contactGroupId?: string,
>     contactGroupResourceName?: string
>   }
> }[]
> ```

***

### get

`contacts.get`

Get a single contact

**Risk:** `read`

```ts theme={null}
await corsair.googlecontacts.api.contacts.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | e.g. "people/c123456789" or "people/me" for the signed-in user |
| `personFields` | `string[]` | No | Person fields to return, e.g. \["names","emailAddresses","phoneNumbers"]. Defaults to names, emailAddresses and phoneNumbers. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |
| `etag` | `string` | No | — |
| `metadata` | `object` | No | — |
| `names` | `object[]` | No | — |
| `emailAddresses` | `object[]` | No | — |
| `phoneNumbers` | `object[]` | No | — |
| `organizations` | `object[]` | No | — |
| `addresses` | `object[]` | No | — |
| `photos` | `object[]` | No | — |
| `biographies` | `object[]` | No | — |
| `memberships` | `object[]` | No | — |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   sources?: {
>     type?: string,
>     id?: string,
>     etag?: string
>   }[],
>   deleted?: boolean,
>   objectType?: string
> }
> ```

> [accordion] names full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   displayName?: string,
>   familyName?: string,
>   givenName?: string,
>   middleName?: string,
>   honorificPrefix?: string,
>   honorificSuffix?: string
> }[]
> ```

> [accordion] emailAddresses full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   type?: string,
>   displayName?: string
> }[]
> ```

> [accordion] phoneNumbers full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   canonicalForm?: string,
>   type?: string
> }[]
> ```

> [accordion] organizations full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   name?: string,
>   title?: string,
>   department?: string
> }[]
> ```

> [accordion] addresses full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   formattedValue?: string,
>   streetAddress?: string,
>   city?: string,
>   region?: string,
>   postalCode?: string,
>   country?: string,
>   countryCode?: string,
>   type?: string
> }[]
> ```

> [accordion] photos full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   url?: string,
>   default?: boolean
> }[]
> ```

> [accordion] biographies full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   contentType?: string
> }[]
> ```

> [accordion] memberships full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   contactGroupMembership?: {
>     contactGroupId?: string,
>     contactGroupResourceName?: string
>   }
> }[]
> ```

***

### list

`contacts.list`

List the user's contacts

**Risk:** `read`

```ts theme={null}
await corsair.googlecontacts.api.contacts.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `personFields` | `string[]` | No | Person fields to return, e.g. \["names","emailAddresses","phoneNumbers"]. Defaults to names, emailAddresses and phoneNumbers. |
| `pageSize` | `number` | No | — |
| `pageToken` | `string` | No | — |
| `sortOrder` | `LAST_MODIFIED_ASCENDING \| LAST_MODIFIED_DESCENDING \| FIRST_NAME_ASCENDING \| LAST_NAME_ASCENDING` | No | — |
| `requestSyncToken` | `boolean` | No | Return a nextSyncToken for incremental reads. Expires after 7 days. |
| `syncToken` | `string` | No | Return only changes since this token. An expired token answers 410 EXPIRED\_SYNC\_TOKEN; re-list in full. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `connections` | `object[]` | No | — |
| `nextPageToken` | `string` | No | — |
| `nextSyncToken` | `string` | No | — |
| `totalPeople` | `number` | No | — |
| `totalItems` | `number` | No | — |

> [accordion] connections full type
>
> ```ts theme={null}
> {
>   resourceName: string,
>   etag?: string,
>   metadata?: {
>     sources?: {
>       type?: string,
>       id?: string,
>       etag?: string
>     }[],
>     deleted?: boolean,
>     objectType?: string
>   },
>   names?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     displayName?: string,
>     familyName?: string,
>     givenName?: string,
>     middleName?: string,
>     honorificPrefix?: string,
>     honorificSuffix?: string
>   }[],
>   emailAddresses?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     value?: string,
>     type?: string,
>     displayName?: string
>   }[],
>   phoneNumbers?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     value?: string,
>     canonicalForm?: string,
>     type?: string
>   }[],
>   organizations?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     name?: string,
>     title?: string,
>     department?: string
>   }[],
>   addresses?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     formattedValue?: string,
>     streetAddress?: string,
>     city?: string,
>     region?: string,
>     postalCode?: string,
>     country?: string,
>     countryCode?: string,
>     type?: string
>   }[],
>   photos?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     url?: string,
>     default?: boolean
>   }[],
>   biographies?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     value?: string,
>     contentType?: string
>   }[],
>   memberships?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     contactGroupMembership?: {
>       contactGroupId?: string,
>       contactGroupResourceName?: string
>     }
>   }[]
> }[]
> ```

***

### search

`contacts.search`

Search contacts by name, email or phone. Google warms this index per account, so the first call after authorizing can return nothing; retry.

**Risk:** `read`

```ts theme={null}
await corsair.googlecontacts.api.contacts.search({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `string` | Yes | Prefix-matched against names, nicknames, emails and phones |
| `readMask` | `string[]` | No | Person fields to return, e.g. \["names","emailAddresses","phoneNumbers"]. Defaults to names, emailAddresses and phoneNumbers. |
| `pageSize` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `results` | `object[]` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   person?: {
>     resourceName: string,
>     etag?: string,
>     metadata?: {
>       sources?: {
>         type?: string,
>         id?: string,
>         etag?: string
>       }[],
>       deleted?: boolean,
>       objectType?: string
>     },
>     names?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       displayName?: string,
>       familyName?: string,
>       givenName?: string,
>       middleName?: string,
>       honorificPrefix?: string,
>       honorificSuffix?: string
>     }[],
>     emailAddresses?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       value?: string,
>       type?: string,
>       displayName?: string
>     }[],
>     phoneNumbers?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       value?: string,
>       canonicalForm?: string,
>       type?: string
>     }[],
>     organizations?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       name?: string,
>       title?: string,
>       department?: string
>     }[],
>     addresses?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       formattedValue?: string,
>       streetAddress?: string,
>       city?: string,
>       region?: string,
>       postalCode?: string,
>       country?: string,
>       countryCode?: string,
>       type?: string
>     }[],
>     photos?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       url?: string,
>       default?: boolean
>     }[],
>     biographies?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       value?: string,
>       contentType?: string
>     }[],
>     memberships?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       contactGroupMembership?: {
>         contactGroupId?: string,
>         contactGroupResourceName?: string
>       }
>     }[]
>   }
> }[]
> ```

***

### update

`contacts.update`

Update an existing contact

**Risk:** `write`

```ts theme={null}
await corsair.googlecontacts.api.contacts.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |
| `etag` | `string` | Yes | etag from a prior read; the API rejects updates without it |
| `person` | `object` | Yes | — |
| `updatePersonFields` | `string[]` | Yes | Fields to overwrite, e.g. \["emailAddresses"]. Omitted fields are left untouched. |
| `personFields` | `string[]` | No | Person fields to return, e.g. \["names","emailAddresses","phoneNumbers"]. Defaults to names, emailAddresses and phoneNumbers. |

> [accordion] person full type
>
> ```ts theme={null}
> {
>   names?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     displayName?: string,
>     familyName?: string,
>     givenName?: string,
>     middleName?: string,
>     honorificPrefix?: string,
>     honorificSuffix?: string
>   }[],
>   emailAddresses?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     value?: string,
>     type?: string,
>     displayName?: string
>   }[],
>   phoneNumbers?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     value?: string,
>     canonicalForm?: string,
>     type?: string
>   }[],
>   organizations?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     name?: string,
>     title?: string,
>     department?: string
>   }[],
>   addresses?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     formattedValue?: string,
>     streetAddress?: string,
>     city?: string,
>     region?: string,
>     postalCode?: string,
>     country?: string,
>     countryCode?: string,
>     type?: string
>   }[],
>   biographies?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     value?: string,
>     contentType?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |
| `etag` | `string` | No | — |
| `metadata` | `object` | No | — |
| `names` | `object[]` | No | — |
| `emailAddresses` | `object[]` | No | — |
| `phoneNumbers` | `object[]` | No | — |
| `organizations` | `object[]` | No | — |
| `addresses` | `object[]` | No | — |
| `photos` | `object[]` | No | — |
| `biographies` | `object[]` | No | — |
| `memberships` | `object[]` | No | — |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   sources?: {
>     type?: string,
>     id?: string,
>     etag?: string
>   }[],
>   deleted?: boolean,
>   objectType?: string
> }
> ```

> [accordion] names full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   displayName?: string,
>   familyName?: string,
>   givenName?: string,
>   middleName?: string,
>   honorificPrefix?: string,
>   honorificSuffix?: string
> }[]
> ```

> [accordion] emailAddresses full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   type?: string,
>   displayName?: string
> }[]
> ```

> [accordion] phoneNumbers full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   canonicalForm?: string,
>   type?: string
> }[]
> ```

> [accordion] organizations full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   name?: string,
>   title?: string,
>   department?: string
> }[]
> ```

> [accordion] addresses full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   formattedValue?: string,
>   streetAddress?: string,
>   city?: string,
>   region?: string,
>   postalCode?: string,
>   country?: string,
>   countryCode?: string,
>   type?: string
> }[]
> ```

> [accordion] photos full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   url?: string,
>   default?: boolean
> }[]
> ```

> [accordion] biographies full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   contentType?: string
> }[]
> ```

> [accordion] memberships full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   contactGroupMembership?: {
>     contactGroupId?: string,
>     contactGroupResourceName?: string
>   }
> }[]
> ```

***

### updatePhoto

`contacts.updatePhoto`

Set or replace a contact's photo

**Risk:** `write`

```ts theme={null}
await corsair.googlecontacts.api.contacts.updatePhoto({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |
| `photoBytes` | `string` | Yes | Base64-encoded image |
| `personFields` | `string[]` | No | Person fields to return, e.g. \["names","emailAddresses","phoneNumbers"]. Defaults to names, emailAddresses and phoneNumbers. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |
| `etag` | `string` | No | — |
| `metadata` | `object` | No | — |
| `names` | `object[]` | No | — |
| `emailAddresses` | `object[]` | No | — |
| `phoneNumbers` | `object[]` | No | — |
| `organizations` | `object[]` | No | — |
| `addresses` | `object[]` | No | — |
| `photos` | `object[]` | No | — |
| `biographies` | `object[]` | No | — |
| `memberships` | `object[]` | No | — |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   sources?: {
>     type?: string,
>     id?: string,
>     etag?: string
>   }[],
>   deleted?: boolean,
>   objectType?: string
> }
> ```

> [accordion] names full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   displayName?: string,
>   familyName?: string,
>   givenName?: string,
>   middleName?: string,
>   honorificPrefix?: string,
>   honorificSuffix?: string
> }[]
> ```

> [accordion] emailAddresses full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   type?: string,
>   displayName?: string
> }[]
> ```

> [accordion] phoneNumbers full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   canonicalForm?: string,
>   type?: string
> }[]
> ```

> [accordion] organizations full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   name?: string,
>   title?: string,
>   department?: string
> }[]
> ```

> [accordion] addresses full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   formattedValue?: string,
>   streetAddress?: string,
>   city?: string,
>   region?: string,
>   postalCode?: string,
>   country?: string,
>   countryCode?: string,
>   type?: string
> }[]
> ```

> [accordion] photos full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   url?: string,
>   default?: boolean
> }[]
> ```

> [accordion] biographies full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   contentType?: string
> }[]
> ```

> [accordion] memberships full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   contactGroupMembership?: {
>     contactGroupId?: string,
>     contactGroupResourceName?: string
>   }
> }[]
> ```

***

## Other Contacts

### copyToContacts

`otherContacts.copyToContacts`

Copy an auto-saved contact into the saved contacts

**Risk:** `write`

```ts theme={null}
await corsair.googlecontacts.api.otherContacts.copyToContacts({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | e.g. "otherContacts/c123456789" |
| `copyMask` | `(emailAddresses \| names \| phoneNumbers)[]` | No | Fields to carry over. Google permits only these three. |
| `personFields` | `string[]` | No | Person fields to return, e.g. \["names","emailAddresses","phoneNumbers"]. Defaults to names, emailAddresses and phoneNumbers. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourceName` | `string` | Yes | — |
| `etag` | `string` | No | — |
| `metadata` | `object` | No | — |
| `names` | `object[]` | No | — |
| `emailAddresses` | `object[]` | No | — |
| `phoneNumbers` | `object[]` | No | — |
| `organizations` | `object[]` | No | — |
| `addresses` | `object[]` | No | — |
| `photos` | `object[]` | No | — |
| `biographies` | `object[]` | No | — |
| `memberships` | `object[]` | No | — |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   sources?: {
>     type?: string,
>     id?: string,
>     etag?: string
>   }[],
>   deleted?: boolean,
>   objectType?: string
> }
> ```

> [accordion] names full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   displayName?: string,
>   familyName?: string,
>   givenName?: string,
>   middleName?: string,
>   honorificPrefix?: string,
>   honorificSuffix?: string
> }[]
> ```

> [accordion] emailAddresses full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   type?: string,
>   displayName?: string
> }[]
> ```

> [accordion] phoneNumbers full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   canonicalForm?: string,
>   type?: string
> }[]
> ```

> [accordion] organizations full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   name?: string,
>   title?: string,
>   department?: string
> }[]
> ```

> [accordion] addresses full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   formattedValue?: string,
>   streetAddress?: string,
>   city?: string,
>   region?: string,
>   postalCode?: string,
>   country?: string,
>   countryCode?: string,
>   type?: string
> }[]
> ```

> [accordion] photos full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   url?: string,
>   default?: boolean
> }[]
> ```

> [accordion] biographies full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   value?: string,
>   contentType?: string
> }[]
> ```

> [accordion] memberships full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     primary?: boolean,
>     verified?: boolean,
>     source?: {
>       type?: string,
>       id?: string
>     }
>   },
>   contactGroupMembership?: {
>     contactGroupId?: string,
>     contactGroupResourceName?: string
>   }
> }[]
> ```

***

### list

`otherContacts.list`

List auto-saved contacts the user never filed

**Risk:** `read`

```ts theme={null}
await corsair.googlecontacts.api.otherContacts.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `readMask` | `(emailAddresses \| metadata \| names \| phoneNumbers \| photos)[]` | No | — |
| `pageSize` | `number` | No | — |
| `pageToken` | `string` | No | — |
| `requestSyncToken` | `boolean` | No | Return a nextSyncToken for incremental reads. Expires after 7 days. |
| `syncToken` | `string` | No | Return only changes since this token. Deleted contacts come back with metadata.deleted set. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `otherContacts` | `object[]` | No | — |
| `nextPageToken` | `string` | No | — |
| `nextSyncToken` | `string` | No | — |
| `totalSize` | `number` | No | — |

> [accordion] otherContacts full type
>
> ```ts theme={null}
> {
>   resourceName: string,
>   etag?: string,
>   metadata?: {
>     sources?: {
>       type?: string,
>       id?: string,
>       etag?: string
>     }[],
>     deleted?: boolean,
>     objectType?: string
>   },
>   names?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     displayName?: string,
>     familyName?: string,
>     givenName?: string,
>     middleName?: string,
>     honorificPrefix?: string,
>     honorificSuffix?: string
>   }[],
>   emailAddresses?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     value?: string,
>     type?: string,
>     displayName?: string
>   }[],
>   phoneNumbers?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     value?: string,
>     canonicalForm?: string,
>     type?: string
>   }[],
>   organizations?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     name?: string,
>     title?: string,
>     department?: string
>   }[],
>   addresses?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     formattedValue?: string,
>     streetAddress?: string,
>     city?: string,
>     region?: string,
>     postalCode?: string,
>     country?: string,
>     countryCode?: string,
>     type?: string
>   }[],
>   photos?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     url?: string,
>     default?: boolean
>   }[],
>   biographies?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     value?: string,
>     contentType?: string
>   }[],
>   memberships?: {
>     metadata?: {
>       primary?: boolean,
>       verified?: boolean,
>       source?: {
>         type?: string,
>         id?: string
>       }
>     },
>     contactGroupMembership?: {
>       contactGroupId?: string,
>       contactGroupResourceName?: string
>     }
>   }[]
> }[]
> ```

***

### search

`otherContacts.search`

Search auto-saved contacts

**Risk:** `read`

```ts theme={null}
await corsair.googlecontacts.api.otherContacts.search({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `string` | Yes | — |
| `readMask` | `(emailAddresses \| metadata \| names \| phoneNumbers)[]` | No | — |
| `pageSize` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `results` | `object[]` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   person?: {
>     resourceName: string,
>     etag?: string,
>     metadata?: {
>       sources?: {
>         type?: string,
>         id?: string,
>         etag?: string
>       }[],
>       deleted?: boolean,
>       objectType?: string
>     },
>     names?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       displayName?: string,
>       familyName?: string,
>       givenName?: string,
>       middleName?: string,
>       honorificPrefix?: string,
>       honorificSuffix?: string
>     }[],
>     emailAddresses?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       value?: string,
>       type?: string,
>       displayName?: string
>     }[],
>     phoneNumbers?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       value?: string,
>       canonicalForm?: string,
>       type?: string
>     }[],
>     organizations?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       name?: string,
>       title?: string,
>       department?: string
>     }[],
>     addresses?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       formattedValue?: string,
>       streetAddress?: string,
>       city?: string,
>       region?: string,
>       postalCode?: string,
>       country?: string,
>       countryCode?: string,
>       type?: string
>     }[],
>     photos?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       url?: string,
>       default?: boolean
>     }[],
>     biographies?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       value?: string,
>       contentType?: string
>     }[],
>     memberships?: {
>       metadata?: {
>         primary?: boolean,
>         verified?: boolean,
>         source?: {
>           type?: string,
>           id?: string
>         }
>       },
>       contactGroupMembership?: {
>         contactGroupId?: string,
>         contactGroupResourceName?: string
>       }
>     }[]
>   }
> }[]
> ```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.