---
title: "Create data field for a collection along with a new data point."
method: POST
path: "/v3/collections/{identifier}/create_data_field"
tags: ["Deprecated End Points"]
deprecated: true
---

# Create data field for a collection along with a new data point.

`POST /v3/collections/{identifier}/create_data_field`

> **Deprecated.**

Create data field for a collection along with a new data point.

## Path parameters

- `identifier` string, required — Uniquely identify a collection.

## Request body

- DataFieldCreate
  - `categoryLabel` string — The label of the category that this field will be put into. If not provided, the field will be put into the default category. If no category exists with the specified label, a new category will be created.
  - `field` DataFieldCreateField, required — The field to be created.
    - `label` string, required
    - `fieldType` 'text' | 'integer' | 'float' | 'decimal' | 'date' | 'datetime' | 'daterange' | 'boolean' | 'enum' | 'location' | 'phonenumber' | 'json' | 'table' | 'expectedremuneration' | 'jobtitle' | 'language' | 'skill' | 'yearsexperience' | 'group' | 'table_deprecated' | 'url' | 'image' | 'docclf' — The different data types of annotations
    - `mandatory` boolean
    - `showDropdown` boolean
    - `displayEnumValue` boolean — If true, both the value and the label for the enums will appear in the dropdown in the validation tool.
    - `autoValidationThreshold` number, nullable — Threshold for auto validation. If null, uses the collection's autoValidationThreshold.
    - `enableAutoValidationThreshold` boolean, nullable — If true, the autoValidationThreshold enable auto validation from the threshold from this field if specified, else from the collection
    - `dataSource` string, nullable — Data source mapping identifier
    - `mapping` string, nullable — Defines how the data point is mapped to the data source
    - `displayRawText` boolean — If true, then the validation tool will show the user the raw text found on the page, not the value that has been parsed to a specific type.
  - `dataPoint` DataFieldCreateDataPoint, required — The data point to be created for this field. If a data point with the same slug and collection already exists, it will be reused.
    - `name` string, required — Name of the data point.
    - `slug` string, required — A camelCase string that will be used as the key in the API response.
    - `description` string, nullable
    - `type` 'text' | 'integer' | 'float' | 'decimal' | 'date' | 'datetime' | 'daterange' | 'boolean' | 'enum' | 'location' | 'phonenumber' | 'json' | 'table' | 'expectedremuneration' | 'jobtitle' | 'language' | 'skill' | 'yearsexperience' | 'group' | 'table_deprecated' | 'url' | 'image' | 'docclf', required — The different data types of annotations
    - `multiple` boolean
    - `noRect` boolean
    - `parent` string, nullable — The identifier of the parent data point if applicable.
    - `manualEntry` boolean — If true, the model will not be used to predict this data point. Instead, the user will be able to manually enter the value in the validation tool.
    - `mappingDataSource` string, nullable — If populated, the model will learn to predict this field using the data source, rather than relying on fuzzy string matching.

## Response `200`

Successfully created data field and data point.

- DataField
  - `categoryLabel` string — The label of the category that this field will be put into. If not provided, the field will be put into the default category. If no category exists with the specified label, a new category will be created.
  - `field` object, required — The field to be created.
    - `label` string, required
    - `fieldType` 'text' | 'integer' | 'float' | 'decimal' | 'date' | 'datetime' | 'daterange' | 'boolean' | 'enum' | 'location' | 'phonenumber' | 'json' | 'table' | 'expectedremuneration' | 'jobtitle' | 'language' | 'skill' | 'yearsexperience' | 'group' | 'table_deprecated' | 'url' | 'image' | 'docclf' — The different data types of annotations
    - `mandatory` boolean, required
    - `showDropdown` boolean
    - `displayEnumValue` boolean, required — If true, both the value and the label for the enums will appear in the dropdown in the validation tool.
    - `autoValidationThreshold` number, nullable, required — Threshold for auto validation. If null, uses the collection's autoValidationThreshold.
    - `enableAutoValidationThreshold` boolean, nullable — If true, the autoValidationThreshold enable auto validation from the threshold from this field if specified, else from the collection
    - `enabledChildFields` Field[], required
      - `label` string, required
      - `dataPoint` string, required — Data point identifier
      - `fieldType` 'text' | 'integer' | 'float' | 'decimal' | 'date' | 'datetime' | 'daterange' | 'boolean' | 'enum' | 'location' | 'phonenumber' | 'json' | 'table' | 'expectedremuneration' | 'jobtitle' | 'language' | 'skill' | 'yearsexperience' | 'group' | 'table_deprecated' | 'url' | 'image' | 'docclf', required — The different data types of annotations
      - `dataSource` string, nullable — Data source mapping identifier
      - `mapping` string, nullable — Defines how the data point is mapped to the data source
      - `mandatory` boolean
      - `autoValidationThreshold` number, nullable — Threshold for auto validation. If null, uses the collection's autoValidationThreshold.
      - `enableAutoValidationThreshold` boolean, nullable — If true, the autoValidationThreshold enable auto validation from the threshold from this field if specified, else from the collection
      - `showDropdown` boolean
      - `displayEnumValue` boolean — If true, both the value and the label for the enums will appear in the dropdown in the validation tool.
      - `hideEnumDetail` boolean — If true, the hoverable enum value detail icon will be hidden.
      - `dropNull` boolean — If True, any dropdown annotations that fail to parse to a value will be discarded
      - `enabledChildFields` Field[]
      - `disabledChildFields` Field[]
      - `slug` string, nullable
      - `displayRawText` boolean — If true, then the validation tool will show the user the raw text found on the page, not the value that has been parsed to a specific type.
      - `fields` object[], nullable
    - `disabledChildFields` Field[], required
      - `label` string, required
      - `dataPoint` string, required — Data point identifier
      - `fieldType` 'text' | 'integer' | 'float' | 'decimal' | 'date' | 'datetime' | 'daterange' | 'boolean' | 'enum' | 'location' | 'phonenumber' | 'json' | 'table' | 'expectedremuneration' | 'jobtitle' | 'language' | 'skill' | 'yearsexperience' | 'group' | 'table_deprecated' | 'url' | 'image' | 'docclf', required — The different data types of annotations
      - `dataSource` string, nullable — Data source mapping identifier
      - `mapping` string, nullable — Defines how the data point is mapped to the data source
      - `mandatory` boolean
      - `autoValidationThreshold` number, nullable — Threshold for auto validation. If null, uses the collection's autoValidationThreshold.
      - `enableAutoValidationThreshold` boolean, nullable — If true, the autoValidationThreshold enable auto validation from the threshold from this field if specified, else from the collection
      - `showDropdown` boolean
      - `displayEnumValue` boolean — If true, both the value and the label for the enums will appear in the dropdown in the validation tool.
      - `hideEnumDetail` boolean — If true, the hoverable enum value detail icon will be hidden.
      - `dropNull` boolean — If True, any dropdown annotations that fail to parse to a value will be discarded
      - `enabledChildFields` Field[]
      - `disabledChildFields` Field[]
      - `slug` string, nullable
      - `displayRawText` boolean — If true, then the validation tool will show the user the raw text found on the page, not the value that has been parsed to a specific type.
      - `fields` object[], nullable
    - `dataSource` string, nullable — Data source mapping identifier
    - `mapping` string, nullable — Defines how the data point is mapped to the data source
    - `displayRawText` boolean — If true, then the validation tool will show the user the raw text found on the page, not the value that has been parsed to a specific type.
  - `dataPoint` object, required — The data point to be created for this field. If a data point with the same slug and collection already exists, it will be reused.
    - `identifier` string, required — Uniquely identify a data point.
    - `name` string, required — Name of the data point.
    - `slug` string, required — A camelCase string that will be used as the key in the API response.
    - `description` string, nullable, required
    - `type` 'text' | 'integer' | 'float' | 'decimal' | 'date' | 'datetime' | 'daterange' | 'boolean' | 'enum' | 'location' | 'phonenumber' | 'json' | 'table' | 'expectedremuneration' | 'jobtitle' | 'language' | 'skill' | 'yearsexperience' | 'group' | 'table_deprecated' | 'url' | 'image' | 'docclf', required — The different data types of annotations
    - `multiple` boolean, required
    - `noRect` boolean, required
    - `parent` string, nullable, required — The identifier of the parent data point if applicable.
    - `children` DataPoint[], required
      - `identifier` string, required — Uniquely identify a data point.
      - `name` string, required — Name of the data point.
      - `slug` string, required — A camelCase string that will be used as the key in the API response.
      - `description` string, nullable
      - `annotationContentType` 'text' | 'integer' | 'float' | 'decimal' | 'date' | 'datetime' | 'daterange' | 'boolean' | 'enum' | 'location' | 'phonenumber' | 'json' | 'table' | 'expectedremuneration' | 'jobtitle' | 'language' | 'skill' | 'yearsexperience' | 'group' | 'table_deprecated' | 'url' | 'image' | 'docclf', required — The different data types of annotations
      - `organization` Organization, required
        - `identifier` string, required — Uniquely identify an organization.
        - `name` string, required
        - `userRole` 'admin' | 'member', required
        - `avatar` string, nullable, required — URL of the organization's avatar.
        - `resthookSignatureKey` string, nullable, required — Used to sign webhook payloads so you can verify their integrity.
        - `isTrial` boolean, required
        - `validationToolConfig` object, nullable, required — Configuration of the embeddable validation tool.
          - `theme` ThemeConfig
            - `palette` object
              - …
            - `typography` object
              - …
            - `borderRadius` number
            - `fontUrl` string
          - `hideActions` boolean — Hide the confirm document button and other actions.
          - `hideCollection` boolean — Hide the collection selector.
          - `hideEditPages` boolean — Hide the edit pages button.
          - `hideExport` boolean — Hide the export menu.
          - `hideFilename` boolean — Hide the filename input.
          - `hideShowRawValues` boolean — Hide the toggle for showing raw annotation values.
          - `hideReject` boolean — Hide the reject document button.
          - `hideReparse` boolean — Hide the reparse button.
          - `hideRunOcr` boolean — Hide the run OCR button.
          - `hideTags` boolean — Hide the tags editor.
          - `hideWarnings` boolean — Hide the warnings panel.
          - `restrictDocumentSplitting` boolean — Disable the page editor after a document has been split once.
          - `disableCurrencyFormatting` boolean — Disable currency formatting of decimals values.
          - `disableEditDocumentMetadata` boolean — Disable editing document metadata. Makes the collection selector, filename input and tags editor read only.
          - `disableManualAnnotationEditing` boolean — Disable manual editing of annotation values via the validation popover.
          - `hideDocumentStatus` boolean — Hide the document status indicator in the toolbar.
        - `showCustomFieldCreation` boolean, required — Whether to show the custom field creation in the UI.
        - `allowDataSourceRecordCreation` boolean, required — Allow reviewers to create missing records from the data source selector. Keep disabled when data sources are managed by external system syncs.
      - `extractor` string, required — Uniquely identify an extractor.
      - `multiple` boolean
      - `noRect` boolean
      - `parent` string, nullable — The identifier of the parent data point if applicable.
      - `children` DataPoint[]
      - `availableDataSources` MappingDataSource[]
        - `identifier` string, required — Uniquely identify a mapping data source.
        - `name` string, nullable
        - `keyProperty` string, required — Attribute in the schema which uniquely identifiers the value
        - `displayProperty` string, required — Attribute in the schema which is used to display the value
        - `organization` string, nullable, required — The organization that this mapping data source belongs to.
        - `workspace` string, nullable, required — The workspace that this mapping data source belongs to.
        - `schema` object — The schema of the mapping data source.
      - `mappingDataSource` string, nullable — If populated, the model will learn to predict this field using the data source, rather than relying on fuzzy string matching.
      - `manualEntry` boolean — If true, the model will not be used to predict this data point. Instead, the user will be able to manually enter the value in the validation tool.
    - `manualEntry` boolean — If true, the model will not be used to predict this data point. Instead, the user will be able to manually enter the value in the validation tool.
    - `availableDataSources` MappingDataSource[]
      - `identifier` string, required — Uniquely identify a mapping data source.
      - `name` string, nullable
      - `keyProperty` string, required — Attribute in the schema which uniquely identifiers the value
      - `displayProperty` string, required — Attribute in the schema which is used to display the value
      - `organization` string, nullable, required — The organization that this mapping data source belongs to.
      - `workspace` string, nullable, required — The workspace that this mapping data source belongs to.
      - `schema` object — The schema of the mapping data source.

## Other responses

- `400` — Bad request. If it is a validation error will contain a list of each invalid field
- `401` — Authorisation error
- `default` — UnexpectedError

---

[API](https://skmtc.net/affinda/apis/affinda-api-2.md) · [All operations](https://skmtc.net/affinda/apis/affinda-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/affinda/affinda-api-2/versions/6772e50cb58e/schema)
