# REST Resource: contactGroups

- [Resource: ContactGroup](https://developers.google.com/people/api/rest/v1/contactGroups#ContactGroup)
  - [JSON representation](https://developers.google.com/people/api/rest/v1/contactGroups#ContactGroup.SCHEMA_REPRESENTATION)
- [ContactGroupMetadata](https://developers.google.com/people/api/rest/v1/contactGroups#ContactGroupMetadata)
  - [JSON representation](https://developers.google.com/people/api/rest/v1/contactGroups#ContactGroupMetadata.SCHEMA_REPRESENTATION)
- [GroupType](https://developers.google.com/people/api/rest/v1/contactGroups#GroupType)
- [GroupClientData](https://developers.google.com/people/api/rest/v1/contactGroups#GroupClientData)
  - [JSON representation](https://developers.google.com/people/api/rest/v1/contactGroups#GroupClientData.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/people/api/rest/v1/contactGroups#METHODS_SUMMARY)

## Resource: ContactGroup

A contact group.

| JSON representation |
|---|
| ``` { "resourceName": string, "etag": string, "metadata": { object (`https://developers.google.com/people/api/rest/v1/contactGroups#ContactGroupMetadata`) }, "groupType": enum (`https://developers.google.com/people/api/rest/v1/contactGroups#GroupType`), "name": string, "formattedName": string, "memberResourceNames": [ string ], "memberCount": integer, "clientData": [ { object (`https://developers.google.com/people/api/rest/v1/contactGroups#GroupClientData`) } ] } ``` |

| Fields ||
|---|---|
| `resourceName` | `string` The resource name for the contact group, assigned by the server. An ASCII string, in the form of `contactGroups/{contactGroupId}`. |
| `etag` | `string` The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the resource. Used for web cache validation. |
| `metadata` | ``object (`https://developers.google.com/people/api/rest/v1/contactGroups#ContactGroupMetadata`)`` Output only. Metadata about the contact group. |
| `groupType` | ``enum (`https://developers.google.com/people/api/rest/v1/contactGroups#GroupType`)`` Output only. The contact group type. |
| `name` | `string` The contact group name set by the group owner or a system provided name for system groups. For [`contactGroups.create`](https://developers.google.com/people/api/rest/v1/contactGroups/create) or [`contactGroups.update`](https://developers.google.com/people/api/rest/v1/contactGroups/update) the name must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error. |
| `formattedName` | `string` Output only. The name translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale for system groups names. Group names set by the owner are the same as name. |
| `memberResourceNames[]` | `string` Output only. The list of contact person resource names that are members of the contact group. The field is only populated for GET requests and will only return as many members as `maxMembers` in the get request. |
| `memberCount` | `integer` Output only. The total number of contacts in the group irrespective of max members in specified in the request. |
| `clientData[]` | ``object (`https://developers.google.com/people/api/rest/v1/contactGroups#GroupClientData`)`` The group's client data. |

## ContactGroupMetadata

The metadata about a contact group.

| JSON representation |
|---|
| ``` { "updateTime": string, "deleted": boolean } ``` |

| Fields ||
|---|---|
| `updateTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. The time the group was last updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `deleted` | `boolean` Output only. True if the contact group resource has been deleted. Populated only for [`contactGroups.list`](https://developers.google.com/people/api/rest/v1/contactgroups/list) requests that include a sync token. |

## GroupType

A contact group type.

| Enums ||
|---|---|
| `GROUP_TYPE_UNSPECIFIED` | Unspecified. |
| `USER_CONTACT_GROUP` | User defined contact group. |
| `SYSTEM_CONTACT_GROUP` | System defined contact group. |

## GroupClientData

Arbitrary client data that is populated by clients. Duplicate keys and values are allowed.

| JSON representation |
|---|
| ``` { "key": string, "value": string } ``` |

| Fields ||
|---|---|
| `key` | `string` The client specified key of the client data. |
| `value` | `string` The client specified value of the client data. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/people/api/rest/v1/contactGroups/batchGet` | Get a list of contact groups owned by the authenticated user by specifying a list of contact group resource names. |
| ### `https://developers.google.com/people/api/rest/v1/contactGroups/create` | Create a new contact group owned by the authenticated user. |
| ### `https://developers.google.com/people/api/rest/v1/contactGroups/delete` | Delete an existing contact group owned by the authenticated user by specifying a contact group resource name. |
| ### `https://developers.google.com/people/api/rest/v1/contactGroups/get` | Get a specific contact group owned by the authenticated user by specifying a contact group resource name. |
| ### `https://developers.google.com/people/api/rest/v1/contactGroups/list` | List all contact groups owned by the authenticated user. |
| ### `https://developers.google.com/people/api/rest/v1/contactGroups/update` | Update the name of an existing contact group owned by the authenticated user. |