---
title: "PATCH /v1/{+name}"
method: PATCH
path: "/v1/{+name}"
tags: ["projects"]
---

# PATCH /v1/{+name}

`PATCH /v1/{+name}`

Updates a schema version. Editable fields are: - `display_name` - `labels`

## Path parameters

- `name` string, required

## Query parameters

- `updateMask` string

## Request body

- GoogleCloudDocumentaiV1SchemaVersion — SchemaVersion is a version of the Schema which is created in SchemaGroup.
  - `displayName` string — Required. The user-defined name of the SchemaVersion.
  - `labels` object — Optional. The {{gcp_name_short}} labels for the SchemaVersion.
  - `schema` GoogleCloudDocumentaiV1DocumentSchema — The schema defines the output of the processed document by a processor.
    - `documentPrompt` string — Optional. Document-level prompt provided by the user. This custom text is injected into the AI model's prompt to provide extra, document-wide guidance for processing.
    - `description` string — Description of the schema.
    - `entityTypes` GoogleCloudDocumentaiV1DocumentSchemaEntityType[] — Entity types of the schema.
      - `enumValues` GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues — Defines the a list of enum values.
        - `values` string[] — The individual values that this enum values type can include.
      - `name` string — Name of the type. It must be unique within the schema file and cannot be a "Common Type". The following naming conventions are used: - Use `snake_casing`. - Name matching is case-sensitive. - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward compatibility, internal infrastructure and tooling can handle any ASCII character.) - The `/` is sometimes used to denote a property of a type. For example, `line_item/amount`. This convention is deprecated, but will still be honored for backward compatibility.
      - `properties` GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty[] — Description the nested structure, or composition of an entity.
        - `occurrenceType` 'OCCURRENCE_TYPE_UNSPECIFIED' | 'OPTIONAL_ONCE' | 'OPTIONAL_MULTIPLE' | 'REQUIRED_ONCE' | 'REQUIRED_MULTIPLE' — Occurrence type limits the number of instances an entity type appears in the document.
        - `displayName` string — User defined name for the property.
        - `valueType` string — A reference to the value type of the property. This type is subject to the same conventions as the `Entity.base_types` field.
        - `method` 'METHOD_UNSPECIFIED' | 'EXTRACT' | 'DERIVE' | 'RELAXED_EXTRACT' — Specifies how the entity's value is obtained.
        - `name` string — The name of the property. Follows the same guidelines as the EntityType name.
      - `baseTypes` string[] — The entity type that this type is derived from. For now, one and only one should be set.
      - `displayName` string — User defined name for the type.
    - `displayName` string — Display name to show users.
    - `metadata` GoogleCloudDocumentaiV1DocumentSchemaMetadata — Metadata for global schema behavior.
      - `documentSplitter` boolean — If true, a `document` entity type can be applied to subdocument (splitting). Otherwise, it can only be applied to the entire document (classification).
      - `skipNamingValidation` boolean — If set, this will skip the naming format validation in the schema. So the string values in `DocumentSchema.EntityType.name` and `DocumentSchema.EntityType.Property.name` will not be checked.
      - `documentAllowMultipleLabels` boolean — If true, on a given page, there can be multiple `document` annotations covering it.
      - `prefixedNamingOnProperties` boolean — If set, all the nested entities must be prefixed with the parents.
  - `name` string — Identifier. The resource name of the SchemaVersion. Format: `projects/{project}/locations/{location}/schemas/{schema}/schemaVersions/{schema_version}`
  - `createTime` string, google-datetime — Output only. The time when the SchemaVersion was created.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/documentai.md) · [All operations](https://skmtc.dev/google/apis/documentai/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/documentai/revisions/88d43b76c9f3/schema)
