Google People API People API

The People API from Google People API — 4 operation(s) for people.

OpenAPI Specification

google-contacts-people-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google API (Contacts) ContactGroups People API
  description: The Google People API provides access to information about profiles and contacts. It allows you to list, create, update, delete, and search contacts, as well as manage contact groups. It replaces the legacy Google Contacts API.
  version: v1
  contact:
    name: Google
    url: https://developers.google.com/people
servers:
- url: https://people.googleapis.com/v1
security:
- oauth2: []
tags:
- name: People
paths:
  /people/{resourceName}:
    get:
      operationId: getPerson
      summary: Get a person
      description: Provides information about a person by specifying a resource name.
      parameters:
      - name: resourceName
        in: path
        required: true
        schema:
          type: string
        description: The resource name of the person to provide information about.
      - name: personFields
        in: query
        schema:
          type: string
        description: A field mask to restrict which fields on the person are returned.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Person'
      tags:
      - People
  /people/{resourceName}/connections:
    get:
      operationId: listConnections
      summary: List contacts
      description: Provides a list of the authenticated user's contacts.
      parameters:
      - name: resourceName
        in: path
        required: true
        schema:
          type: string
          default: people/me
      - name: personFields
        in: query
        schema:
          type: string
      - name: pageSize
        in: query
        schema:
          type: integer
          maximum: 1000
      - name: pageToken
        in: query
        schema:
          type: string
      - name: sortOrder
        in: query
        schema:
          type: string
          enum:
          - LAST_MODIFIED_ASCENDING
          - LAST_MODIFIED_DESCENDING
          - FIRST_NAME_ASCENDING
          - LAST_NAME_ASCENDING
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListConnectionsResponse'
      tags:
      - People
  /people/{resourceName}:updateContact:
    patch:
      operationId: updateContact
      summary: Update a contact
      description: Update contact data for an existing contact person.
      parameters:
      - name: resourceName
        in: path
        required: true
        schema:
          type: string
      - name: updatePersonFields
        in: query
        schema:
          type: string
      - name: personFields
        in: query
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Person'
      responses:
        '200':
          description: Successful response
      tags:
      - People
  /people/{resourceName}:deleteContact:
    delete:
      operationId: deleteContact
      summary: Delete a contact
      description: Delete a contact person.
      parameters:
      - name: resourceName
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
      tags:
      - People
components:
  schemas:
    Person:
      type: object
      properties:
        resourceName:
          type: string
          description: The resource name for the person.
        etag:
          type: string
        metadata:
          type: object
          properties:
            sources:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                  id:
                    type: string
        names:
          type: array
          items:
            type: object
            properties:
              displayName:
                type: string
              familyName:
                type: string
              givenName:
                type: string
              middleName:
                type: string
        emailAddresses:
          type: array
          items:
            type: object
            properties:
              value:
                type: string
                format: email
              type:
                type: string
        phoneNumbers:
          type: array
          items:
            type: object
            properties:
              value:
                type: string
              type:
                type: string
        addresses:
          type: array
          items:
            type: object
            properties:
              formattedValue:
                type: string
              type:
                type: string
              streetAddress:
                type: string
              city:
                type: string
              region:
                type: string
              postalCode:
                type: string
              country:
                type: string
        organizations:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              title:
                type: string
              department:
                type: string
        birthdays:
          type: array
          items:
            type: object
            properties:
              date:
                type: object
                properties:
                  year:
                    type: integer
                  month:
                    type: integer
                  day:
                    type: integer
        photos:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
                format: uri
              default:
                type: boolean
        biographies:
          type: array
          items:
            type: object
            properties:
              value:
                type: string
              contentType:
                type: string
        urls:
          type: array
          items:
            type: object
            properties:
              value:
                type: string
                format: uri
              type:
                type: string
    ListConnectionsResponse:
      type: object
      properties:
        connections:
          type: array
          items:
            $ref: '#/components/schemas/Person'
        nextPageToken:
          type: string
        totalPeople:
          type: integer
        totalItems:
          type: integer
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/contacts: See, edit, download, and permanently delete your contacts
            https://www.googleapis.com/auth/contacts.readonly: See and download your contacts
            https://www.googleapis.com/auth/contacts.other.readonly: See and download contact info automatically saved in your Other contacts
            https://www.googleapis.com/auth/directory.readonly: See and download your organization's GSuite directory