Contacts

For a list of methods for this resource, see the end of this page.

Resource representations

A person or group that can be used as a creator or a contact.

{
  "kind": "mirror#contact",
  "source": string,
  "id": string,
  "displayName": string,
  "imageUrls": [
    string
  ],
  "type": string,
  "acceptTypes": [
    string
  ],
  "phoneNumber": string,
  "priority": unsigned integer,
  "acceptCommands": [
    {
      "type": string
    }
  ],
  "speakableName": string,
  "sharingFeatures": [
    string
  ]
}
Property name Value Description Notes
acceptCommands[] list A list of voice menu commands that a contact can handle. Glass shows up to three contacts for each voice menu command. If there are more than that, the three contacts with the highest priority are shown for that particular command. writable
acceptCommands[].type string The type of operation this command corresponds to. Allowed values are:
  • TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
  • POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
writable
acceptTypes[] list A list of MIME types that a contact supports. The contact will be shown to the user if any of its acceptTypes matches any of the types of the attachments on the item. If no acceptTypes are given, the contact will be shown for all items. writable
displayName string The name to display for this contact. writable
id string An ID for this contact. This is generated by the application and is treated as an opaque token. writable
imageUrls[] list Set of image URLs to display for a contact. Most contacts will have a single image, but a "group" contact may include up to 8 image URLs and they will be resized and cropped into a mosaic on the client. writable
kind string The type of resource. This is always mirror#contact.
phoneNumber string Primary phone number for the contact. This can be a fully-qualified number, with country calling code and area code, or a local number. writable
priority unsigned integer Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities. writable
sharingFeatures[] list A list of sharing features that a contact can handle. Allowed values are:
  • ADD_CAPTION
source string The ID of the application that created this contact. This is populated by the API
speakableName string Name of this contact as it should be pronounced. If this contact's name must be spoken as part of a voice disambiguation menu, this name is used as the expected pronunciation. This is useful for contact names with unpronounceable characters or whose display spelling is otherwise not phonetic. writable
type string The type for this contact. This is used for sorting in UIs. Allowed values are:
  • INDIVIDUAL - Represents a single person. This is the default.
  • GROUP - Represents more than a single person.
writable

Methods

delete
Deletes a contact.
get
Gets a single contact by ID.
insert
Inserts a new contact.
list
Retrieves a list of contacts for the authenticated user.
patch
Updates a contact in place. This method supports patch semantics.
update
Updates a contact in place.