Google Admin SDK Admin Sdk Admin Directory Schemas API

The Admin Sdk Admin Directory Schemas API from Google Admin SDK — 2 operation(s) for admin sdk admin directory schemas.

GitHub OpenAPI

Operations 6

GET /admin/directory/v1/customer/{customerId}/schemas/{schemaKey} Get schemas #
DELETE /admin/directory/v1/customer/{customerId}/schemas/{schemaKey} Delete schemas #
PUT /admin/directory/v1/customer/{customerId}/schemas/{schemaKey} Update schemas #
PATCH /admin/directory/v1/customer/{customerId}/schemas/{schemaKey} Patch schemas #
GET /admin/directory/v1/customer/{customerId}/schemas List schemas #
POST /admin/directory/v1/customer/{customerId}/schemas Insert schemas #

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-schemas-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-schemas-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Admin SDK API Schemas API
  version: directory_v1
  description: Generated from Google's published Discovery document for Admin SDK API (admin directory_v1, revision 20261109).
    6 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/customer/{customerId}/schemas/{schemaKey}:
    get:
      operationId: directory.schemas.get
      summary: Get schemas
      description: Retrieves a schema.
      parameters:
      - name: customerId
        in: path
        required: true
        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: schemaKey
        in: path
        required: true
        description: Name or immutable ID of the schema.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Schema'
        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.userschema
        - https://www.googleapis.com/auth/admin.directory.userschema.readonly
      - apiKey: []
      tags:
      - Schemas
    delete:
      operationId: directory.schemas.delete
      summary: Delete schemas
      description: Deletes a schema.
      parameters:
      - name: customerId
        in: path
        required: true
        description: Immutable ID of the Google Workspace account.
        schema:
          type: string
      - name: schemaKey
        in: path
        required: true
        description: Name or immutable ID of the schema.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        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.userschema
      - apiKey: []
      tags:
      - Schemas
    put:
      operationId: directory.schemas.update
      summary: Update schemas
      description: Updates a schema.
      parameters:
      - name: customerId
        in: path
        required: true
        description: Immutable ID of the Google Workspace account.
        schema:
          type: string
      - name: schemaKey
        in: path
        required: true
        description: Name or immutable ID of the schema.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Schema'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Schema'
        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.userschema
      - apiKey: []
      tags:
      - Schemas
    patch:
      operationId: directory.schemas.patch
      summary: Patch schemas
      description: Patches a schema.
      parameters:
      - name: customerId
        in: path
        required: true
        description: Immutable ID of the Google Workspace account.
        schema:
          type: string
      - name: schemaKey
        in: path
        required: true
        description: Name or immutable ID of the schema.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Schema'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Schema'
        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.userschema
      - apiKey: []
      tags:
      - Schemas
  /admin/directory/v1/customer/{customerId}/schemas:
    get:
      operationId: directory.schemas.list
      summary: List schemas
      description: Retrieves all schemas for a customer.
      parameters:
      - name: customerId
        in: path
        required: true
        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
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Schemas'
        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.userschema
        - https://www.googleapis.com/auth/admin.directory.userschema.readonly
      - apiKey: []
      tags:
      - Schemas
    post:
      operationId: directory.schemas.insert
      summary: Insert schemas
      description: Creates a schema.
      parameters:
      - name: customerId
        in: path
        required: true
        description: Immutable ID of the Google Workspace account.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Schema'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Schema'
        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.userschema
      - apiKey: []
      tags:
      - Schemas
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:
    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
    Schema:
      description: The type of API resource. For Schema resources, this is always `admin#directory#schema`.
      properties:
        kind:
          default: admin#directory#schema
          type: string
          description: Kind of resource this is.
        schemaId:
          description: The unique identifier of the schema (Read-only)
          type: string
        displayName:
          description: Display name for the schema.
          type: string
        etag:
          type: string
          description: The ETag of the resource.
        schemaName:
          description: 'The schema''s name. Each `schema_name` must be unique within a customer. Reusing a name results in
            a `409: Entity already exists` error.'
          type: string
        fields:
          description: A list of fields in the schema.
          type: array
          items:
            $ref: '#/components/schemas/SchemaFieldSpec'
      type: object
    SchemaFieldSpec:
      type: object
      description: You can use schemas to add custom fields to user profiles. You can use these fields to store information
        such as the projects your users work on, their physical locations, their hire dates, or whatever else fits your business
        needs. For more information, see [Custom User Fields](https://developers.google.com/workspace/admin/directory/v1/guides/manage-schemas).
      properties:
        readAccessType:
          type: string
          description: 'Specifies who can view values of this field. See [Retrieve users as a non-administrator](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users#retrieve_users_non_admin)
            for more information. Note: It may take up to 24 hours for changes to this field to be reflected.'
          default: ALL_DOMAIN_USERS
        fieldName:
          type: string
          description: The name of the field.
        kind:
          default: admin#directory#schema#fieldspec
          type: string
          description: The kind of resource this is. For schema fields this is always `admin#directory#schema#fieldspec`.
        multiValued:
          description: 'A boolean specifying whether this is a multi-valued field or not. Default: `false`.'
          type: boolean
        etag:
          type: string
          description: The ETag of the field.
        indexed:
          type: boolean
          default: 'true'
          description: 'Boolean specifying whether the field is indexed or not. Default: `true`.'
        displayName:
          type: string
          description: Display Name of the field.
        numericIndexingSpec:
          properties:
            minValue:
              type: number
              format: double
              description: Minimum value of this field. This is meant to be indicative rather than enforced. Values outside
                this range will still be indexed, but search may not be as performant.
            maxValue:
              type: number
              format: double
              description: Maximum value of this field. This is meant to be indicative rather than enforced. Values outside
                this range will still be indexed, but search may not be as performant.
          description: Indexing spec for a numeric field. By default, only exact match queries will be supported for numeric
            fields. Setting the `numericIndexingSpec` allows range queries to be supported.
          type: object
        fieldId:
          description: The unique identifier of the field (Read-only)
          type: string
        fieldType:
          type: string
          description: The type of the field.
    Schemas:
      description: JSON response template for List Schema operation in Directory API.
      properties:
        etag:
          type: string
          description: ETag of the resource.
        kind:
          type: string
          default: admin#directory#schemas
          description: Kind of resource this is.
        schemas:
          type: array
          items:
            $ref: '#/components/schemas/Schema'
          description: A list of UserSchema objects.
      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)