---
title: "POST /v1/{+parent}/documentSchemas"
method: POST
path: "/v1/{+parent}/documentSchemas"
tags: ["projects"]
---

# POST /v1/{+parent}/documentSchemas

`POST /v1/{+parent}/documentSchemas`

Creates a document schema.

## Path parameters

- `parent` string, required

## Request body

- GoogleCloudContentwarehouseV1DocumentSchema — A document schema used to define document structure.
  - `displayName` string — Required. Name of the schema given by the user. Must be unique per project.
  - `name` string — The resource name of the document schema. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}. The name is ignored when creating a document schema.
  - `documentIsFolder` boolean — Document Type, true refers the document is a folder, otherwise it is a typical document.
  - `description` string — Schema description.
  - `createTime` string, google-datetime — Output only. The time when the document schema is created.
  - `propertyDefinitions` GoogleCloudContentwarehouseV1PropertyDefinition[] — Document details.
    - `integerTypeOptions` GoogleCloudContentwarehouseV1IntegerTypeOptions — Configurations for an integer property.
    - `retrievalImportance` 'RETRIEVAL_IMPORTANCE_UNSPECIFIED' | 'HIGHEST' | 'HIGHER' | 'HIGH' | 'MEDIUM' | 'LOW' | 'LOWEST' — The retrieval importance of the property during search.
    - `propertyTypeOptions` GoogleCloudContentwarehouseV1PropertyTypeOptions — Configurations for a nested structured data property.
      - `propertyDefinitions` GoogleCloudContentwarehouseV1PropertyDefinition[] — Required. List of property definitions.
    - `isMetadata` boolean — Whether the property is user supplied metadata. This out-of-the box placeholder setting can be used to tag derived properties. Its value and interpretation logic should be implemented by API user.
    - `schemaSources` GoogleCloudContentwarehouseV1PropertyDefinitionSchemaSource[] — The mapping information between this property to another schema source.
      - `name` string — The schema name in the source.
      - `processorType` string — The Doc AI processor type name.
    - `textTypeOptions` GoogleCloudContentwarehouseV1TextTypeOptions — Configurations for a text property.
    - `isRepeatable` boolean — Whether the property can have multiple values.
    - `displayName` string — The display-name for the property, used for front-end.
    - `floatTypeOptions` GoogleCloudContentwarehouseV1FloatTypeOptions — Configurations for a float property.
    - `name` string — Required. The name of the metadata property. Must be unique within a document schema and is case insensitive. Names must be non-blank, start with a letter, and can contain alphanumeric characters and: /, :, -, _, and .
    - `isFilterable` boolean — Whether the property can be filtered. If this is a sub-property, all the parent properties must be marked filterable.
    - `enumTypeOptions` GoogleCloudContentwarehouseV1EnumTypeOptions — Configurations for an enum/categorical property.
      - `validationCheckDisabled` boolean — Make sure the Enum property value provided in the document is in the possile value list during document creation. The validation check runs by default.
      - `possibleValues` string[] — Required. List of possible enum values.
    - `dateTimeTypeOptions` GoogleCloudContentwarehouseV1DateTimeTypeOptions — Configurations for a date time property.
    - `timestampTypeOptions` GoogleCloudContentwarehouseV1TimestampTypeOptions — Configurations for a timestamp property.
    - `mapTypeOptions` GoogleCloudContentwarehouseV1MapTypeOptions — Configurations for a Map property.
    - `isSearchable` boolean — Indicates that the property should be included in a global search.
    - `isRequired` boolean — Whether the property is mandatory. Default is 'false', i.e. populating property value can be skipped. If 'true' then user must populate the value for this property.
  - `updateTime` string, google-datetime — Output only. The time when the document schema is last updated.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/contentwarehouse.md) · [All operations](https://skmtc.net/google/apis/contentwarehouse/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/contentwarehouse/versions/7a5c5ed93884/schema)
