Attention: There will be major changes to the API soon that will require migration work. Please check our upcoming releases page and deprecation schedule frequently for updates. You may also sign up for our mailing list to receive updates.

Method: accounts.invitations.list

Lists pending invitations for the specified account.

HTTP request

GET https://mybusinessaccountmanagement.googleapis.com/v1/{parent=accounts/*}/invitations

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The name of the account from which the list of invitations is being retrieved. accounts/{account_id}/invitations

Query parameters

Parameters
filter

string

Optional. Filtering the response is supported via the Invitation.target_type field.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Response message for AccessControl.ListInvitations.

JSON representation
{
  "invitations": [
    {
      object (Invitation)
    }
  ]
}
Fields
invitations[]

object (Invitation)

A collection of invitations that are pending for the account. The number of invitations listed here cannot exceed 1000.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

Invitation

Represents a pending invitation.

JSON representation
{
  "name": string,
  "role": enum (AdminRole),
  "targetType": enum (TargetType),

  // Union field target can be only one of the following:
  "targetAccount": {
    object (Account)
  },
  "targetLocation": {
    object (TargetLocation)
  }
  // End of list of possible types for union field target.
}
Fields
name

string

Required. The resource name for the invitation. accounts/{account_id}/invitations/{invitation_id}.

role

enum (AdminRole)

Output only. The invited role on the account.

targetType

enum (TargetType)

Output only. Specifies which target types should appear in the response.

Union field target. Indicates the target this invitation is for. target can be only one of the following:
targetAccount

object (Account)

The sparsely populated account this invitation is for.

targetLocation

object (TargetLocation)

The target location this invitation is for.

TargetLocation

Represents a target location for a pending invitation.

JSON representation
{
  "locationName": string,
  "address": string
}
Fields
locationName

string

The name of the location to which the user is invited.

address

string

The address of the location to which the user is invited.

TargetType

The type of target an invitation is for.

Enums
TARGET_TYPE_UNSPECIFIED Set when target type is unspecified.
ACCOUNTS_ONLY List invitations only for targets of type Account.
LOCATIONS_ONLY List invitations only for targets of type Location.