Google Admin SDK Admin Sdk Admin Directory Groups API

The Admin Sdk Admin Directory Groups API from Google Admin SDK — 4 operation(s) for admin sdk admin directory groups.

GitHub OpenAPI

Operations 9

POST /admin/directory/v1/groups Insert groups #
GET /admin/directory/v1/groups List groups #
DELETE /admin/directory/v1/groups/{groupKey} Delete groups #
PUT /admin/directory/v1/groups/{groupKey} Update groups #
PATCH /admin/directory/v1/groups/{groupKey} Patch groups #
GET /admin/directory/v1/groups/{groupKey} Get groups #
DELETE /admin/directory/v1/groups/{groupKey}/aliases/{alias} Delete aliases #
GET /admin/directory/v1/groups/{groupKey}/aliases List aliases #
POST /admin/directory/v1/groups/{groupKey}/aliases Insert aliases #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/google-admin-sdk:google-admin-sdk-admin-directory-groups-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

google-admin-sdk-admin-directory-groups-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Admin SDK API Groups API
  version: directory_v1
  description: Generated from Google's published Discovery document for Admin SDK API (admin directory_v1, revision 20261109).
    9 operation(s).
  contact:
    name: Google
    url: https://developers.google.com/
  termsOfService: https://developers.google.com/terms
externalDocs:
  url: https://developers.google.com/workspace/admin/
servers:
- url: https://admin.googleapis.com
paths:
  /admin/directory/v1/groups:
    post:
      operationId: directory.groups.insert
      summary: Insert groups
      description: Creates a group.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Group'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        4XX:
          content: &id001
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content: *id001
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/admin.directory.group
      - apiKey: []
      tags:
      - Groups
    get:
      operationId: directory.groups.list
      summary: List groups
      description: Retrieves all groups of a domain or of a user given a userKey (paginated).
      parameters:
      - name: customer
        in: query
        required: false
        description: The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch
          all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent
          your account's `customerId`. The `customerId` is also returned as part of the [Users](https://developers.google.com/workspace/admin/directory/v1/reference/users)
          resource. You must provide either the `customer` or the `domain` parameter.
        schema:
          type: string
      - name: domain
        in: query
        required: false
        description: The domain name. Use this field to get groups from only one domain. To return all domains for a customer
          account, use the `customer` query parameter instead.
        schema:
          type: string
      - name: maxResults
        in: query
        required: false
        description: Maximum number of results to return. Max allowed value is 200.
        schema:
          default: '200'
          type: integer
          format: int32
          minimum: 1
      - name: orderBy
        in: query
        required: false
        description: Column to use for sorting results
        schema:
          type: string
          enum:
          - email
      - name: pageToken
        in: query
        required: false
        description: Token to specify next page in the list
        schema:
          type: string
      - name: query
        in: query
        required: false
        description: Query string search. Contains one or more search clauses, each with a field, operator, and value. For
          complete documentation, go to [Search for groups](https://developers.google.com/workspace/admin/directory/v1/guides/search-groups).
        schema:
          type: string
      - name: sortOrder
        in: query
        required: false
        description: Whether to return results in ascending or descending order. Only of use when orderBy is also used
        schema:
          type: string
          enum:
          - ASCENDING
          - DESCENDING
      - name: userKey
        in: query
        required: false
        description: Email or immutable ID of the user if only those groups are to be listed, the given user is a member of.
          If it's an ID, it should match with the ID of the user object. Cannot be used with the `customer` parameter.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Groups'
        4XX:
          content: &id002
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content: *id002
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/admin.directory.group
        - https://www.googleapis.com/auth/admin.directory.group.readonly
      - apiKey: []
      tags:
      - Groups
  /admin/directory/v1/groups/{groupKey}:
    delete:
      operationId: directory.groups.delete
      summary: Delete groups
      description: Deletes a group.
      parameters:
      - name: groupKey
        in: path
        required: true
        description: Identifies the group in the API request. The value can be the group's email address, group alias, or
          the unique group ID.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        4XX:
          content: &id003
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content: *id003
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/admin.directory.group
      - apiKey: []
      tags:
      - Groups
    put:
      operationId: directory.groups.update
      summary: Update groups
      description: Updates a group's properties.
      parameters:
      - name: groupKey
        in: path
        required: true
        description: Identifies the group in the API request. The value can be the group's email address, group alias, or
          the unique group ID.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Group'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        4XX:
          content: &id004
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content: *id004
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/admin.directory.group
      - apiKey: []
      tags:
      - Groups
    patch:
      operationId: directory.groups.patch
      summary: Patch groups
      description: Updates a group's properties. This method supports [patch semantics](https://developers.google.com/workspace/admin/directory/v1/guides/performance#patch).
      parameters:
      - name: groupKey
        in: path
        required: true
        description: Identifies the group in the API request. The value can be the group's email address, group alias, or
          the unique group ID.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Group'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        4XX:
          content: &id005
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content: *id005
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/admin.directory.group
      - apiKey: []
      tags:
      - Groups
    get:
      operationId: directory.groups.get
      summary: Get groups
      description: Retrieves a group's properties.
      parameters:
      - name: groupKey
        in: path
        required: true
        description: Identifies the group in the API request. The value can be the group's email address, group alias, or
          the unique group ID.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        4XX:
          content: &id006
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content: *id006
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/admin.directory.group
        - https://www.googleapis.com/auth/admin.directory.group.readonly
      - apiKey: []
      tags:
      - Groups
  /admin/directory/v1/groups/{groupKey}/aliases/{alias}:
    delete:
      operationId: directory.groups.aliases.delete
      summary: Delete aliases
      description: Removes an alias.
      parameters:
      - name: groupKey
        in: path
        required: true
        description: Identifies the group in the API request. The value can be the group's email address, group alias, or
          the unique group ID.
        schema:
          type: string
      - name: alias
        in: path
        required: true
        description: The alias to be removed
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        4XX:
          content: &id007
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content: *id007
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/admin.directory.group
      - apiKey: []
      tags:
      - Groups
  /admin/directory/v1/groups/{groupKey}/aliases:
    get:
      operationId: directory.groups.aliases.list
      summary: List aliases
      description: Lists all aliases for a group.
      parameters:
      - name: groupKey
        in: path
        required: true
        description: Identifies the group in the API request. The value can be the group's email address, group alias, or
          the unique group ID.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Aliases'
        4XX:
          content: &id008
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content: *id008
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/admin.directory.group
        - https://www.googleapis.com/auth/admin.directory.group.readonly
      - apiKey: []
      tags:
      - Groups
    post:
      operationId: directory.groups.aliases.insert
      summary: Insert aliases
      description: Adds an alias for the group.
      parameters:
      - name: groupKey
        in: path
        required: true
        description: Identifies the group in the API request. The value can be the group's email address, group alias, or
          the unique group ID.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Alias'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Alias'
        4XX:
          content: &id009
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content: *id009
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/admin.directory.group
      - apiKey: []
      tags:
      - Groups
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: key
      description: API key; accepted by methods that do not need user data.
    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/admin.directory.userschema: View and manage the provisioning of user schemas on
              your domain
            https://www.googleapis.com/auth/admin.directory.group.readonly: View groups on your domain
            https://www.googleapis.com/auth/admin.directory.resource.calendar: View and manage the provisioning of calendar
              resources on your domain
            https://www.googleapis.com/auth/admin.directory.domain.readonly: View domains related to your customers
            https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly: View your ChromeOS devices' metadata
            https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly: View calendar resources on your domain
            https://www.googleapis.com/auth/admin.directory.device.mobile.readonly: View your mobile devices' metadata
            https://www.googleapis.com/auth/admin.chrome.printers.readonly: See the printers that your organization can use
              with Chrome
            https://www.googleapis.com/auth/admin.directory.user.alias.readonly: View user aliases on your domain
            https://www.googleapis.com/auth/admin.chrome.printers: See, add, edit, and permanently delete the printers that
              your organization can use with Chrome
            https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly: View delegated admin roles for your domain
            https://www.googleapis.com/auth/admin.directory.user: View and manage the provisioning of users on your domain
            https://www.googleapis.com/auth/admin.directory.group: View and manage the provisioning of groups on your domain
            https://www.googleapis.com/auth/admin.directory.user.readonly: See info about users on your domain
            https://www.googleapis.com/auth/admin.directory.rolemanagement: Manage delegated admin roles for your domain
            https://www.googleapis.com/auth/admin.directory.user.security: Manage data access permissions for users on your
              domain
            https://www.googleapis.com/auth/admin.directory.customer: View and manage customer related information
            https://www.googleapis.com/auth/admin.directory.userschema.readonly: View user schemas on your domain
            https://www.googleapis.com/auth/admin.directory.device.mobile.action: Manage your mobile devices by performing
              administrative tasks
            https://www.googleapis.com/auth/admin.directory.orgunit: View and manage organization units on your domain
            https://www.googleapis.com/auth/admin.directory.group.member: View and manage group subscriptions on your domain
            https://www.googleapis.com/auth/admin.directory.device.chromeos: View and manage your ChromeOS devices' metadata
            https://www.googleapis.com/auth/admin.directory.device.mobile: View and manage your mobile devices' metadata
            https://www.googleapis.com/auth/cloud-platform: See, edit, configure, and delete your Google Cloud data and see
              the email address for your Google Account.
            https://www.googleapis.com/auth/admin.directory.group.member.readonly: View group subscriptions on your domain
            https://www.googleapis.com/auth/admin.directory.orgunit.readonly: View organization units on your domain
            https://www.googleapis.com/auth/admin.directory.user.alias: View and manage user aliases on your domain
            https://www.googleapis.com/auth/admin.directory.customer.readonly: View customer related information
            https://www.googleapis.com/auth/admin.directory.domain: View and manage the provisioning of domains for your customers
  schemas:
    Alias:
      type: object
      description: JSON template for Alias object in Directory API.
      properties:
        id:
          type: string
        alias:
          type: string
        kind:
          default: admin#directory#alias
          type: string
        etag:
          type: string
        primaryEmail:
          type: string
    Aliases:
      description: JSON response template to list aliases in Directory API.
      properties:
        kind:
          default: admin#directory#aliases
          type: string
        aliases:
          type: array
          items: {}
        etag:
          type: string
      type: object
    ExternalId:
      properties:
        id:
          type: string
          description: The unique identifier string assigned by the external provider.
        namespace:
          description: The system or identity provider managing this ID.
          type: string
      type: object
      description: External identifier used to link and identify this group across external directory systems.
    GoogleRpcError:
      type: object
      description: The error envelope every Google API returns.
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
            status:
              type: string
            details:
              type: array
              items:
                type: object
    Group:
      type: object
      properties:
        aliases:
          type: array
          description: Read-only. The list of a group's alias email addresses. To add, update, or remove a group's aliases,
            use the `groups.aliases` methods. If edited in a group's POST or PUT request, the edit is ignored.
          items:
            type: string
        description:
          description: An extended description to help users determine the purpose of a group. For example, you can include
            information about who should join the group, the types of messages to send to the group, links to FAQs about the
            group, or related groups. Maximum length is `4,096` characters.
          type: string
        etag:
          description: ETag of the resource.
          type: string
        externalIds:
          items:
            $ref: '#/components/schemas/ExternalId'
          type: array
          description: Optional. The list of external IDs for the group, such as an immutable identifier from an external
            identity provider or directory sync client. Each entry contains a namespace and an ID value.
        email:
          description: The group's email address. If your account has multiple domains, select the appropriate domain for
            the email address. The `email` must be unique. This property is required when creating a group. Group email addresses
            are subject to the same character usage rules as usernames, see the [help center](https://support.google.com/a/answer/9193374)
            for details.
          type: string
        adminCreated:
          type: boolean
          description: Read-only. Value is `true` if this group was created by an administrator rather than a user.
        name:
          description: The group's display name.
          type: string
        nonEditableAliases:
          items:
            type: string
          description: Read-only. The list of the group's non-editable alias email addresses that are outside of the account's
            primary domain or subdomains. These are functioning email addresses used by the group. This is a read-only property
            returned in the API's response for a group. If edited in a group's POST or PUT request, the edit is ignored.
          type: array
        directMembersCount:
          type: string
          format: int64
          description: The number of users that are direct members of the group. If a group is a member (child) of this group
            (the parent), members of the child group are not counted in the `directMembersCount` property of the parent group.
        id:
          description: Read-only. The unique ID of a group. A group `id` can be used as a group request URI's `groupKey`.
          type: string
        kind:
          type: string
          description: The type of the API resource. For Groups resources, the value is `admin#directory#group`.
          default: admin#directory#group
      description: 'Google Groups provide your users the ability to send messages to groups of people using the group''s email
        address. For more information about common tasks, see the [Developer''s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-groups).
        For information about other types of groups, see the [Cloud Identity Groups API documentation](https://cloud.google.com/identity/docs/groups).
        Note: The user calling the API (or being impersonated by a service account) must have an assigned [role](https://developers.google.com/workspace/admin/directory/v1/guides/manage-roles)
        that includes Admin API Groups permissions, such as Super Admin or Groups Admin.'
    Groups:
      properties:
        kind:
          description: Kind of resource this is.
          type: string
          default: admin#directory#groups
        nextPageToken:
          type: string
          description: Token used to access next page of this result.
        groups:
          items:
            $ref: '#/components/schemas/Group'
          type: array
          description: A list of group objects.
        etag:
          description: ETag of the resource.
          type: string
      type: object
x-provenance:
  method: harvested
  publisher: Google
  source: https://admin.googleapis.com/$discovery/rest?version=directory_v1
  note: converted by discovery-to-openapi.py from Google's Discovery document (revision 20261109)